diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..cc4088f --- /dev/null +++ b/.env.test @@ -0,0 +1,3 @@ +DATABASE_URI=postgres://ptfapp:polaristaskforcedb@127.0.0.1:5432/ptf-app-stg +PAYLOAD_SECRET=b5ac11acc77ea8427d10fcd0 +# Added by Payload \ No newline at end of file diff --git a/Writerside/c.list b/Writerside/c.list new file mode 100644 index 0000000..c4c77a2 --- /dev/null +++ b/Writerside/c.list @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/Writerside/cfg/buildprofiles.xml b/Writerside/cfg/buildprofiles.xml new file mode 100644 index 0000000..8d878a3 --- /dev/null +++ b/Writerside/cfg/buildprofiles.xml @@ -0,0 +1,13 @@ + + + + + + + + true + + + + diff --git a/Writerside/images/completion_procedure.png b/Writerside/images/completion_procedure.png new file mode 100644 index 0000000..3535a3f Binary files /dev/null and b/Writerside/images/completion_procedure.png differ diff --git a/Writerside/images/completion_procedure_dark.png b/Writerside/images/completion_procedure_dark.png new file mode 100644 index 0000000..a65beb0 Binary files /dev/null and b/Writerside/images/completion_procedure_dark.png differ diff --git a/Writerside/images/convert_table_to_xml.png b/Writerside/images/convert_table_to_xml.png new file mode 100644 index 0000000..2518a64 Binary files /dev/null and b/Writerside/images/convert_table_to_xml.png differ diff --git a/Writerside/images/convert_table_to_xml_dark.png b/Writerside/images/convert_table_to_xml_dark.png new file mode 100644 index 0000000..4716122 Binary files /dev/null and b/Writerside/images/convert_table_to_xml_dark.png differ diff --git a/Writerside/images/new_topic_options.png b/Writerside/images/new_topic_options.png new file mode 100644 index 0000000..bc6abb6 Binary files /dev/null and b/Writerside/images/new_topic_options.png differ diff --git a/Writerside/images/new_topic_options_dark.png b/Writerside/images/new_topic_options_dark.png new file mode 100644 index 0000000..bf3e48d Binary files /dev/null and b/Writerside/images/new_topic_options_dark.png differ diff --git a/Writerside/ptf-ug.tree b/Writerside/ptf-ug.tree new file mode 100644 index 0000000..bf57972 --- /dev/null +++ b/Writerside/ptf-ug.tree @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/Writerside/topics/Overview.md b/Writerside/topics/Overview.md new file mode 100644 index 0000000..d0f6b91 --- /dev/null +++ b/Writerside/topics/Overview.md @@ -0,0 +1,66 @@ +# Overview + +The Polaris Task Force website (also known as the "web app") is intended to provide a meta-gaming interface for the +Polaris Task Force Arma 3 unit's various user-created missions and campaigns. + +## What is the PTF web app? + +Developed with NextJS and powered by the headless CMS PayloadCMS, the PTF web app acts as the main hub for all Polaris +Task Force Arma 3 content. It offers a novel, interactive experience inspired by 4X strategy games, integrating similar +features into the unit's Arma 3 activities. + +The web app provides two primary interfaces to users. + +1. **Frontend** – This is the main interface for users to interact with the web app. Here, you can manage the unit + budget, purchase assets, construct buildings, read mission briefings, view profiles, and more. The frontend is + essentially the _game_ part of the web app. +2. **Backend** – This is the developer portal and dashboard, where all game definitions, rules, and data are created and + managed. The backend acts as a _game engine_, controlling how the game works behind the scenes. + +### The Job System + +Beyond the two user interfaces, the web app also manages and processes the "game state" that is created via automated +rules and user interactions within the app. This aspect of the web app is referred to as the **job system**. The job +system is an essential part of the app that runs on a specific time interval called a **"game tick"**, which occurs +every ten minutes. + +The job system will process pending user actions as well as recalculate various parts of the game state. For example, +the job system is responsible for finalizing currency transactions, producing new materials from factories, increasing +research progress, and much more. + +### Permissions & Roles + +Different members of the Polaris Task Force community will have different permissions and controls available to them +through the web app. For example, the unit's logistics team will have administrative access to the definitions of +assets, structures, and any other logistics-related items. The intelligence team will have administrative access to user +profiles, missions, and the unit wiki. Regular users can expect standard (mostly read-only) access to the application, +with exceptions for specific cases. + +During the application's development, a **quality-assurance team** will be granted broad +administrative rights, excluding only highly-sensitive, developer-specific areas within the +application. The QA team is responsible for ensuring the stability and functionality of the application throughout its +various stages of development. At the time of writing, the QA team consists of the following unit members: + +- **L. Vargas** - Unit Supply Officer, Logistics +- **A. Aries** - Logistics +- **I. Kronus** - Head Intelligence Director, Intelligence + +## Glossary + +The following terms are used regularly throughout the web app documentation and are compiled here for your convenience. + +Frontend +: This is the main interface for users to interact with the web app. Here, you can manage the unit +budget, purchase assets, construct buildings, read mission briefings, view profiles, and more. The frontend is +essentially the _game_ part of the web app. + +Backend +: This is the developer portal and dashboard, where all game definitions, rules, and data are created and +managed. The backend acts as a _game engine_, controlling how the game works behind the scenes. + +Job system +: The job system is an essential part of the app that automatically runs various game processes over time. + +Game tick +: The game tick is a specific time interval that occurs every ten minutes. The server automatically performs various +operations on each game tick. diff --git a/Writerside/v.list b/Writerside/v.list new file mode 100644 index 0000000..2d12cb3 --- /dev/null +++ b/Writerside/v.list @@ -0,0 +1,5 @@ + + + + + diff --git a/Writerside/writerside.cfg b/Writerside/writerside.cfg new file mode 100644 index 0000000..552347d --- /dev/null +++ b/Writerside/writerside.cfg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/components.json b/components.json new file mode 100644 index 0000000..797335b --- /dev/null +++ b/components.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/app/(frontend)/styles.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "registries": {} +} diff --git a/drizzle.config.ts b/drizzle.config.ts new file mode 100644 index 0000000..48f430c --- /dev/null +++ b/drizzle.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from "drizzle-kit"; + +export default defineConfig({ + dialect: "postgresql", + schema: "./src/payload-generated-schema.ts", + dbCredentials: { + url: process.env.DATABASE_URI || "", + }, +}); diff --git a/package.json b/package.json index 4febf3a..c96bf7d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "polaris-task-force", - "version": "1.0.0", - "description": "A blank template to get started with Payload 3.0", + "version": "0.1.0", + "description": "Web app for the Arma 3 unit Polaris Task Force. Uses Next.js for client- and server-side rendering, with a Postgres database and some other neat libraries.", "license": "MIT", "type": "module", "scripts": { @@ -12,25 +12,34 @@ "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", "lint": "cross-env NODE_OPTIONS=--no-deprecation next lint", "payload": "cross-env NODE_OPTIONS=--no-deprecation payload", + "db": "cross-env NODE_OPTIONS=--no-deprecation pnpm drizzle-kit", "start": "cross-env NODE_OPTIONS=--no-deprecation next start", + "staging": "cross-env NODE_ENV=test NODE_OPTIONS=--no-deprecation next start", "test": "pnpm run test:int && pnpm run test:e2e", "test:e2e": "cross-env NODE_OPTIONS=\"--no-deprecation --no-experimental-strip-types\" pnpm exec playwright test", "test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts" }, "dependencies": { + "@payloadcms/db-postgres": "3.59.1", "@payloadcms/next": "3.59.1", "@payloadcms/payload-cloud": "3.59.1", "@payloadcms/richtext-lexical": "3.59.1", "@payloadcms/ui": "3.59.1", + "@tailwindcss/postcss": "^4.1.16", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", "cross-env": "^7.0.3", "dotenv": "16.4.7", "graphql": "^16.8.1", - "next": "15.4.4", + "lucide-react": "^0.548.0", + "next": "15.4.7", "payload": "3.59.1", + "postcss": "^8.5.6", "react": "19.1.0", "react-dom": "19.1.0", "sharp": "0.34.2", - "@payloadcms/db-postgres": "3.59.1" + "tailwind-merge": "^3.3.1", + "tailwindcss": "^4.1.16" }, "devDependencies": { "@playwright/test": "1.54.1", @@ -39,12 +48,14 @@ "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "@vitejs/plugin-react": "4.5.2", + "drizzle-kit": "^0.31.6", "eslint": "^9.16.0", "eslint-config-next": "15.4.4", "jsdom": "26.1.0", "playwright": "1.54.1", "playwright-core": "1.54.1", "prettier": "^3.4.2", + "tw-animate-css": "^1.4.0", "typescript": "5.7.3", "vite-tsconfig-paths": "5.1.4", "vitest": "3.2.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1fdf15..2acf85b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,16 +13,25 @@ importers: version: 3.59.1(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3)) '@payloadcms/next': specifier: 3.59.1 - version: 3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + version: 3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) '@payloadcms/payload-cloud': specifier: 3.59.1 version: 3.59.1(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3)) '@payloadcms/richtext-lexical': specifier: 3.59.1 - version: 3.59.1(@faceless-ui/modal@3.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@faceless-ui/scroll-info@2.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3))(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)(yjs@13.6.27) + version: 3.59.1(@faceless-ui/modal@3.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@faceless-ui/scroll-info@2.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3))(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)(yjs@13.6.27) '@payloadcms/ui': specifier: 3.59.1 - version: 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + version: 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + '@tailwindcss/postcss': + specifier: ^4.1.16 + version: 4.1.16 + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 cross-env: specifier: ^7.0.3 version: 7.0.3 @@ -32,12 +41,18 @@ importers: graphql: specifier: ^16.8.1 version: 16.11.0 + lucide-react: + specifier: ^0.548.0 + version: 0.548.0(react@19.1.0) next: - specifier: 15.4.4 - version: 15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) + specifier: 15.4.7 + version: 15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) payload: specifier: 3.59.1 version: 3.59.1(graphql@16.11.0)(typescript@5.7.3) + postcss: + specifier: ^8.5.6 + version: 8.5.6 react: specifier: 19.1.0 version: 19.1.0 @@ -47,6 +62,12 @@ importers: sharp: specifier: 0.34.2 version: 0.34.2 + tailwind-merge: + specifier: ^3.3.1 + version: 3.3.1 + tailwindcss: + specifier: ^4.1.16 + version: 4.1.16 devDependencies: '@playwright/test': specifier: 1.54.1 @@ -65,13 +86,16 @@ importers: version: 19.1.6(@types/react@19.1.8) '@vitejs/plugin-react': specifier: 4.5.2 - version: 4.5.2(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3)) + version: 4.5.2(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3)) + drizzle-kit: + specifier: ^0.31.6 + version: 0.31.6 eslint: specifier: ^9.16.0 - version: 9.37.0 + version: 9.37.0(jiti@2.6.1) eslint-config-next: specifier: 15.4.4 - version: 15.4.4(eslint@9.37.0)(typescript@5.7.3) + version: 15.4.4(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) jsdom: specifier: 26.1.0 version: 26.1.0 @@ -84,18 +108,25 @@ importers: prettier: specifier: ^3.4.2 version: 3.6.2 + tw-animate-css: + specifier: ^1.4.0 + version: 1.4.0 typescript: specifier: 5.7.3 version: 5.7.3 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.7.3)(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3)) + version: 5.1.4(typescript@5.7.3)(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3)) vitest: specifier: 3.2.3 - version: 3.2.3(@types/debug@4.1.12)(@types/node@22.18.10)(jsdom@26.1.0)(sass@1.77.4)(tsx@4.20.3) + version: 3.2.3(@types/debug@4.1.12)(@types/node@22.18.10)(jiti@2.6.1)(jsdom@26.1.0)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) packages: + '@alloc/quick-lru@5.2.0': + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + '@apidevtools/json-schema-ref-parser@11.9.3': resolution: {integrity: sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ==} engines: {node: '>= 16'} @@ -1362,8 +1393,8 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@next/env@15.4.4': - resolution: {integrity: sha512-SJKOOkULKENyHSYXE5+KiFU6itcIb6wSBjgM92meK0HVKpo94dNOLZVdLLuS7/BxImROkGoPsjR4EnuDucqiiA==} + '@next/env@15.4.7': + resolution: {integrity: sha512-PrBIpO8oljZGTOe9HH0miix1w5MUiGJ/q83Jge03mHEE0E3pyqzAy2+l5G6aJDbXoobmxPJTVhbCuwlLtjSHwg==} '@next/env@15.5.5': resolution: {integrity: sha512-2Zhvss36s/yL+YSxD5ZL5dz5pI6ki1OLxYlh6O77VJ68sBnlUrl5YqhBgCy7FkdMsp9RBeGFwpuDCdpJOqdKeQ==} @@ -1371,50 +1402,50 @@ packages: '@next/eslint-plugin-next@15.4.4': resolution: {integrity: sha512-1FDsyN//ai3Jd97SEd7scw5h1yLdzDACGOPRofr2GD3sEFsBylEEoL0MHSerd4n2dq9Zm/mFMqi4+NRMOreOKA==} - '@next/swc-darwin-arm64@15.4.4': - resolution: {integrity: sha512-eVG55dnGwfUuG+TtnUCt+mEJ+8TGgul6nHEvdb8HEH7dmJIFYOCApAaFrIrxwtEq2Cdf+0m5sG1Np8cNpw9EAw==} + '@next/swc-darwin-arm64@15.4.7': + resolution: {integrity: sha512-2Dkb+VUTp9kHHkSqtws4fDl2Oxms29HcZBwFIda1X7Ztudzy7M6XF9HDS2dq85TmdN47VpuhjE+i6wgnIboVzQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@15.4.4': - resolution: {integrity: sha512-zqG+/8apsu49CltEj4NAmCGZvHcZbOOOsNoTVeIXphYWIbE4l6A/vuQHyqll0flU2o3dmYCXsBW5FmbrGDgljQ==} + '@next/swc-darwin-x64@15.4.7': + resolution: {integrity: sha512-qaMnEozKdWezlmh1OGDVFueFv2z9lWTcLvt7e39QA3YOvZHNpN2rLs/IQLwZaUiw2jSvxW07LxMCWtOqsWFNQg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@15.4.4': - resolution: {integrity: sha512-LRD4l2lq4R+2QCHBQVC0wjxxkLlALGJCwigaJ5FSRSqnje+MRKHljQNZgDCaKUZQzO/TXxlmUdkZP/X3KNGZaw==} + '@next/swc-linux-arm64-gnu@15.4.7': + resolution: {integrity: sha512-ny7lODPE7a15Qms8LZiN9wjNWIeI+iAZOFDOnv2pcHStncUr7cr9lD5XF81mdhrBXLUP9yT9RzlmSWKIazWoDw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@15.4.4': - resolution: {integrity: sha512-LsGUCTvuZ0690fFWerA4lnQvjkYg9gHo12A3wiPUR4kCxbx/d+SlwmonuTH2SWZI+RVGA9VL3N0S03WTYv6bYg==} + '@next/swc-linux-arm64-musl@15.4.7': + resolution: {integrity: sha512-4SaCjlFR/2hGJqZLLWycccy1t+wBrE/vyJWnYaZJhUVHccpGLG5q0C+Xkw4iRzUIkE+/dr90MJRUym3s1+vO8A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@15.4.4': - resolution: {integrity: sha512-aOy5yNRpLL3wNiJVkFYl6w22hdREERNjvegE6vvtix8LHRdsTHhWTpgvcYdCK7AIDCQW5ATmzr9XkPHvSoAnvg==} + '@next/swc-linux-x64-gnu@15.4.7': + resolution: {integrity: sha512-2uNXjxvONyRidg00VwvlTYDwC9EgCGNzPAPYbttIATZRxmOZ3hllk/YYESzHZb65eyZfBR5g9xgCZjRAl9YYGg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@15.4.4': - resolution: {integrity: sha512-FL7OAn4UkR8hKQRGBmlHiHinzOb07tsfARdGh7v0Z0jEJ3sz8/7L5bR23ble9E6DZMabSStqlATHlSxv1fuzAg==} + '@next/swc-linux-x64-musl@15.4.7': + resolution: {integrity: sha512-ceNbPjsFgLscYNGKSu4I6LYaadq2B8tcK116nVuInpHHdAWLWSwVK6CHNvCi0wVS9+TTArIFKJGsEyVD1H+4Kg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@15.4.4': - resolution: {integrity: sha512-eEdNW/TXwjYhOulQh0pffTMMItWVwKCQpbziSBmgBNFZIIRn2GTXrhrewevs8wP8KXWYMx8Z+mNU0X+AfvtrRg==} + '@next/swc-win32-arm64-msvc@15.4.7': + resolution: {integrity: sha512-pZyxmY1iHlZJ04LUL7Css8bNvsYAMYOY9JRwFA3HZgpaNKsJSowD09Vg2R9734GxAcLJc2KDQHSCR91uD6/AAw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@15.4.4': - resolution: {integrity: sha512-SE5pYNbn/xZKMy1RE3pAs+4xD32OI4rY6mzJa4XUkp/ItZY+OMjIgilskmErt8ls/fVJ+Ihopi2QIeW6O3TrMw==} + '@next/swc-win32-x64-msvc@15.4.7': + resolution: {integrity: sha512-HjuwPJ7BeRzgl3KrjKqD2iDng0eQIpIReyhpF5r4yeAHFwWRuAhfW92rWv/r3qeQHEwHsLRzFDvMqRjyM5DI6A==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1837,6 +1868,94 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@tailwindcss/node@4.1.16': + resolution: {integrity: sha512-BX5iaSsloNuvKNHRN3k2RcCuTEgASTo77mofW0vmeHkfrDWaoFAFvNHpEgtu0eqyypcyiBkDWzSMxJhp3AUVcw==} + + '@tailwindcss/oxide-android-arm64@4.1.16': + resolution: {integrity: sha512-8+ctzkjHgwDJ5caq9IqRSgsP70xhdhJvm+oueS/yhD5ixLhqTw9fSL1OurzMUhBwE5zK26FXLCz2f/RtkISqHA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.1.16': + resolution: {integrity: sha512-C3oZy5042v2FOALBZtY0JTDnGNdS6w7DxL/odvSny17ORUnaRKhyTse8xYi3yKGyfnTUOdavRCdmc8QqJYwFKA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.1.16': + resolution: {integrity: sha512-vjrl/1Ub9+JwU6BP0emgipGjowzYZMjbWCDqwA2Z4vCa+HBSpP4v6U2ddejcHsolsYxwL5r4bPNoamlV0xDdLg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.1.16': + resolution: {integrity: sha512-TSMpPYpQLm+aR1wW5rKuUuEruc/oOX3C7H0BTnPDn7W/eMw8W+MRMpiypKMkXZfwH8wqPIRKppuZoedTtNj2tg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.16': + resolution: {integrity: sha512-p0GGfRg/w0sdsFKBjMYvvKIiKy/LNWLWgV/plR4lUgrsxFAoQBFrXkZ4C0w8IOXfslB9vHK/JGASWD2IefIpvw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.1.16': + resolution: {integrity: sha512-DoixyMmTNO19rwRPdqviTrG1rYzpxgyYJl8RgQvdAQUzxC1ToLRqtNJpU/ATURSKgIg6uerPw2feW0aS8SNr/w==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.1.16': + resolution: {integrity: sha512-H81UXMa9hJhWhaAUca6bU2wm5RRFpuHImrwXBUvPbYb+3jo32I9VIwpOX6hms0fPmA6f2pGVlybO6qU8pF4fzQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.1.16': + resolution: {integrity: sha512-ZGHQxDtFC2/ruo7t99Qo2TTIvOERULPl5l0K1g0oK6b5PGqjYMga+FcY1wIUnrUxY56h28FxybtDEla+ICOyew==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.1.16': + resolution: {integrity: sha512-Oi1tAaa0rcKf1Og9MzKeINZzMLPbhxvm7rno5/zuP1WYmpiG0bEHq4AcRUiG2165/WUzvxkW4XDYCscZWbTLZw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.1.16': + resolution: {integrity: sha512-B01u/b8LteGRwucIBmCQ07FVXLzImWESAIMcUU6nvFt/tYsQ6IHz8DmZ5KtvmwxD+iTYBtM1xwoGXswnlu9v0Q==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.16': + resolution: {integrity: sha512-zX+Q8sSkGj6HKRTMJXuPvOcP8XfYON24zJBRPlszcH1Np7xuHXhWn8qfFjIujVzvH3BHU+16jBXwgpl20i+v9A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.1.16': + resolution: {integrity: sha512-m5dDFJUEejbFqP+UXVstd4W/wnxA4F61q8SoL+mqTypId2T2ZpuxosNSgowiCnLp2+Z+rivdU0AqpfgiD7yCBg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.1.16': + resolution: {integrity: sha512-2OSv52FRuhdlgyOQqgtQHuCgXnS8nFSYRp2tJ+4WZXKgTxqPy7SMSls8c3mPT5pkZ17SBToGM5LHEJBO7miEdg==} + engines: {node: '>= 10'} + + '@tailwindcss/postcss@4.1.16': + resolution: {integrity: sha512-Qn3SFGPXYQMKR/UtqS+dqvPrzEeBZHrFA92maT4zijCVggdsXnDBMsPFJo1eArX3J+O+Gi+8pV4PkqjLCNBk3A==} + '@testing-library/dom@10.4.1': resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==} engines: {node: '>=18'} @@ -2368,6 +2487,9 @@ packages: resolution: {integrity: sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==} engines: {node: '>=8'} + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} @@ -2542,6 +2664,10 @@ packages: resolution: {integrity: sha512-tCPWVZWZqWVx2XUsVpJRnH9Mx0ClVOf5YUHerZ5so1OKSlqww4zy1R5ksEdGRcO3tM3zj0PYN6V48TbQCL1RfA==} hasBin: true + drizzle-kit@0.31.6: + resolution: {integrity: sha512-/B4e/4pwnx25QwD5xXgdpo1S+077a2VZdosXbItE/oNmUgQwZydGDz9qJYmnQl/b+5IX0rLfwRhrPnroGtrg8Q==} + hasBin: true + drizzle-orm@0.44.2: resolution: {integrity: sha512-zGAqBzWWkVSFjZpwPOrmCrgO++1kZ5H/rZ4qTGeGOe18iXGVJWf3WPfHOVwFIbmi8kHjfJstC6rJomzGx8g/dQ==} peerDependencies: @@ -2647,6 +2773,10 @@ packages: end-of-stream@1.4.5: resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + enhanced-resolve@5.18.3: + resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==} + engines: {node: '>=10.13.0'} + entities@6.0.1: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} @@ -3004,6 +3134,9 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -3267,6 +3400,10 @@ packages: resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==} engines: {node: '>= 0.4'} + jiti@2.6.1: + resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} + hasBin: true + jose@5.9.6: resolution: {integrity: sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==} @@ -3364,6 +3501,76 @@ packages: engines: {node: '>=16'} hasBin: true + lightningcss-android-arm64@1.30.2: + resolution: {integrity: sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.30.2: + resolution: {integrity: sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.30.2: + resolution: {integrity: sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.30.2: + resolution: {integrity: sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.30.2: + resolution: {integrity: sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.30.2: + resolution: {integrity: sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.30.2: + resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.30.2: + resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.30.2: + resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.30.2: + resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.30.2: + resolution: {integrity: sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.30.2: + resolution: {integrity: sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==} + engines: {node: '>= 12.0.0'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -3393,6 +3600,11 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lucide-react@0.548.0: + resolution: {integrity: sha512-63b16z63jM9yc1MwxajHeuu0FRZFsDtljtDjYm26Kd86UQ5HQzu9ksEtoUUw4RBuewodw/tGFmvipePvRsKeDA==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -3539,8 +3751,8 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - next@15.4.4: - resolution: {integrity: sha512-kNcubvJjOL9yUOfwtZF3HfDhuhp+kVD+FM2A6Tyua1eI/xfmY4r/8ZS913MMz+oWKDlbps/dQOWdDricuIkXLw==} + next@15.4.7: + resolution: {integrity: sha512-OcqRugwF7n7mC8OSYjvsZhhG1AYSvulor1EIUsIkbbEbf1qoE5EbH36Swj8WhF4cHqmDgkiam3z1c1W0J1Wifg==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: @@ -4213,6 +4425,16 @@ packages: tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + tailwind-merge@3.3.1: + resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} + + tailwindcss@4.1.16: + resolution: {integrity: sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==} + + tapable@2.3.0: + resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} + engines: {node: '>=6'} + thread-stream@3.1.0: resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==} @@ -4319,6 +4541,9 @@ packages: engines: {node: '>=18.0.0'} hasBin: true + tw-animate-css@1.4.0: + resolution: {integrity: sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -4609,6 +4834,8 @@ packages: snapshots: + '@alloc/quick-lru@5.2.0': {} + '@apidevtools/json-schema-ref-parser@11.9.3': dependencies: '@jsdevtools/ono': 7.1.3 @@ -5667,9 +5894,9 @@ snapshots: '@esbuild/win32-x64@0.25.11': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@9.37.0)': + '@eslint-community/eslint-utils@4.9.0(eslint@9.37.0(jiti@2.6.1))': dependencies: - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -6126,7 +6353,7 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@next/env@15.4.4': {} + '@next/env@15.4.7': {} '@next/env@15.5.5': {} @@ -6134,28 +6361,28 @@ snapshots: dependencies: fast-glob: 3.3.1 - '@next/swc-darwin-arm64@15.4.4': + '@next/swc-darwin-arm64@15.4.7': optional: true - '@next/swc-darwin-x64@15.4.4': + '@next/swc-darwin-x64@15.4.7': optional: true - '@next/swc-linux-arm64-gnu@15.4.4': + '@next/swc-linux-arm64-gnu@15.4.7': optional: true - '@next/swc-linux-arm64-musl@15.4.4': + '@next/swc-linux-arm64-musl@15.4.7': optional: true - '@next/swc-linux-x64-gnu@15.4.4': + '@next/swc-linux-x64-gnu@15.4.7': optional: true - '@next/swc-linux-x64-musl@15.4.4': + '@next/swc-linux-x64-musl@15.4.7': optional: true - '@next/swc-win32-arm64-msvc@15.4.4': + '@next/swc-win32-arm64-msvc@15.4.7': optional: true - '@next/swc-win32-x64-msvc@15.4.4': + '@next/swc-win32-x64-msvc@15.4.7': optional: true '@nodelib/fs.scandir@2.1.5': @@ -6271,12 +6498,12 @@ snapshots: transitivePeerDependencies: - typescript - '@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)': + '@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)': dependencies: '@dnd-kit/core': 6.0.8(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@payloadcms/graphql': 3.59.1(graphql@16.11.0)(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(typescript@5.7.3) '@payloadcms/translations': 3.59.1 - '@payloadcms/ui': 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + '@payloadcms/ui': 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) busboy: 1.6.0 dequal: 2.0.3 file-type: 19.3.0 @@ -6284,7 +6511,7 @@ snapshots: graphql-http: 1.22.4(graphql@16.11.0) graphql-playground-html: 1.6.30 http-status: 2.1.0 - next: 15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) + next: 15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) path-to-regexp: 6.3.0 payload: 3.59.1(graphql@16.11.0)(typescript@5.7.3) qs-esm: 7.0.2 @@ -6312,7 +6539,7 @@ snapshots: - aws-crt - encoding - '@payloadcms/richtext-lexical@3.59.1(@faceless-ui/modal@3.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@faceless-ui/scroll-info@2.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3))(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)(yjs@13.6.27)': + '@payloadcms/richtext-lexical@3.59.1(@faceless-ui/modal@3.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@faceless-ui/scroll-info@2.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@payloadcms/next@3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3))(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)(yjs@13.6.27)': dependencies: '@faceless-ui/modal': 3.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@faceless-ui/scroll-info': 2.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -6326,9 +6553,9 @@ snapshots: '@lexical/selection': 0.35.0 '@lexical/table': 0.35.0 '@lexical/utils': 0.35.0 - '@payloadcms/next': 3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + '@payloadcms/next': 3.59.1(@types/react@19.1.8)(graphql@16.11.0)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) '@payloadcms/translations': 3.59.1 - '@payloadcms/ui': 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) + '@payloadcms/ui': 3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) '@types/uuid': 10.0.0 acorn: 8.12.1 bson-objectid: 2.0.4 @@ -6359,7 +6586,7 @@ snapshots: dependencies: date-fns: 4.1.0 - '@payloadcms/ui@3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)': + '@payloadcms/ui@3.59.1(@types/react@19.1.8)(monaco-editor@0.54.0)(next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(payload@3.59.1(graphql@16.11.0)(typescript@5.7.3))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)': dependencies: '@date-fns/tz': 1.2.0 '@dnd-kit/core': 6.0.8(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -6374,7 +6601,7 @@ snapshots: date-fns: 4.1.0 dequal: 2.0.3 md5: 2.3.0 - next: 15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) + next: 15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4) object-to-formdata: 4.5.1 payload: 3.59.1(graphql@16.11.0)(typescript@5.7.3) qs-esm: 7.0.2 @@ -6811,6 +7038,75 @@ snapshots: dependencies: tslib: 2.8.1 + '@tailwindcss/node@4.1.16': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.18.3 + jiti: 2.6.1 + lightningcss: 1.30.2 + magic-string: 0.30.19 + source-map-js: 1.2.1 + tailwindcss: 4.1.16 + + '@tailwindcss/oxide-android-arm64@4.1.16': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.1.16': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.1.16': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.1.16': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.16': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.1.16': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.1.16': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.1.16': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.1.16': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.1.16': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.16': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.1.16': + optional: true + + '@tailwindcss/oxide@4.1.16': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.1.16 + '@tailwindcss/oxide-darwin-arm64': 4.1.16 + '@tailwindcss/oxide-darwin-x64': 4.1.16 + '@tailwindcss/oxide-freebsd-x64': 4.1.16 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.16 + '@tailwindcss/oxide-linux-arm64-gnu': 4.1.16 + '@tailwindcss/oxide-linux-arm64-musl': 4.1.16 + '@tailwindcss/oxide-linux-x64-gnu': 4.1.16 + '@tailwindcss/oxide-linux-x64-musl': 4.1.16 + '@tailwindcss/oxide-wasm32-wasi': 4.1.16 + '@tailwindcss/oxide-win32-arm64-msvc': 4.1.16 + '@tailwindcss/oxide-win32-x64-msvc': 4.1.16 + + '@tailwindcss/postcss@4.1.16': + dependencies: + '@alloc/quick-lru': 5.2.0 + '@tailwindcss/node': 4.1.16 + '@tailwindcss/oxide': 4.1.16 + postcss: 8.5.6 + tailwindcss: 4.1.16 + '@testing-library/dom@10.4.1': dependencies: '@babel/code-frame': 7.27.1 @@ -6932,15 +7228,15 @@ snapshots: '@types/uuid@10.0.0': {} - '@typescript-eslint/eslint-plugin@8.46.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint@9.37.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.46.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.46.1(eslint@9.37.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.46.1 - '@typescript-eslint/type-utils': 8.46.1(eslint@9.37.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.46.1(eslint@9.37.0)(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) + '@typescript-eslint/utils': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.46.1 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -6949,14 +7245,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3)': + '@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.46.1 '@typescript-eslint/types': 8.46.1 '@typescript-eslint/typescript-estree': 8.46.1(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.46.1 debug: 4.4.3 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -6979,13 +7275,13 @@ snapshots: dependencies: typescript: 5.7.3 - '@typescript-eslint/type-utils@8.46.1(eslint@9.37.0)(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.46.1 '@typescript-eslint/typescript-estree': 8.46.1(typescript@5.7.3) - '@typescript-eslint/utils': 8.46.1(eslint@9.37.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) debug: 4.4.3 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: @@ -7009,13 +7305,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.46.1(eslint@9.37.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.46.1 '@typescript-eslint/types': 8.46.1 '@typescript-eslint/typescript-estree': 8.46.1(typescript@5.7.3) - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -7084,7 +7380,7 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitejs/plugin-react@4.5.2(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3))': + '@vitejs/plugin-react@4.5.2(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3))': dependencies: '@babel/core': 7.28.4 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.4) @@ -7092,7 +7388,7 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.11 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) + vite: 7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) transitivePeerDependencies: - supports-color @@ -7104,13 +7400,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.3(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3))': + '@vitest/mocker@3.2.3(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3))': dependencies: '@vitest/spy': 3.2.3 estree-walker: 3.0.3 magic-string: 0.30.19 optionalDependencies: - vite: 7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) + vite: 7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) '@vitest/pretty-format@3.2.3': dependencies: @@ -7402,6 +7698,10 @@ snapshots: ci-info@4.3.1: {} + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 + client-only@0.0.1: {} clsx@2.1.1: {} @@ -7564,6 +7864,15 @@ snapshots: transitivePeerDependencies: - supports-color + drizzle-kit@0.31.6: + dependencies: + '@drizzle-team/brocli': 0.10.2 + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.25.11 + esbuild-register: 3.6.0(esbuild@0.25.11) + transitivePeerDependencies: + - supports-color + drizzle-orm@0.44.2(@types/pg@8.10.2)(pg@8.16.3): optionalDependencies: '@types/pg': 8.10.2 @@ -7583,6 +7892,11 @@ snapshots: dependencies: once: 1.4.0 + enhanced-resolve@5.18.3: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.0 + entities@6.0.1: {} error-ex@1.3.4: @@ -7786,19 +8100,19 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-next@15.4.4(eslint@9.37.0)(typescript@5.7.3): + eslint-config-next@15.4.4(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3): dependencies: '@next/eslint-plugin-next': 15.4.4 '@rushstack/eslint-patch': 1.14.0 - '@typescript-eslint/eslint-plugin': 8.46.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint@9.37.0)(typescript@5.7.3) - '@typescript-eslint/parser': 8.46.1(eslint@9.37.0)(typescript@5.7.3) - eslint: 9.37.0 + '@typescript-eslint/eslint-plugin': 8.46.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) + '@typescript-eslint/parser': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) + eslint: 9.37.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.37.0) - eslint-plugin-react: 7.37.5(eslint@9.37.0) - eslint-plugin-react-hooks: 5.2.0(eslint@9.37.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0(jiti@2.6.1)) + eslint-plugin-jsx-a11y: 6.10.2(eslint@9.37.0(jiti@2.6.1)) + eslint-plugin-react: 7.37.5(eslint@9.37.0(jiti@2.6.1)) + eslint-plugin-react-hooks: 5.2.0(eslint@9.37.0(jiti@2.6.1)) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: @@ -7814,33 +8128,33 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.3 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) get-tsconfig: 4.12.0 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.46.1(eslint@9.37.0)(typescript@5.7.3) - eslint: 9.37.0 + '@typescript-eslint/parser': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) + eslint: 9.37.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -7849,9 +8163,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.37.0(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -7863,13 +8177,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.46.1(eslint@9.37.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.46.1(eslint@9.37.0(jiti@2.6.1))(typescript@5.7.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@9.37.0): + eslint-plugin-jsx-a11y@6.10.2(eslint@9.37.0(jiti@2.6.1)): dependencies: aria-query: 5.3.2 array-includes: 3.1.9 @@ -7879,7 +8193,7 @@ snapshots: axobject-query: 4.1.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -7888,11 +8202,11 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-react-hooks@5.2.0(eslint@9.37.0): + eslint-plugin-react-hooks@5.2.0(eslint@9.37.0(jiti@2.6.1)): dependencies: - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) - eslint-plugin-react@7.37.5(eslint@9.37.0): + eslint-plugin-react@7.37.5(eslint@9.37.0(jiti@2.6.1)): dependencies: array-includes: 3.1.9 array.prototype.findlast: 1.2.5 @@ -7900,7 +8214,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 9.37.0 + eslint: 9.37.0(jiti@2.6.1) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -7923,9 +8237,9 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.37.0: + eslint@9.37.0(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 '@eslint/config-helpers': 0.4.0 @@ -7960,6 +8274,8 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.6.1 transitivePeerDependencies: - supports-color @@ -8150,6 +8466,8 @@ snapshots: gopd@1.2.0: {} + graceful-fs@4.2.11: {} + graphemer@1.4.0: {} graphql-http@1.22.4(graphql@16.11.0): @@ -8405,6 +8723,8 @@ snapshots: has-symbols: 1.1.0 set-function-name: 2.0.2 + jiti@2.6.1: {} + jose@5.9.6: {} joycon@3.1.1: {} @@ -8508,6 +8828,55 @@ snapshots: dependencies: isomorphic.js: 0.2.5 + lightningcss-android-arm64@1.30.2: + optional: true + + lightningcss-darwin-arm64@1.30.2: + optional: true + + lightningcss-darwin-x64@1.30.2: + optional: true + + lightningcss-freebsd-x64@1.30.2: + optional: true + + lightningcss-linux-arm-gnueabihf@1.30.2: + optional: true + + lightningcss-linux-arm64-gnu@1.30.2: + optional: true + + lightningcss-linux-arm64-musl@1.30.2: + optional: true + + lightningcss-linux-x64-gnu@1.30.2: + optional: true + + lightningcss-linux-x64-musl@1.30.2: + optional: true + + lightningcss-win32-arm64-msvc@1.30.2: + optional: true + + lightningcss-win32-x64-msvc@1.30.2: + optional: true + + lightningcss@1.30.2: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.30.2 + lightningcss-darwin-arm64: 1.30.2 + lightningcss-darwin-x64: 1.30.2 + lightningcss-freebsd-x64: 1.30.2 + lightningcss-linux-arm-gnueabihf: 1.30.2 + lightningcss-linux-arm64-gnu: 1.30.2 + lightningcss-linux-arm64-musl: 1.30.2 + lightningcss-linux-x64-gnu: 1.30.2 + lightningcss-linux-x64-musl: 1.30.2 + lightningcss-win32-arm64-msvc: 1.30.2 + lightningcss-win32-x64-msvc: 1.30.2 + lines-and-columns@1.2.4: {} locate-path@6.0.0: @@ -8532,6 +8901,10 @@ snapshots: dependencies: yallist: 3.1.1 + lucide-react@0.548.0(react@19.1.0): + dependencies: + react: 19.1.0 + lz-string@1.5.0: {} magic-string@0.30.19: @@ -8804,9 +9177,9 @@ snapshots: natural-compare@1.4.0: {} - next@15.4.4(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4): + next@15.4.7(@babel/core@7.28.4)(@playwright/test@1.54.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4): dependencies: - '@next/env': 15.4.4 + '@next/env': 15.4.7 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001750 postcss: 8.4.31 @@ -8814,14 +9187,14 @@ snapshots: react-dom: 19.1.0(react@19.1.0) styled-jsx: 5.1.6(@babel/core@7.28.4)(react@19.1.0) optionalDependencies: - '@next/swc-darwin-arm64': 15.4.4 - '@next/swc-darwin-x64': 15.4.4 - '@next/swc-linux-arm64-gnu': 15.4.4 - '@next/swc-linux-arm64-musl': 15.4.4 - '@next/swc-linux-x64-gnu': 15.4.4 - '@next/swc-linux-x64-musl': 15.4.4 - '@next/swc-win32-arm64-msvc': 15.4.4 - '@next/swc-win32-x64-msvc': 15.4.4 + '@next/swc-darwin-arm64': 15.4.7 + '@next/swc-darwin-x64': 15.4.7 + '@next/swc-linux-arm64-gnu': 15.4.7 + '@next/swc-linux-arm64-musl': 15.4.7 + '@next/swc-linux-x64-gnu': 15.4.7 + '@next/swc-linux-x64-musl': 15.4.7 + '@next/swc-win32-arm64-msvc': 15.4.7 + '@next/swc-win32-x64-msvc': 15.4.7 '@playwright/test': 1.54.1 sass: 1.77.4 sharp: 0.34.4 @@ -9626,6 +9999,12 @@ snapshots: tabbable@6.2.0: {} + tailwind-merge@3.3.1: {} + + tailwindcss@4.1.16: {} + + tapable@2.3.0: {} + thread-stream@3.1.0: dependencies: real-require: 0.2.0 @@ -9722,6 +10101,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + tw-animate-css@1.4.0: {} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -9857,13 +10238,13 @@ snapshots: '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 - vite-node@3.2.3(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3): + vite-node@3.2.3(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) + vite: 7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) transitivePeerDependencies: - '@types/node' - jiti @@ -9878,18 +10259,18 @@ snapshots: - tsx - yaml - vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3)): + vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3)): dependencies: debug: 4.4.3 globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.7.3) optionalDependencies: - vite: 7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) + vite: 7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) transitivePeerDependencies: - supports-color - typescript - vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3): + vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3): dependencies: esbuild: 0.25.11 fdir: 6.5.0(picomatch@4.0.3) @@ -9900,14 +10281,16 @@ snapshots: optionalDependencies: '@types/node': 22.18.10 fsevents: 2.3.3 + jiti: 2.6.1 + lightningcss: 1.30.2 sass: 1.77.4 tsx: 4.20.3 - vitest@3.2.3(@types/debug@4.1.12)(@types/node@22.18.10)(jsdom@26.1.0)(sass@1.77.4)(tsx@4.20.3): + vitest@3.2.3(@types/debug@4.1.12)(@types/node@22.18.10)(jiti@2.6.1)(jsdom@26.1.0)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(vite@7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3)) + '@vitest/mocker': 3.2.3(vite@7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.3 '@vitest/snapshot': 3.2.3 @@ -9925,8 +10308,8 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.10(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) - vite-node: 3.2.3(@types/node@22.18.10)(sass@1.77.4)(tsx@4.20.3) + vite: 7.1.10(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) + vite-node: 3.2.3(@types/node@22.18.10)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.77.4)(tsx@4.20.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 diff --git a/postcss.config.mjs b/postcss.config.mjs new file mode 100644 index 0000000..61e3684 --- /dev/null +++ b/postcss.config.mjs @@ -0,0 +1,7 @@ +const config = { + plugins: { + "@tailwindcss/postcss": {}, + }, +}; + +export default config; diff --git a/public/images/icon-favicon.png b/public/images/icon-favicon.png new file mode 100644 index 0000000..46c342a Binary files /dev/null and b/public/images/icon-favicon.png differ diff --git a/public/images/icon.svg b/public/images/icon.svg new file mode 100644 index 0000000..bf09fb1 --- /dev/null +++ b/public/images/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/public/images/logo.webp b/public/images/logo.webp new file mode 100644 index 0000000..f55024c Binary files /dev/null and b/public/images/logo.webp differ diff --git a/src/app/(frontend)/layout.tsx b/src/app/(frontend)/layout.tsx index 6e56b43..c655e89 100644 --- a/src/app/(frontend)/layout.tsx +++ b/src/app/(frontend)/layout.tsx @@ -10,9 +10,9 @@ export default async function RootLayout(props: { children: React.ReactNode }) { const { children } = props; return ( - - -
{children}
+ + +
{children}
); diff --git a/src/app/(frontend)/page.tsx b/src/app/(frontend)/page.tsx index f97270a..282fd87 100644 --- a/src/app/(frontend)/page.tsx +++ b/src/app/(frontend)/page.tsx @@ -1,39 +1,37 @@ -import { headers as getHeaders } from "next/headers.js"; import Image from "next/image"; -import { getPayload } from "payload"; import React from "react"; -import { fileURLToPath } from "url"; import config from "@/payload.config"; import "./styles.css"; export default async function HomePage() { - const headers = await getHeaders(); + // const headers = await getHeaders(); const payloadConfig = await config; - const payload = await getPayload({ config: payloadConfig }); - const { user } = await payload.auth({ headers }); + // const payload = await getPayload({ config: payloadConfig }); + // const { user } = await payload.auth({ headers }); - const fileURL = `webstorm://file/${fileURLToPath(import.meta.url)}`; + // const fileURL = `webstorm://file/${fileURLToPath(import.meta.url)}`; return ( -
-
+
+
Payload Logo -

Polaris Task Force

+

Polaris Task Force

{/*{!user &&

Welcome to your new project.

} {user &&

Welcome back, {user.email}

}*/} -

This site is under construction.

-
+

This site is under construction.

+
- {/*
+ {/*

Update this page by editing

app/(frontend)/page.tsx diff --git a/src/app/(frontend)/styles.css b/src/app/(frontend)/styles.css index d95853e..2903241 100644 --- a/src/app/(frontend)/styles.css +++ b/src/app/(frontend)/styles.css @@ -1,164 +1,236 @@ +@import "tailwindcss"; +@import "tw-animate-css"; +/* +---break--- +*/ +@custom-variant dark (&:is(.dark *)); + +/* +---break--- +*/ + +@theme inline { + + --radius-sm: calc(var(--radius) - 4px); + + --radius-md: calc(var(--radius) - 2px); + + --radius-lg: var(--radius); + + --radius-xl: calc(var(--radius) + 4px); + + --color-background: var(--background); + + --color-foreground: var(--foreground); + + --color-card: var(--card); + + --color-card-foreground: var(--card-foreground); + + --color-popover: var(--popover); + + --color-popover-foreground: var(--popover-foreground); + + --color-primary: var(--primary); + + --color-primary-foreground: var(--primary-foreground); + + --color-secondary: var(--secondary); + + --color-secondary-foreground: var(--secondary-foreground); + + --color-muted: var(--muted); + + --color-muted-foreground: var(--muted-foreground); + + --color-accent: var(--accent); + + --color-accent-foreground: var(--accent-foreground); + + --color-destructive: var(--destructive); + + --color-border: var(--border); + + --color-input: var(--input); + + --color-ring: var(--ring); + + --color-chart-1: var(--chart-1); + + --color-chart-2: var(--chart-2); + + --color-chart-3: var(--chart-3); + + --color-chart-4: var(--chart-4); + + --color-chart-5: var(--chart-5); + + --color-sidebar: var(--sidebar); + + --color-sidebar-foreground: var(--sidebar-foreground); + + --color-sidebar-primary: var(--sidebar-primary); + + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + + --color-sidebar-accent: var(--sidebar-accent); + + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + + --color-sidebar-border: var(--sidebar-border); + + --color-sidebar-ring: var(--sidebar-ring); +} + +/* +---break--- +*/ + :root { - --font-mono: 'Roboto Mono', monospace; + + --radius: 0.625rem; + + --background: oklch(1 0 0); + + --foreground: oklch(0.145 0 0); + + --card: oklch(1 0 0); + + --card-foreground: oklch(0.145 0 0); + + --popover: oklch(1 0 0); + + --popover-foreground: oklch(0.145 0 0); + + --primary: oklch(0.205 0 0); + + --primary-foreground: oklch(0.985 0 0); + + --secondary: oklch(0.97 0 0); + + --secondary-foreground: oklch(0.205 0 0); + + --muted: oklch(0.97 0 0); + + --muted-foreground: oklch(0.556 0 0); + + --accent: oklch(0.97 0 0); + + --accent-foreground: oklch(0.205 0 0); + + --destructive: oklch(0.577 0.245 27.325); + + --border: oklch(0.922 0 0); + + --input: oklch(0.922 0 0); + + --ring: oklch(0.708 0 0); + + --chart-1: oklch(0.646 0.222 41.116); + + --chart-2: oklch(0.6 0.118 184.704); + + --chart-3: oklch(0.398 0.07 227.392); + + --chart-4: oklch(0.828 0.189 84.429); + + --chart-5: oklch(0.769 0.188 70.08); + + --sidebar: oklch(0.985 0 0); + + --sidebar-foreground: oklch(0.145 0 0); + + --sidebar-primary: oklch(0.205 0 0); + + --sidebar-primary-foreground: oklch(0.985 0 0); + + --sidebar-accent: oklch(0.97 0 0); + + --sidebar-accent-foreground: oklch(0.205 0 0); + + --sidebar-border: oklch(0.922 0 0); + + --sidebar-ring: oklch(0.708 0 0); } -* { - box-sizing: border-box; +/* +---break--- +*/ + +.dark { + + --background: oklch(0.145 0 0); + + --foreground: oklch(0.985 0 0); + + --card: oklch(0.205 0 0); + + --card-foreground: oklch(0.985 0 0); + + --popover: oklch(0.205 0 0); + + --popover-foreground: oklch(0.985 0 0); + + --primary: oklch(0.922 0 0); + + --primary-foreground: oklch(0.205 0 0); + + --secondary: oklch(0.269 0 0); + + --secondary-foreground: oklch(0.985 0 0); + + --muted: oklch(0.269 0 0); + + --muted-foreground: oklch(0.708 0 0); + + --accent: oklch(0.269 0 0); + + --accent-foreground: oklch(0.985 0 0); + + --destructive: oklch(0.704 0.191 22.216); + + --border: oklch(1 0 0 / 10%); + + --input: oklch(1 0 0 / 15%); + + --ring: oklch(0.556 0 0); + + --chart-1: oklch(0.488 0.243 264.376); + + --chart-2: oklch(0.696 0.17 162.48); + + --chart-3: oklch(0.769 0.188 70.08); + + --chart-4: oklch(0.627 0.265 303.9); + + --chart-5: oklch(0.645 0.246 16.439); + + --sidebar: oklch(0.205 0 0); + + --sidebar-foreground: oklch(0.985 0 0); + + --sidebar-primary: oklch(0.488 0.243 264.376); + + --sidebar-primary-foreground: oklch(0.985 0 0); + + --sidebar-accent: oklch(0.269 0 0); + + --sidebar-accent-foreground: oklch(0.985 0 0); + + --sidebar-border: oklch(1 0 0 / 10%); + + --sidebar-ring: oklch(0.556 0 0); } -html { - font-size: 18px; - line-height: 32px; +/* +---break--- +*/ - background: rgb(0, 0, 0); - -webkit-font-smoothing: antialiased; -} - -html, -body, -#app { - height: 100%; -} - -body { - font-family: system-ui; - font-size: 18px; - line-height: 32px; - - margin: 0; - color: rgb(1000, 1000, 1000); - - @media (max-width: 1024px) { - font-size: 15px; - line-height: 24px; - } -} - -img { - max-width: 100%; - height: auto; - display: block; -} - -h1 { - margin: 40px 0; - font-size: 64px; - line-height: 70px; - font-weight: bold; - - @media (max-width: 1024px) { - margin: 24px 0; - font-size: 42px; - line-height: 42px; - } - - @media (max-width: 768px) { - font-size: 38px; - line-height: 38px; - } - - @media (max-width: 400px) { - font-size: 32px; - line-height: 32px; - } -} - -p { - margin: 24px 0; - - @media (max-width: 1024px) { - margin: calc(var(--base) * 0.75) 0; - } -} - -a { - color: currentColor; - - &:focus { - opacity: 0.8; - outline: none; - } - - &:active { - opacity: 0.7; - outline: none; - } -} - -svg { - vertical-align: middle; -} - -.home { - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - height: 100vh; - padding: 45px; - max-width: 1024px; - margin: 0 auto; - overflow: hidden; - - @media (max-width: 400px) { - padding: 24px; - } - - .content { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - flex-grow: 1; - - h1 { - text-align: center; - } - } - - .links { - display: flex; - align-items: center; - gap: 12px; - - a { - text-decoration: none; - padding: 0.25rem 0.5rem; - border-radius: 4px; - } - - .admin { - color: rgb(0, 0, 0); - background: rgb(1000, 1000, 1000); - border: 1px solid rgb(0, 0, 0); - } - - .docs { - color: rgb(1000, 1000, 1000); - background: rgb(0, 0, 0); - border: 1px solid rgb(1000, 1000, 1000); - } - } - - .footer { - display: flex; - align-items: center; - gap: 8px; - - @media (max-width: 1024px) { - flex-direction: column; - gap: 6px; - } - - p { - margin: 0; - } - - .codeLink { - text-decoration: none; - padding: 0 0.5rem; - background: rgb(60, 60, 60); - border-radius: 4px; - } - } +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } } diff --git a/src/app/(payload)/admin/importMap.js b/src/app/(payload)/admin/importMap.js index 5bc8ec3..0a3a717 100644 --- a/src/app/(payload)/admin/importMap.js +++ b/src/app/(payload)/admin/importMap.js @@ -21,6 +21,10 @@ import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93 import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' +import { default as default_2d468cc5cf0b647ffca3201592c20825 } from '@/components/static/WarningMessage' +import { default as default_508743824696caae2894ebf34c2e68bb } from '@/components/graphics/AppIcon' +import { default as default_e752fee78378294ff03f91dba0a75a04 } from '@/components/graphics/AppLogo' +import { default as default_05548cb43495e62d80b80ec4d9f0f7e9 } from '@/components/static/BeforeDashboardText' export const importMap = { "@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e, @@ -45,5 +49,9 @@ export const importMap = { "@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 + "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, + "@/components/static/WarningMessage#default": default_2d468cc5cf0b647ffca3201592c20825, + "@/components/graphics/AppIcon#default": default_508743824696caae2894ebf34c2e68bb, + "@/components/graphics/AppLogo#default": default_e752fee78378294ff03f91dba0a75a04, + "@/components/static/BeforeDashboardText#default": default_05548cb43495e62d80b80ec4d9f0f7e9 } diff --git a/src/app/(payload)/custom.scss b/src/app/(payload)/custom.scss index e69de29..ead5dda 100644 --- a/src/app/(payload)/custom.scss +++ b/src/app/(payload)/custom.scss @@ -0,0 +1,25 @@ +@layer theme { + @import 'tailwindcss/theme.css'; +} + +@layer base { + .twp { + @import 'tailwindcss/preflight.css'; + } + + .twp.no-twp { + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + all: revert-layer; + } + } +} + +@layer components; + +@layer utilities { + @import 'tailwindcss/utilities.css'; +} \ No newline at end of file diff --git a/src/assets/images/icon-favicon.png b/src/assets/images/icon-favicon.png new file mode 100644 index 0000000..46c342a Binary files /dev/null and b/src/assets/images/icon-favicon.png differ diff --git a/src/assets/images/icon.svg b/src/assets/images/icon.svg new file mode 100644 index 0000000..bf09fb1 --- /dev/null +++ b/src/assets/images/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/logo.webp b/src/assets/images/logo.webp new file mode 100644 index 0000000..f55024c Binary files /dev/null and b/src/assets/images/logo.webp differ diff --git a/src/collections/Media.ts b/src/collections/Media.ts index cdfafb7..491a0af 100644 --- a/src/collections/Media.ts +++ b/src/collections/Media.ts @@ -9,7 +9,6 @@ export const Media: CollectionConfig = { { name: "alt", type: "text", - required: true, }, ], upload: true, diff --git a/src/collections/game/GameRules.ts b/src/collections/game/GameRules.ts new file mode 100644 index 0000000..29274f9 --- /dev/null +++ b/src/collections/game/GameRules.ts @@ -0,0 +1,22 @@ +import { GlobalConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const GameRules: GlobalConfig = { + slug: "game-rules", + access: { + read: isDeveloper, + update: isDeveloper, + }, + fields: [ + { + name: "mainCurrency", + type: "relationship", + relationTo: "resources", + required: true, + admin: { + description: + 'The base currency ("gold standard") used by all factions to pay for goods and services.', + }, + }, + ], +}; diff --git a/src/collections/intelligence/Campaigns.ts b/src/collections/intelligence/Campaigns.ts new file mode 100644 index 0000000..963d6ea --- /dev/null +++ b/src/collections/intelligence/Campaigns.ts @@ -0,0 +1,61 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Campaigns: CollectionConfig = { + slug: "campaigns", + admin: { + group: "Intelligence", + useAsTitle: "name", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + unique: true, + }, + { + name: "summary", + type: "textarea", + required: true, + defaultValue: "An Arma 3 campaign.", + }, + { + name: "status", + type: "select", + options: [ + { + label: "Concept", + value: "concept", + }, + { + label: "In Progress", + value: "inProgress", + }, + { + label: "Completed", + value: "completed", + }, + ], + required: true, + defaultValue: "concept", + }, + { + name: "description", + type: "richText", + }, + { + name: "startDate", + type: "date", + }, + { + name: "endDate", + type: "date", + }, + ], +}; diff --git a/src/collections/intelligence/Factions.ts b/src/collections/intelligence/Factions.ts new file mode 100644 index 0000000..9e719f1 --- /dev/null +++ b/src/collections/intelligence/Factions.ts @@ -0,0 +1,74 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Factions: CollectionConfig = { + slug: "factions", + admin: { + group: "Intelligence", + useAsTitle: "name", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + unique: true, + }, + { + name: "type", + type: "select", + options: [ + { + label: "Major Faction", + value: "majorFaction", + }, + { + label: "Minor Faction", + value: "minorFaction", + }, + { + label: "Corporation", + value: "corporation", + }, + { + label: "Special", + value: "special", + }, + ], + required: true, + defaultValue: "minorFaction", + }, + { + name: "description", + type: "richText", + }, + { + name: "playableFaction", + type: "checkbox", + admin: { + description: + "Whether or not this faction is playable. Some factions may be specifically intended to be unplayable based on narrative requirements.", + }, + }, + { + name: "startingFaction", + type: "checkbox", + admin: { + description: + "Whether or not this faction is/was available as a starting faction at the beginning of the campaign.", + }, + }, + { + name: "associatedCampaigns", + type: "relationship", + relationTo: "campaigns", + hasMany: true, + }, + ], +}; diff --git a/src/collections/intelligence/Missions.ts b/src/collections/intelligence/Missions.ts new file mode 100644 index 0000000..fe7af24 --- /dev/null +++ b/src/collections/intelligence/Missions.ts @@ -0,0 +1,637 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Missions: CollectionConfig = { + slug: "missions", + admin: { + group: "Intelligence", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "codeName", + type: "text", + admin: { + description: + 'A "code name" provides a unique way to reference this mission beyond just the mission\'s name. For example, a mission called "Operation Dragon Break" could be codenamed "OP:DRGBRK".', + }, + required: true, + unique: true, + }, + { + name: "summary", + type: "textarea", + admin: { + description: + "A summary of the mission. This is not the same as a briefing; instead, it describes the mission's theme and concept to the unit as a whole.", + }, + required: true, + }, + { + name: "operationType", + type: "select", + options: [ + { + label: "Main Operation", + value: "main", + }, + { + label: "Side Operation", + value: "side", + }, + { + label: "External Operation", + value: "external", + }, + ], + filterOptions: ({ req }) => { + return [ + { + label: "Side Operation", + value: "side", + }, + { + label: "External Operation", + value: "external", + }, + ...(isDeveloper({ req: req }) + ? [ + { + label: "Main Operation", + value: "main", + }, + ] + : []), + ]; + }, + defaultValue: ({ req }) => (isDeveloper({ req: req }) ? "main" : "side"), + required: true, + }, + { + type: "tabs", + tabs: [ + { + label: "Mission Configuration", + description: + "Essential mission configuration, like the type of mission, what map it is played on, who authored it, etc.", + fields: [ + { + name: "classification", + type: "group", + fields: [ + { + name: "map", + type: "relationship", + relationTo: "maps", + required: true, + }, + { + name: "missionType", + type: "select", + options: ["Zeus", "PvE", "PvP", "PvPvE", "Training", "Special"], + defaultValue: "Zeus", + required: true, + }, + { + name: "campaign", + type: "relationship", + relationTo: "campaigns", + required: true, + }, + { + name: "customScripts", + type: "checkbox", + label: "Contains Custom Scripts", + admin: { + description: "This mission contains custom SQF scripts.", + }, + }, + { + name: "startDateTime", + type: "date", + admin: { + date: { + pickerAppearance: "dayAndTime", + }, + }, + defaultValue: () => { + const today = new Date(); + const day = today.getDay(); + const diff = (6 - day) % 7; + const nextSaturday = new Date(today); + nextSaturday.setDate(today.getDate() + diff + 7); + nextSaturday.setHours(20, 0, 0, 0); + return nextSaturday; + }, + required: true, + }, + { + name: "estimatedDuration", + type: "number", + label: "Estimated Duration (in minutes)", + defaultValue: 60 * 4, // Usually about 4 hours + required: true, + + }, + ], + }, + { + name: "ownershipAndStatus", + type: "group", + label: "Ownership & Status", + fields: [ + { + name: "authors", + type: "relationship", + relationTo: "users", + hasMany: true, + required: true, + }, + { + name: "zeus", + type: "relationship", + relationTo: "users", + hasMany: true, + required: false, + }, + { + name: "status", + type: "select", + options: [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled", + ], + defaultValue: "Concept", + required: true, + }, + { + name: "visibility", + type: "select", + options: [ + { + label: "Entire Unit", + value: "unit", + }, + { + label: "Leadership & Intel Only", + value: "leadership", + }, + { + label: "Intel Only", + value: "intel", + }, + { + label: "Private", + value: "private", + }, + ], + defaultValue: "leadership", + required: true, + }, + ], + }, + { + name: "missionRoles", + type: "group", + fields: [ + { + name: "maxPlayers", + type: "number", + defaultValue: 32, + max: 32, + required: true, + }, + { + name: "providedRoles", + type: "array", + label: "Roles Provided", + fields: [ + { + name: "roleName", + type: "text", + required: true, + }, + { + name: "missionCritical", + type: "checkbox", + admin: { + description: + "If true, this mission cannot be executed without someone fulfilling this role.", + }, + defaultValue: true, + }, + { + name: "requiredMos", + type: "relationship", + hasMany: true, + relationTo: "qualifications", + label: "Required MOS/Qualifications", + admin: { + description: + "This role can only be fulfilled by someone possessing these qualifications.", + }, + }, + { + name: "minimumRank", + type: "relationship", + relationTo: "ranks", + admin: { + description: + "This role can only be fulfilled by someone of this rank or higher.", + }, + }, + ], + }, + { + name: "notes", + type: "textarea", + }, + ], + }, + ], + }, + { + label: "Narrative", + description: + "Narrative details, like the mission briefing, objectives, civilian presence, RoEs, etc.", + fields: [ + { + name: "briefing", + type: "array", + maxRows: 8, + labels: { + plural: "Briefing Entries", + singular: "Briefing Entry", + }, + fields: [ + { + name: "sectionName", + type: "text", + required: true, + }, + { + name: "details", + type: "richText", + required: true, + }, + ], + defaultValue: [ + { + sectionName: "Situation", + }, + { + sectionName: "Mission", + }, + { + sectionName: "Execution", + }, + { + sectionName: "Signals", + }, + ], + }, + { + name: "missionObjectives", + type: "array", + fields: [ + { + name: "title", + type: "text", + required: true, + }, + { + name: "description", + type: "textarea", + }, + { + name: "missionCritical", + admin: { + description: + "If true, this mission will be considered a failure if this objective is failed.", + }, + type: "checkbox", + defaultValue: true, + }, + { + name: "successOrFailConditions", + type: "textarea", + label: "Success / Fail Conditions", + }, + ], + }, + { + name: "civilianPresence", + type: "select", + options: ["None", "Low", "Medium", "High"], + defaultValue: "None", + }, + { + name: "factionsInvolved", + type: "array", + fields: [ + { + name: "factionName", + type: "text", + required: true, + }, + { + name: "threatLevel", + type: "select", + options: [ + { + label: "Allied", + value: "ally", + }, + { + label: "Friendly", + value: "friendly", + }, + { + label: "Neutral", + value: "neutral", + }, + { + label: "Hostile", + value: "hostile", + }, + ], + defaultValue: "hostile", + required: true, + }, + ], + }, + ], + }, + { + label: "Dedicated Server", + description: "Server-specific details, like the IP, port, mission file, mod list, etc.", + fields: [ + { + name: "gameDetails", + type: "group", + fields: [ + { + name: "serverDetails", + type: "group", + fields: [ + { + name: "serverIp", + type: "text", + label: "Server IP or Domain Name", + defaultValue: "arma.onyxsimple.com", + required: true, + }, + { + name: "serverPort", + type: "number", + defaultValue: 2302, + required: true, + }, + { + name: "serverPassword", + type: "text", + hidden: true, + defaultValue: "ptf313", + }, + ], + }, + { + name: "gameSetup", + type: "group", + fields: [ + { + name: "missionFile", + type: "upload", + relationTo: "mission-files", + required: true, + }, + { + name: "requiredMods", + type: "upload", + admin: { + description: + "This field is not required only because you may be running a vanilla gamemode. If you have any mods at all in your mission, you MUST include a mod list.", + }, + relationTo: "mod-lists", + }, + ], + }, + ], + }, + ], + }, + { + label: "Advanced Details", + description: + "Advanced mission details and configuration. Most of these fields are optional, but for those who want extra-detailed missions, this section is for you.", + fields: [ + { + name: "logisticsAndSupport", + type: "group", + label: "Logistics & Support", + admin: { + description: + "Mission requirements and conditions surrounding the deployment and use of logistics and support assets during the mission's runtime.", + }, + fields: [ + { + type: "row", + fields: [ + { + name: "insertion", + label: "Allowed/Provided Insertion Method(s)", + type: "select", + options: [ + { + label: "Helicopter", + value: "helicopter", + }, + { + label: "Aircraft", + value: "aircraft", + }, + { + label: "HALO / Paradrop", + value: "paradrop", + }, + { + label: "Boat", + value: "boat", + }, + { + label: "Car", + value: "car", + }, + { + label: "On Foot", + value: "onFoot", + }, + ], + hasMany: true, + }, + { + name: "extraction", + label: "Allowed/Provided Extraction Method(s)", + type: "select", + options: [ + { + label: "Helicopter", + value: "helicopter", + }, + { + label: "Aircraft", + value: "aircraft", + }, + { + label: "HALO / Paradrop", + value: "paradrop", + }, + { + label: "Boat", + value: "boat", + }, + { + label: "Car", + value: "car", + }, + { + label: "On Foot", + value: "onFoot", + }, + ], + hasMany: true, + }, + ], + }, + { + name: "assetsAvailable", + type: "array", + labels: { + plural: "Assets", + singular: "Asset", + }, + fields: [ + { + name: "assetType", + type: "text", + admin: { + description: + 'The name or type of the asset provided (e.g. "Artillery", "M1A1 Tank", "Fuel Truck", "Close Air Support", etc.)', + }, + required: true, + }, + { + name: "assetCount", + type: "text", + admin: { + description: + "If applicable, the number of this asset that will be available at the start of the mission.", + }, + }, + { + name: "doesRespawn", + type: "checkbox", + label: "Is Respawnable?", + admin: { + description: + "Whether or not this asset respawns during the mission, either automatically or manually via Zeus.", + }, + }, + { + name: "assetCallsign", + type: "text", + admin: { + description: + "If applicable, the callsign of this asset (such as an aicraft providing close air support.)", + }, + }, + ], + }, + ], + }, + { + name: "commsAndDocs", + type: "group", + label: "Comms & SOPs", + admin: { + description: + "Communications and Standard Operating Procedures specific to this mission.", + }, + fields: [ + { + name: "radioPlan", + type: "richText", + admin: { + description: + "A detailed description of how radios will be used during this operation, including signals, contingency plans, and other relevant details.", + }, + }, + { + name: "frequencies", + type: "array", + admin: { + description: + "A list and description of each of the radio frequencies used for this mission.", + }, + fields: [ + { + type: "row", + fields: [ + { + name: "frequency", + type: "number", + required: true, + }, + { + name: "channel", + type: "number", + admin: { + description: + "Must be provided if the frequency used requires a separate radio channel.", + }, + }, + ], + }, + { + name: "netName", + type: "text", + admin: { + description: + 'The name assigned to this frequency (+ channel.) Examples of names include "COMNET", "PLTNET", "CASNET", etc.', + }, + required: true, + }, + { + name: "freqUsage", + type: "textarea", + admin: { + description: + "An explanation of the expected usage and purpose of this radio net.", + }, + required: true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], +}; diff --git a/src/collections/intelligence/Technologies.ts b/src/collections/intelligence/Technologies.ts new file mode 100644 index 0000000..284ee29 --- /dev/null +++ b/src/collections/intelligence/Technologies.ts @@ -0,0 +1,136 @@ +import { CollectionConfig } from "payload"; +import { isAdmin } from "@/utils/access-control/isRole"; + +export const Technologies: CollectionConfig = { + slug: "technologies", + admin: { + group: "Intelligence", + useAsTitle: "name", + }, + access: { + create: isAdmin, + update: isAdmin, + delete: isAdmin, + read: isAdmin, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "type", + type: "select", + options: [ + { + label: "Asset", + value: "asset", + }, + { + label: "Upgrade", + value: "upgrade", + }, + ], + admin: { + description: + 'An "Asset" technology will unlock a new item, vehicle, gear piece, structure, etc. An "Upgrade" technology will unlock an improvement to an Asset, like faster build speed, more storage capacity, etc.', + }, + required: true, + defaultValue: "upgrade", + }, + { + name: "summary", + type: "textarea", + required: true, + }, + { + name: "description", + type: "richText", + }, + { + name: "requirements", + type: "group", + fields: [ + { + name: "intelligencePoints", + type: "number", + }, + { + name: "prerequisiteTechnologies", + type: "array", + fields: [ + { + type: "row", + fields: [ + { + name: "requiresAnd", + type: "group", + label: "Requires (AND)", + admin: { + description: + "ALL of these technologies MUST be unlocked before this one can be.", + }, + fields: [ + { + name: "technology", + type: "relationship", + relationTo: "technologies", + hasMany: true, + }, + ], + }, + { + name: "requiresOr", + type: "group", + label: "Requires (OR)", + admin: { + description: + "One or more of these technologies MUST be unlocked before this one can be.", + }, + fields: [ + { + name: "technology", + type: "relationship", + relationTo: "technologies", + hasMany: true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + name: "researchCosts", + type: "group", + fields: [ + { + type: "row", + fields: [ + { + name: "minimumResearchDuration", + type: "number", + admin: { + description: + "The minimum amount of time in minutes that it takes to research this technology. If no maximum duration is provided, this technology will be researched in an amount of time exactly equal to this number.", + }, + required: true, + defaultValue: 0, + }, + { + name: "maximumResearchDuration", + type: "number", + admin: { + description: + "The maximum amount of time in minutes that it takes to research this technology.", + }, + }, + ], + }, + ], + }, + ], +}; diff --git a/src/collections/logistics/Assets.ts b/src/collections/logistics/Assets.ts new file mode 100644 index 0000000..c22734e --- /dev/null +++ b/src/collections/logistics/Assets.ts @@ -0,0 +1,495 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Assets: CollectionConfig = { + slug: "assets", + admin: { + group: "Logistics", + useAsTitle: "name", + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + type: "tabs", + tabs: [ + { + label: "Real Data", + description: + "In-game technical data for this asset, like its config class name, the mod it belongs to, a preview thumbnail image, etc.", + fields: [ + { + name: "className", + type: "text", + required: true, + defaultValue: "", + }, + { + name: "assetType", + type: "select", + required: true, + options: [ + { + label: "Weapon", + value: "weapon", + }, + { + label: "Magazine", + value: "magazine", + }, + { + label: "Optic", + value: "optic", + }, + { + label: "Muzzle", + value: "muzzle", + }, + { + label: "Bipod", + value: "bipod", + }, + { + label: "Uniform", + value: "uniform", + }, + { + label: "Vest", + value: "vest", + }, + { + label: "Backpack", + value: "backpack", + }, + { + label: "Helmet", + value: "helmet", + }, + { + label: "Facewear", + value: "facewear", + }, + { + label: "NVG", + value: "nvg", + }, + { + label: "Radio", + value: "radio", + }, + { + label: "Medical", + value: "medical", + }, + { + label: "Tool", + value: "tool", + }, + { + label: "Explosive", + value: "explosive", + }, + { + label: "Miscellaneous", + value: "miscellaneous", + }, + ], + defaultValue: "weapon", + }, + { + name: "Weapon Configuration", + type: "group", + admin: { + condition: (data, siblingData) => siblingData.assetType === "weapon", + }, + fields: [ + { + name: "slotType", + type: "select", + options: [ + { + label: "Primary", + value: "primary", + }, + { + label: "Secondary", + value: "secondary", + }, + { + label: "Launcher", + value: "launcher", + }, + ], + }, + { + name: "compatibleMagazines", + type: "relationship", + relationTo: "assets", + hasMany: true, + filterOptions: { + assetType: { + equals: "magazine", + }, + }, + }, + { + name: "compatibleAttachments", + type: "relationship", + relationTo: "assets", + hasMany: true, + filterOptions: { + assetType: { + in: "optic,muzzle,bipod", + }, + }, + }, + ], + }, + { + name: "Nightvision Configuration", + type: "group", + admin: { + condition: (data, siblingData) => siblingData.assetType === "nvg", + }, + fields: [ + { + name: "nvgGeneration", + type: "select", + label: "NVG Generation", + options: [ + { + label: "Gen 1", + value: "gen1", + }, + { + label: "Gen 2", + value: "gen2", + }, + { + label: "Gen 3", + value: "gen3", + }, + ], + }, + { + name: "nvgHasThermals", + type: "checkbox", + label: "NVG Thermal Capability", + admin: { + description: + "Whether or not these night-vision goggles possess a thermal vision mode.", + }, + }, + ], + }, + { + name: "Container Configuration", + type: "group", + admin: { + condition: (data, siblingData) => + ["uniform", "vest", "backpack"].includes(siblingData.assetType), + }, + fields: [ + { + name: "capacityKg", + type: "number", + label: "Storage Capacity (kg.)", + }, + { + name: "weightKg", + type: "number", + label: "Weight (kg.)", + }, + ], + }, + { + name: "Magazine Configuration", + type: "group", + admin: { + condition: (data, siblingData) => siblingData.assetType === "magazine", + }, + fields: [ + { + name: "roundCapacity", + type: "number", + }, + { + name: "ammoType", + type: "text", + }, + { + name: "greenmagCompatible", + type: "checkbox", + admin: { + description: + "Whether or not this magazine is compatible with the GreenMag mod.", + }, + }, + ], + }, + { + name: "Asset Metadata", + type: "group", + fields: [ + { + name: "mod", + type: "text", + }, + { + name: "thumbnail", + type: "upload", + relationTo: "media", + }, + { + name: "gameDescription", + type: "textarea", + label: "In-Game Description", + }, + ], + }, + ], + }, + { + label: "Virtual Data", + description: + "Virtual data for this asset, like the factions that use it, its rarity and perceived value, trading and market flags, resources for crafting, etc.", + fields: [ + { + name: "tradeable", + type: "checkbox", + admin: { + description: + "Whether or not this asset can be traded on the market. If unchecked, the asset can never be bought or sold, only crafted or collected.", + }, + }, + { + name: "marketTrading", + type: "group", + label: "Market & Trading", + admin: { + condition: (data, siblingData) => siblingData.tradeable, + }, + fields: [ + { + name: "Rarity", + type: "select", + admin: { + description: + "The rarity of this item in the world of the active campaign. Rarity will be accounted for in market valuation and trading calculations.", + }, + options: [ + { + label: "Basic", + value: "basic", + }, + { + label: "Common", + value: "common", + }, + { + label: "Uncommon", + value: "uncommon", + }, + { + label: "Rare", + value: "rare", + }, + { + label: "Very Rare", + value: "veryRare", + }, + { + label: "Epic", + value: "epic", + }, + { + label: "Legendary", + value: "legendary", + }, + { + label: "Unique", + value: "unique", + }, + ], + }, + { + name: "perceivedValue", + type: "group", + admin: { + description: + 'The asset\'s "perceived value" when considered in market and trading calculations. Note that the "base" values are the "resting" valuations. Later calculations will increase and decrease the valuation based on this resting valuation, ultimately tending to remain within some percentage margin of this base price. Always and only considers the primary campaign currency in regard to price.', + }, + fields: [ + { + type: "row", + fields: [ + { + name: "baseBuyPrice", + type: "number", + }, + { + name: "baseSellPrice", + type: "number", + }, + ], + }, + ], + }, + ], + }, + { + name: "crafting", + type: "group", + fields: [ + { + name: "craftable", + type: "checkbox", + }, + { + name: "blueprintRequired", + type: "checkbox", + admin: { + description: + "This asset requires a blueprint to be crafted, otherwise it can only be obtained from scavenging and/or trading.", + }, + }, + { + name: "technologyRequired", + type: "relationship", + relationTo: "technologies", + hasMany: true, + admin: { + description: + "One or more technologies required before this weapon can be crafted.", + }, + }, + { + name: "technologyRequiredToUse", + type: "checkbox", + admin: { + description: + "If checked, this asset requires the above technologies or else cannot be used at all.", + }, + }, + { + name: "craftingData", + type: "group", + fields: [ + { + name: "inputs", + type: "array", + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + hasMany: true, + required: true, + }, + { + name: "quantity", + type: "number", + }, + { + name: "lended", + type: "checkbox", + admin: { + description: + 'If checked, this resource is "lended" to the crafting of this asset. Upon the crafting\'s completion, this resource is refunded to the unit.', + }, + }, + ], + }, + { + name: "requiresStructure", + type: "relationship", + relationTo: "structures", + hasMany: true, + }, + { + name: "craftingTimePerUnit", + type: "number", + label: "Crafting Time per Unit (minutes)", + required: true, + defaultValue: 1, + }, + { + name: "byproducts", + type: "array", + admin: { + description: + "Byproducts of the crafting process. For each unit crafted of this Asset, these byproducts are also created and added to the unit's resources.", + }, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + hasMany: true, + required: true, + }, + { + name: "quantity", + type: "number", + }, + ], + }, + { + name: "batchSize", + type: "number", + admin: { + description: + "An optional batch size. If provided, this number of this asset will be created upon crafting completion.", + }, + required: true, + defaultValue: 1, + }, + ], + }, + ], + }, + { + name: "relatedAssets", + type: "relationship", + relationTo: "assets", + hasMany: true, + admin: { + description: + "Suggested complements to this asset (for example, if the asset was a Bandage, some related assets could include an IV, blood bag, epinephrine, etc.)", + }, + }, + ], + }, + { + label: "Auditing", + description: "Auditing and moderation for this Asset.", + admin: { + condition: ({ user }) => isDeveloper({ req: { user: user } } as never), + }, + access: { + read: isDeveloper, + create: isDeveloper, + update: isDeveloper, + }, + fields: [ + { + name: "isLive", + type: "checkbox", + admin: { + description: + 'If checked, this item is approved and considered "live" (i.e. it will be considered in calculations and made available in-game.)', + }, + }, + { + name: "notes", + type: "richText", + }, + ], + }, + ], + }, + ], +}; diff --git a/src/collections/logistics/Resources.ts b/src/collections/logistics/Resources.ts new file mode 100644 index 0000000..cf43ebd --- /dev/null +++ b/src/collections/logistics/Resources.ts @@ -0,0 +1,260 @@ +import { CollectionConfig, PayloadRequest } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +const onlyIfNotPrimaryCurrency = async ({ req }: { req: PayloadRequest }) => { + if (isDeveloper({ req })) { + return true; + } + + try { + const gameRules = await req.payload.findGlobal({ + slug: "game-rules", + depth: 0, + }); + + const primaryCurrencyId = + typeof gameRules.mainCurrency === "object" + ? gameRules.mainCurrency?.id + : gameRules.mainCurrency; + + if (primaryCurrencyId) { + return { + id: { + not_equals: primaryCurrencyId, + }, + }; + } + } catch (_) { + // Fail silently and allow update if global rules cannot be fetched + } + + return true; +}; + +export const Resources: CollectionConfig = { + slug: "resources", + admin: { + useAsTitle: "name", + group: "Logistics", + }, + access: { + update: onlyIfNotPrimaryCurrency, + delete: onlyIfNotPrimaryCurrency, + }, + fields: [ + { + name: "NoEditWarning", + type: "ui", + admin: { + condition: (data) => data.showWarning, + components: { + Field: { + path: "@/components/static/WarningMessage", + serverProps: { + title: "This item is locked.", + message: + "This item is considered an essential application component and can only be edited by a developer.", + }, + }, + }, + disableListColumn: true, + }, + }, + { + label: "Identity", + type: "group", + fields: [ + { + name: "showWarning", + type: "checkbox", + virtual: true, + admin: { + hidden: true, + readOnly: true, + disableListColumn: true, + }, + hooks: { + afterRead: [ + async ({ data, req }) => { + const gameRules = await req.payload.findGlobal({ + slug: "game-rules", + depth: 0, + }); + + const primaryCurrencyId = + typeof gameRules.mainCurrency === "object" + ? gameRules.mainCurrency?.id + : gameRules.mainCurrency; + + if (primaryCurrencyId) { + return data?.id === primaryCurrencyId; + } + }, + ], + }, + }, + { + name: "name", + type: "text", + required: true, + admin: { + description: 'Human-readable name for resources (e.g., "Fuel").', + }, + }, + { + name: "codeName", + type: "text", + required: true, + admin: { + description: 'Internal ID for scripts (e.g., "res_fuel").', + }, + }, + { + name: "type", + type: "select", + required: true, + defaultValue: "physical", + options: [ + { + label: "Physical", + value: "physical", + }, + { + label: "Fluid", + value: "fluid", + }, + { + label: "Energy", + value: "energy", + }, + { + label: "Abstract", + value: "abstract", + }, + ], + }, + { + name: "description", + type: "richText", + admin: { + description: + "A description of the resource, including where it comes from, how it is used, and any lore-related details.", + }, + }, + { + name: "icon", + type: "upload", + relationTo: "media", + admin: { + description: + "While not required, an icon is absolutely recommended and will affect the way this resource is displayed in the application UI.", + }, + }, + { + name: "color", + type: "text", + admin: { + description: + "A HEX color code used by this resource in the application UI (e.g., progress bars, text highlighting, etc.)", + }, + }, + ], + }, + + { + label: "Economy", + type: "group", + fields: [ + { + name: "baseValue", + type: "number", + required: true, + defaultValue: 1, + admin: { + description: + 'The inherent "gold standard" value of one (1) unit of this resource. Used for calculating exchange rates and total asset worth.', + }, + }, + { + name: "tradeable", + type: "checkbox", + label: "Is Tradeable?", + admin: { + description: "Can this be bought and/or sold on the market?", + }, + }, + { + name: "rarity", + type: "select", + required: true, + defaultValue: "common", + options: [ + { + label: "Common", + value: "common", + }, + { + label: "Uncommon", + value: "uncommon", + }, + { + label: "Rare", + value: "rare", + }, + { + label: "Epic", + value: "epic", + }, + { + label: "Legendary", + value: "legendary", + }, + { + label: "Exotic", + value: "exotic", + }, + { + label: "Unique", + value: "unique", + }, + ], + }, + ], + }, + + { + label: "Measurement & Storage", + type: "group", + fields: [ + { + name: "unitOfMeasure", + type: "text", + required: true, + admin: { + description: + "The unit of measure for this resource in singular form (no plurals, e.g., liter, kg, point, unit, megawatt, person, etc.)", + }, + }, + { + name: "massPerUnit", + type: "number", + required: true, + defaultValue: 0, + admin: { + description: + 'The weight of one (1) unit (can be "0" for abstract resources like "Intel", "Labor", etc.) Critical for logistics transport calculations.', + }, + }, + { + name: "stackSize", + type: "number", + defaultValue: 1, + admin: { + description: + "Maximum amount that fits in a single standard cargo slot (if applicable.)", + }, + }, + ], + }, + ], +}; diff --git a/src/collections/logistics/Structures.ts b/src/collections/logistics/Structures.ts new file mode 100644 index 0000000..f8e6283 --- /dev/null +++ b/src/collections/logistics/Structures.ts @@ -0,0 +1,396 @@ +import { CollectionConfig } from "payload"; + +export const Structures: CollectionConfig = { + slug: "structures", + admin: { + useAsTitle: "name", + group: "Logistics", + }, + fields: [ + { + label: "Identity & Visuals", + type: "group", + fields: [ + { + name: "name", + type: "text", + required: true, + admin: { + description: 'The display name (e.g., "Forward Operating Base").', + }, + }, + { + name: "codeName", + type: "text", + required: true, + admin: { + description: 'Internal ID for scripts (e.g., "fob_alpha_tier1").', + }, + }, + { + name: "description", + type: "richText", + required: true, + admin: { + description: + "A detailed description of the structure, including details like tactical advantages, resource production, and/or world lore regarding this structure.", + }, + }, + { + name: "image", + type: "upload", + relationTo: "media", + admin: { + description: + "An image depicting the structure. While not required, it is highly recommended as the existence of an image will affect the layout of the structure's page on the front-end.", + }, + }, + { + name: "category", + type: "select", + required: true, + options: [ + { + label: "Logistics", + value: "logistics", + }, + { + label: "Military", + value: "military", + }, + { + label: "Civilian", + value: "civilian", + }, + ], + }, + ], + }, + + { + label: "Construction & Progression", + type: "group", + fields: [ + { + name: "materials", + type: "array", + required: true, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + required: true, + }, + { + name: "amount", + type: "number", + }, + ], + }, + { + name: "constructionTime", + type: "number", + required: true, + label: "Build Time (in game ticks)", + admin: { + description: "The number of ticks it takes to complete construction of this structure.", + }, + }, + { + name: "requiredTech", + type: "relationship", + relationTo: "technologies", + hasMany: true, + label: "Required Technology", + admin: { + description: "What research must be done before this can be built.", + }, + }, + { + name: "requiresUpgrade", + type: "checkbox", + admin: { + description: + "If true, this structure can only be constructed as the result of an upgrade to an existing structure. If false, this structure can be constructed independently of any other structure's upgrade tree, even if another structure can upgrade into this one.", + }, + }, + { + name: "upgradesInto", + type: "relationship", + relationTo: "structures", + admin: { + description: + 'When this structure is upgraded, it becomes this type of structure. Note that the costs of the new structure apply - if this field is set, the new structure\'s build costs will still be consumed when this building is upgraded. To make it cheaper to upgrade, lower the "Upgrade Cost Multiplier".', + }, + }, + { + name: "upgradeCostMultiplier", + type: "number", + defaultValue: 1, + admin: { + description: + "The multiplier applied to the base build cost of the structure being upgraded into. A value of one (1) means the cost will exactly equal the structure's normal build cost, while a value of zero (0) would make the upgrade entirely free, only taking up construction time instead.", + }, + }, + { + label: "Placement Rules", + type: "group", + fields: [ + { + name: "terrainType", + type: "select", + required: true, + options: [ + { + label: "Land", + value: "land", + }, + { + label: "Water", + value: "water", + }, + ], + }, + { + name: "resourcesInRange", + type: "array", + admin: { + description: + "What resources, if any, must be within a certain distance of this structure on placement.", + }, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + }, + { + name: "range", + type: "number", + }, + ], + }, + { + name: "structuresInRange", + type: "array", + admin: { + description: + "What structures, if any, must be within a certain distance of this structure on placement.", + }, + fields: [ + { + name: "structure", + type: "relationship", + relationTo: "structures", + }, + { + name: "range", + type: "number", + }, + ], + }, + ], + }, + ], + }, + + { + label: "Economy & Upkeep", + type: "group", + fields: [ + { + name: "upkeep", + type: "array", + admin: { + description: "Recurring costs to keep this structure online.", + }, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + }, + { + name: "amount", + type: "number", + admin: { + description: 'How much of this resource is consumed per "game tick" (every hour.)', + }, + }, + ], + }, + { + name: "sellPrice", + type: "number", + admin: { + description: + "A base price that this structure could sell for when fully operational. Leaving this empty will make this structure unsellable.", + }, + }, + ], + }, + + { + label: "Production & Function", + type: "group", + fields: [ + { + name: "functionType", + type: "select", + admin: { + description: + "The app will use this type to determine what processes should run for this structure type.", + }, + options: [ + { + label: "Producer", + value: "producer", + }, + { + label: "Storage", + value: "storage", + }, + { + label: "Sensor", + value: "sensor", + }, + { + label: "Converter", + value: "converter", + }, + { + label: "Defense", + value: "defense", + }, + { + label: "Miscellaneous", + value: "miscellaneous", + }, + ], + }, + { + label: "Production Capabilities", + type: "group", + fields: [ + { + name: "canProduce", + type: "relationship", + relationTo: ["assets", "vehicles", "resources"], + hasMany: true, + }, + { + name: "autoGeneratedResources", + type: "array", + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + }, + { + name: "amount", + type: "number", + }, + { + name: "frequency", + type: "text", + }, + ], + }, + ], + }, + { + label: "Storage", + type: "group", + fields: [ + { + name: "maxCapacityMass", + type: "number", + label: "Max Capacity (mass)", + admin: { + description: + "The maximum storage capacity of this structure as mass (retrieved from the mass defined for every asset stored here.)", + }, + }, + { + label: "Storage Slot Dimensions", + type: "group", + fields: [ + { + name: "xSize", + type: "number", + label: "Columns (X)", + }, + { + name: "ySize", + type: "number", + label: "Rows (Y)", + }, + ], + }, + { + name: "allowedStorage", + type: "array", + fields: [ + { + name: "item", + type: "relationship", + relationTo: ["assets", "vehicles", "resources"], + }, + { + name: "amount", + type: "number", + admin: { + description: "How many of this asset, vehicle, or resource can be stored here.", + }, + }, + ], + }, + { + name: "prohibitedStorage", + type: "array", + admin: { + description: + "Any items from this list can never be stored here, even if they meet all other criteria.", + }, + fields: [ + { + name: "item", + type: "relationship", + relationTo: ["assets", "vehicles", "resources"], + }, + ], + }, + ], + }, + ], + }, + + { + label: "Physical Properties", + type: "group", + fields: [ + { + label: "Durability", + type: "group", + fields: [ + { + name: "maxHealth", + type: "number", + required: true, + }, + { + name: "repairSpeed", + type: "number", + admin: { + description: + "So long as the structure meets its operational requirements, this is the amount of health restored to the structure every game tick.", + }, + }, + ], + }, + ], + }, + ], +}; diff --git a/src/collections/logistics/Vehicles.ts b/src/collections/logistics/Vehicles.ts new file mode 100644 index 0000000..5459cfa --- /dev/null +++ b/src/collections/logistics/Vehicles.ts @@ -0,0 +1,343 @@ +import { CollectionConfig } from "payload"; + +export const Vehicles: CollectionConfig = { + slug: "vehicles", + admin: { + useAsTitle: "name", + group: "Logistics", + }, + fields: [ + { + label: "Identity", + type: "group", + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "classname", + type: "text", + admin: { + description: + "If not provided, this vehicle will ONLY be available as a virtual asset (i.e., cannot be used in Arma.)", + }, + }, + { + name: "Description", + type: "richText", + admin: { + description: + "A detailed description of the vehicle, including details like tactical usage, mechanical details, and/or world lore regarding this vehicle.", + }, + }, + { + name: "image", + type: "upload", + relationTo: "media", + }, + { + name: "category", + type: "select", + hasMany: true, + options: [ + { + label: "Civilian", + value: "civilian", + }, + { + label: "Utility", + value: "utility", + }, + { + label: "Transport", + value: "transport", + }, + { + label: "Weaponized", + value: "weaponized", + }, + { + label: "Military", + value: "military", + }, + ], + }, + ], + }, + + { + label: "Construction", + type: "group", + fields: [ + { + name: "materials", + type: "array", + fields: [ + { + name: "resource", + type: "relationship", + required: true, + relationTo: "resources", + }, + { + name: "amount", + type: "number", + }, + ], + }, + { + name: "constructionTime", + type: "number", + admin: { + description: "The number of ticks it takes to complete construction of this vehicle.", + }, + }, + { + name: "requiredTech", + type: "relationship", + relationTo: "technologies", + hasMany: true, + label: "Required Technologies", + admin: { + description: "What research must be done before this can be built.", + }, + }, + { + name: "requiredStructure", + type: "join", + collection: "structures", + on: "canProduce", + }, + ], + }, + + { + label: "Scrapping & Maintenance", + type: "group", + fields: [ + { + name: "scrapReturns", + type: "array", + label: "Materials Returned when Scrapped", + fields: [ + { + name: "resource", + type: "relationship", + required: true, + relationTo: "resources", + }, + { + name: "amount", + type: "number", + defaultValue: 1, + }, + { + name: "chance", + type: "number", + min: 0, + max: 100, + defaultValue: 100, + admin: { + description: + "An optional percent (%) chance to recover this specific resource (between 0 and 100).", + }, + }, + ], + }, + { + name: "upkeepCosts", + type: "array", + admin: { + description: "Recurring costs to keep this vehicle operational.", + }, + fields: [ + { + name: "resource", + type: "relationship", + required: true, + relationTo: "resources", + }, + { + name: "amount", + type: "number", + defaultValue: 1, + admin: { + description: "How much of this resource is consumed per tick.", + }, + }, + ], + }, + ], + }, + + { + label: "Logistics & Grid Storage", + type: "group", + fields: [ + { + label: "Storage Grid Dimensions", + type: "group", + fields: [ + { + name: "width", + type: "number", + }, + { + name: "height", + type: "number", + }, + ], + }, + { + label: "Cargo Capacity", + type: "group", + fields: [ + { + name: "maxMass", + label: "Max Weight (kg.)", + type: "number", + }, + { + name: "aceCargoSlots", + type: "number", + label: "ACE Cargo Slots", + admin: { + description: "The number of ACE cargo slots this vehicle has by default.", + }, + }, + { + name: "allowedVirtualCargo", + type: "array", + admin: { + description: + "The cargo this vehicle is permitted to carry if used virtually (e.g., during deliveries, moving troops, etc.)", + }, + fields: [ + { + name: "item", + type: "relationship", + relationTo: ["assets", "vehicles", "resources"], + required: true, + }, + { + name: "amount", + type: "number", + defaultValue: 1, + }, + ], + }, + ], + }, + ], + }, + + { + label: "Combat & Performance", + type: "group", + fields: [ + { + label: "Durability", + type: "group", + admin: { + description: + "These attributes only apply to the virtual vehicle and are not required nor expected to match the in-game version's actual attributes.", + }, + fields: [ + { + name: "maxHealth", + type: "number", + }, + { + name: "armorRating", + type: "select", + options: [ + { + label: "None", + value: "none", + }, + { + label: "Light", + value: "light", + }, + { + label: "Medium", + value: "medium", + }, + { + label: "Heavy", + value: "heavy", + }, + { + label: "Composite", + value: "composite", + }, + ], + }, + ], + }, + { + label: "Speed & Agility", + type: "group", + fields: [ + { + name: "maxSpeedOnRoad", + type: "number", + }, + { + name: "maxSpeedOffRoad", + type: "number", + }, + { + name: "maxAirspeed", + type: "number", + }, + { + name: "maxKnots", + type: "number", + }, + ], + }, + { + name: "pylons", + label: "Pylons & Mounted Weapons", + type: "array", + fields: [ + { + name: "pylonName", + type: "text", + required: true, + }, + { + name: "pylonType", + type: "select", + required: true, + defaultValue: "mountedWeapon", + options: [ + { + label: "Mounted Weapon", + value: "mountedWeapon", + }, + { + label: "Pylon", + value: "pylon", + }, + ], + }, + { + name: "amount", + type: "number", + defaultValue: 1, + }, + { + name: "ammoType", + type: "relationship", + relationTo: "assets", + }, + ], + }, + ], + }, + ], +}; diff --git a/src/collections/server/MissionFiles.ts b/src/collections/server/MissionFiles.ts new file mode 100644 index 0000000..8c7679a --- /dev/null +++ b/src/collections/server/MissionFiles.ts @@ -0,0 +1,55 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const MissionFiles: CollectionConfig = { + slug: "mission-files", + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + admin: { + group: "Server", + }, + fields: [ + { + name: "missionFileName", + type: "text", + required: true, + }, + { + name: "author", + type: "relationship", + relationTo: "users", + required: true, + }, + ], + upload: { + mimeTypes: ["application/octet-stream"], + }, + hooks: { + beforeValidate: [ + async ({ data, req }) => { + // Enforce .pbo extension on uploaded filename + // For direct file uploads, req.files?.file?.name is typically present + const file = (req as any)?.files?.file; + const name: string | undefined = + file?.name ?? + (typeof data?.filename === "string" ? data.filename : undefined) ?? + (typeof data?.file === "string" ? data.file : undefined); + + if (!name || !name.toLowerCase().endsWith(".pbo")) { + throw new Error("Only .pbo files are allowed."); + } + + // Optional: store clean filename (without path) + if (data) { + data.missionFileName = name; + } + + return data; + }, + ], + }, +}; diff --git a/src/collections/server/ModLists.ts b/src/collections/server/ModLists.ts new file mode 100644 index 0000000..4a024b0 --- /dev/null +++ b/src/collections/server/ModLists.ts @@ -0,0 +1,34 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const ModLists: CollectionConfig = { + slug: "mod-lists", + admin: { + group: "Server", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "modlistName", + type: "text", + admin: { + description: "A friendly name for the mod list.", + }, + required: true, + }, + { + name: "author", + type: "relationship", + relationTo: "users", + required: true, + }, + ], + upload: { + mimeTypes: ["text/html"], + }, +}; diff --git a/src/collections/users/Assignments.ts b/src/collections/users/Assignments.ts new file mode 100644 index 0000000..67f10a1 --- /dev/null +++ b/src/collections/users/Assignments.ts @@ -0,0 +1,95 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Assignments: CollectionConfig = { + slug: "assignments", + admin: { + group: "Users", + useAsTitle: "name", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "type", + type: "select", + options: [ + { + label: "Division", + value: "division", + }, + { + label: "Squad", + value: "squad", + }, + { + label: "Team", + value: "team", + }, + { + label: "Special", + value: "special", + }, + ], + required: true, + }, + { + name: "callsign", + type: "text", + }, + { + name: "description", + type: "richText", + }, + { + name: "leader", + type: "relationship", + relationTo: "users", + admin: { + description: + "The leader represents the individual responsible for this assignment and its members. The leader automatically counts as a member when this assignment is queried.", + }, + }, + { + name: "commandElement", + type: "join", + collection: "assignments", + on: "subAssignments", + admin: { + allowCreate: false, + condition: (data) => { + const hasCommandElement = data?.commandElement?.docs; + return Array.isArray(hasCommandElement) + ? hasCommandElement.length > 0 + : Boolean(hasCommandElement); + }, + }, + }, + { + name: "subAssignments", + type: "relationship", + relationTo: "assignments", + hasMany: true, + admin: { + description: "Add other teams as members of this team/assignment.", + }, + }, + { + name: "members", + type: "relationship", + relationTo: "users", + hasMany: true, + admin: { + description: "Add individuals as members of this team/assignment.", + }, + }, + ], +}; diff --git a/src/collections/users/Awards.ts b/src/collections/users/Awards.ts index 79516ea..c01f2ef 100644 --- a/src/collections/users/Awards.ts +++ b/src/collections/users/Awards.ts @@ -1,12 +1,12 @@ import { CollectionConfig } from "payload"; -import { isAdmin } from "@/utils/access-control/isRole"; +import { isDeveloper } from "@/utils/access-control/isRole"; export const Awards: CollectionConfig = { slug: "awards", access: { - create: isAdmin, - update: isAdmin, - delete: isAdmin, + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, }, admin: { useAsTitle: "name", diff --git a/src/collections/users/Profiles.ts b/src/collections/users/Profiles.ts index c36d622..a488117 100644 --- a/src/collections/users/Profiles.ts +++ b/src/collections/users/Profiles.ts @@ -1,5 +1,7 @@ import { CollectionConfig } from "payload"; import { Award } from "@/payload-types"; +import hasRoles from "@/utils/access-control/hasRoles"; +import { isDeveloper } from "@/utils/access-control/isRole"; export const Profiles: CollectionConfig = { slug: "profiles", @@ -8,16 +10,24 @@ export const Profiles: CollectionConfig = { group: "Users", defaultColumns: ["profileTitle", "user", "rank"], }, + access: { + read: (acl) => hasRoles(["user"], acl.req.user), + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + }, fields: [ { name: "user", type: "relationship", relationTo: "users", + required: true, }, { name: "rank", type: "relationship", relationTo: "ranks", + required: true, }, { name: "profileTitle", @@ -78,6 +88,25 @@ export const Profiles: CollectionConfig = { xpAcc += awards.reduce((prev, cur) => prev + (cur.experiencePoints ?? 0), 0); }); + Object.entries( + (siblingData as { scoreboard: Record }).scoreboard, + ).forEach(([k, v]) => { + if (!v) return; + switch (k) { + case "vehicleKills": + xpAcc += v * 100; + break; + case "armorKills": + case "airKills": + xpAcc += v * 500; + break; + case "infantryKills": + default: + xpAcc += v * 10; + break; + } + }); + return xpAcc; }, ], @@ -92,6 +121,40 @@ export const Profiles: CollectionConfig = { appearance: "drawer", }, }, + { + name: "scoreboard", + type: "group", + admin: { + readOnly: true, + }, + fields: [ + { + name: "infantryKills", + type: "number", + defaultValue: 0, + }, + { + name: "vehicleKills", + type: "number", + defaultValue: 0, + }, + { + name: "armorKills", + type: "number", + defaultValue: 0, + }, + { + name: "airKills", + type: "number", + defaultValue: 0, + }, + { + name: "deaths", + type: "number", + defaultValue: 0, + }, + ], + }, ], }, ], diff --git a/src/collections/users/Qualifications.ts b/src/collections/users/Qualifications.ts new file mode 100644 index 0000000..d1f1b2e --- /dev/null +++ b/src/collections/users/Qualifications.ts @@ -0,0 +1,22 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Qualifications: CollectionConfig = { + slug: "qualifications", + admin: { + group: "Users", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + unique: true, + required: true, + }, + ], +}; diff --git a/src/collections/users/Ranks.ts b/src/collections/users/Ranks.ts index 2422b87..e1a556d 100644 --- a/src/collections/users/Ranks.ts +++ b/src/collections/users/Ranks.ts @@ -1,16 +1,16 @@ import { CollectionConfig } from "payload"; -import { isAdmin } from "@/utils/access-control/isRole"; +import { isDeveloper } from "@/utils/access-control/isRole"; export const Ranks: CollectionConfig = { slug: "ranks", access: { - create: isAdmin, - update: isAdmin, - delete: isAdmin, + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, }, admin: { useAsTitle: "name", - group: "Users" + group: "Users", }, orderable: true, fields: [ diff --git a/src/collections/users/Users.ts b/src/collections/users/Users.ts index a3f7bbf..eccbcd0 100644 --- a/src/collections/users/Users.ts +++ b/src/collections/users/Users.ts @@ -1,14 +1,29 @@ import type { CollectionConfig } from "payload"; -import { isAdmin } from "@/utils/access-control/isRole"; +import { isAdmin, isDeveloper } from "@/utils/access-control/isRole"; export const Users: CollectionConfig = { slug: "users", access: { admin: isAdmin, - unlock: isAdmin, + unlock: isDeveloper, + create: isDeveloper, + update: ({ req, data }) => { + const isEditingDeveloper = data?.roles?.includes("developer"); + if (isEditingDeveloper) { + return isDeveloper({ req }); + } + return isAdmin({ req }); + }, + delete: ({ req, data }) => { + const isEditingDeveloper = data?.roles?.includes("developer"); + if (isEditingDeveloper) { + return isDeveloper({ req }); + } + return isAdmin({ req }); + }, }, admin: { - useAsTitle: "username", + useAsTitle: "payloadDisplayName", group: "Users", }, auth: { @@ -35,11 +50,39 @@ export const Users: CollectionConfig = { { name: "displayName", type: "text", + label: "In-Game Name", + required: true, + }, + { + name: "payloadDisplayName", + type: "text", + label: "Display Name", + admin: { + hidden: true, + readOnly: true, + }, + hooks: { + beforeChange: [ + ({ data }) => { + // console.log(data); + return `${data!.displayName ? data!.displayName + " " : ""}(${data!.username})`; + }, + ], + }, + }, + { + name: "steamId", + type: "text", + label: "Steam ID 64", required: true, }, { name: "roles", type: "select", + access: { + create: isDeveloper, + update: isDeveloper, + }, hasMany: true, options: [ { @@ -59,6 +102,13 @@ export const Users: CollectionConfig = { value: "developer", }, ], + /*filterOptions: ({ options, data, req }) => { + return !isDeveloper({ req }) + ? options.filter( + (option) => (typeof option === "string" ? options : !["developer", "admin"].includes(option.value)), + ) + : options; + },*/ }, ], }; diff --git a/src/collections/world/LogisticsEvents.ts b/src/collections/world/LogisticsEvents.ts new file mode 100644 index 0000000..f0a6857 --- /dev/null +++ b/src/collections/world/LogisticsEvents.ts @@ -0,0 +1,23 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const LogisticsEvents: CollectionConfig = { + slug: "logistics-events", + admin: { + group: "World", + useAsTitle: "name", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + ], +}; diff --git a/src/collections/world/Maps.ts b/src/collections/world/Maps.ts new file mode 100644 index 0000000..88c56cf --- /dev/null +++ b/src/collections/world/Maps.ts @@ -0,0 +1,28 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const Maps: CollectionConfig = { + slug: "maps", + admin: { + group: "World", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + unique: true, + }, + { + name: "fileName", + type: "text", + unique: true, + }, + ], +}; diff --git a/src/collections/world/NarrativeEvents.ts b/src/collections/world/NarrativeEvents.ts new file mode 100644 index 0000000..4baadef --- /dev/null +++ b/src/collections/world/NarrativeEvents.ts @@ -0,0 +1,44 @@ +import { CollectionConfig } from "payload"; +import { isDeveloper } from "@/utils/access-control/isRole"; + +export const NarrativeEvents: CollectionConfig = { + slug: "narrative-events", + admin: { + group: "World", + }, + access: { + create: isDeveloper, + update: isDeveloper, + delete: isDeveloper, + read: isDeveloper, + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "summary", + type: "textarea", + required: true, + }, + { + type: "tabs", + tabs: [ + { + label: "Event Setup", + description: + "Establish the basic requirements and conditions needed for this event to occur.", + fields: [], + }, + { + label: "Narrative Graph", + description: + "Write the event storyline here, including choices, conditions, and outcomes!", + fields: [], + }, + ], + }, + ], +}; diff --git a/src/components/graphics/AppIcon.tsx b/src/components/graphics/AppIcon.tsx new file mode 100644 index 0000000..b843dc0 --- /dev/null +++ b/src/components/graphics/AppIcon.tsx @@ -0,0 +1,15 @@ +import iconSvg from "@/assets/images/icon.svg"; +import Image from "next/image"; + +export default function AppIcon() { + return ( +
+ Polaris Task Force +
+ ); +} diff --git a/src/components/graphics/AppLogo.tsx b/src/components/graphics/AppLogo.tsx new file mode 100644 index 0000000..f81cdc0 --- /dev/null +++ b/src/components/graphics/AppLogo.tsx @@ -0,0 +1,15 @@ +import logoImage from "@/assets/images/logo.webp"; +import Image from "next/image"; + +export default function AppLogo() { + return ( +
+ Polaris Task Force +
+ ); +} diff --git a/src/components/static/BeforeDashboardText.tsx b/src/components/static/BeforeDashboardText.tsx new file mode 100644 index 0000000..476fd92 --- /dev/null +++ b/src/components/static/BeforeDashboardText.tsx @@ -0,0 +1,72 @@ +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { TriangleAlert } from "lucide-react"; + +export const BeforeDashboardText = () => { + return ( +
+
+

Dashboard

+

+ You are currently viewing the application's backend configuration and management + screen. +

+
+
+ + + + This application is a work-in-progress! + + +

+ As this application is under active development, features and configurations may + change significantly and without prior notice, including any modifications you make.{" "} + + Please be aware that data or work contributed may be lost during updates. + {" "} + Your patience and understanding are greatly appreciated. +

+
+
+
+
+

+ If you are new to this panel, please keep in mind several important distinctions between + this screen and the application's regular front-end: +

+
    +
  1. + The front-end (not this panel) is where the magic actually happens. + Queuing jobs, buying resources and assets, managing funds, signing up for missions, and + all other forms of user interaction take place there. If you want to perform these sorts + of operations, you should go there instead. +
  2. +
  3. + The back-end (this screen and its children) is the "developer" view, + where you can view and manage the definitions and rules of the things the + front-end interacts with. If you want to define the different types of structures, + create new assets and give them properties, create missions, and other app + "development" operations, this is where those things happen. +
  4. +
  5. + Before the campaign starts, this screen is where most work on the app will take place. + After the campaign has started, you mostly won't use this screen for the majority + of interactions, save for some exceptions (like mission building, lore writing, etc.) +
  6. +
+

+ If you understand all of this, then please carry on with what you are doing! If you are + looking for a certain action and cannot find it here, you'll probably want to go + check the front-end to see if you can perform that action there instead. +

+

+ Thank you for all of your help and patience with this app! It means the world to me. 💖 + — Jason +

+
+
+
+ ); +}; + +export default BeforeDashboardText; diff --git a/src/components/static/WarningMessage.tsx b/src/components/static/WarningMessage.tsx new file mode 100644 index 0000000..1fc7b22 --- /dev/null +++ b/src/components/static/WarningMessage.tsx @@ -0,0 +1,14 @@ +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { LucideAlertTriangle } from "lucide-react"; + +export const WarningMessage = ({ title, message }: { title: string; message: string }) => { + return ( + + + {title} + {message} + + ); +}; + +export default WarningMessage; diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx new file mode 100644 index 0000000..1421354 --- /dev/null +++ b/src/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const alertVariants = cva( + "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + { + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/src/lib/utils.ts b/src/lib/utils.ts new file mode 100644 index 0000000..bd0c391 --- /dev/null +++ b/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/src/migrations/20251206_065831.json b/src/migrations/20251206_065831.json new file mode 100644 index 0000000..84b9e8c --- /dev/null +++ b/src/migrations/20251206_065831.json @@ -0,0 +1,8535 @@ +{ + "id": "1de066bb-46db-4d05-81d8-7b579d8ea254", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_awards_id_idx": { + "name": "profiles_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_awards_fk": { + "name": "profiles_rels_awards_fk", + "tableFrom": "profiles_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_name": { + "name": "faction_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "requirements_intelligence_points": { + "name": "requirements_intelligence_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "frequency": { + "name": "frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_file_name_idx": { + "name": "maps_file_name_idx", + "columns": [ + { + "expression": "file_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "admin", + "developer" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/src/migrations/20251206_065831.ts b/src/migrations/20251206_065831.ts new file mode 100644 index 0000000..ac33ea1 --- /dev/null +++ b/src/migrations/20251206_065831.ts @@ -0,0 +1,1073 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."enum_users_roles" AS ENUM('guest', 'user', 'admin', 'developer'); + CREATE TYPE "public"."enum_awards_type" AS ENUM('commendation', 'ribbon', 'medal'); + CREATE TYPE "public"."enum_assignments_type" AS ENUM('division', 'squad', 'team', 'special'); + CREATE TYPE "public"."enum_missions_factions_involved_threat_level" AS ENUM('ally', 'friendly', 'neutral', 'hostile'); + CREATE TYPE "public"."enum_missions_logistics_and_support_insertion" AS ENUM('helicopter', 'aircraft', 'paradrop', 'boat', 'car', 'onFoot'); + CREATE TYPE "public"."enum_missions_logistics_and_support_extraction" AS ENUM('helicopter', 'aircraft', 'paradrop', 'boat', 'car', 'onFoot'); + CREATE TYPE "public"."enum_missions_operation_type" AS ENUM('main', 'side', 'external'); + CREATE TYPE "public"."enum_missions_classification_mission_type" AS ENUM('Zeus', 'PvE', 'PvP', 'PvPvE', 'Training', 'Special'); + CREATE TYPE "public"."enum_missions_ownership_and_status_status" AS ENUM('Concept', 'Planning', 'Ready', 'Scheduled', 'Active', 'Completed', 'Cancelled'); + CREATE TYPE "public"."enum_missions_ownership_and_status_visibility" AS ENUM('unit', 'leadership', 'intel', 'private'); + CREATE TYPE "public"."enum_missions_civilian_presence" AS ENUM('None', 'Low', 'Medium', 'High'); + CREATE TYPE "public"."enum_campaigns_status" AS ENUM('concept', 'inProgress', 'completed'); + CREATE TYPE "public"."enum_factions_type" AS ENUM('majorFaction', 'minorFaction', 'corporation', 'special'); + CREATE TYPE "public"."enum_technologies_type" AS ENUM('asset', 'upgrade'); + CREATE TYPE "public"."enum_assets_asset_type" AS ENUM('weapon', 'magazine', 'optic', 'muzzle', 'bipod', 'uniform', 'vest', 'backpack', 'helmet', 'facewear', 'nvg', 'radio', 'medical', 'tool', 'explosive', 'miscellaneous'); + CREATE TYPE "public"."enum_assets_weapon_configuration_slot_type" AS ENUM('primary', 'secondary', 'launcher'); + CREATE TYPE "public"."enum_assets_nightvision_configuration_nvg_generation" AS ENUM('gen1', 'gen2', 'gen3'); + CREATE TYPE "public"."enum_assets_market_trading_rarity" AS ENUM('basic', 'common', 'uncommon', 'rare', 'veryRare', 'epic', 'legendary', 'unique'); + CREATE TYPE "public"."enum_resources_type" AS ENUM('physical', 'fluid', 'energy', 'abstract'); + CREATE TYPE "public"."enum_resources_rarity" AS ENUM('common', 'uncommon', 'rare', 'epic', 'legendary', 'exotic', 'unique'); + CREATE TYPE "public"."enum_vehicles_category" AS ENUM('civilian', 'utility', 'transport', 'weaponized', 'military'); + CREATE TYPE "public"."enum_vehicles_pylons_pylon_type" AS ENUM('mountedWeapon', 'pylon'); + CREATE TYPE "public"."enum_vehicles_armor_rating" AS ENUM('none', 'light', 'medium', 'heavy', 'composite'); + CREATE TYPE "public"."enum_structures_category" AS ENUM('logistics', 'military', 'civilian'); + CREATE TYPE "public"."enum_structures_terrain_type" AS ENUM('land', 'water'); + CREATE TYPE "public"."enum_structures_function_type" AS ENUM('producer', 'storage', 'sensor', 'converter', 'defense', 'miscellaneous'); + CREATE TABLE "media" ( + "id" serial PRIMARY KEY NOT NULL, + "alt" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric + ); + + CREATE TABLE "users_roles" ( + "order" integer NOT NULL, + "parent_id" integer NOT NULL, + "value" "enum_users_roles", + "id" serial PRIMARY KEY NOT NULL + ); + + CREATE TABLE "users_sessions" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "created_at" timestamp(3) with time zone, + "expires_at" timestamp(3) with time zone NOT NULL + ); + + CREATE TABLE "users" ( + "id" serial PRIMARY KEY NOT NULL, + "discord_username" varchar NOT NULL, + "display_name" varchar NOT NULL, + "payload_display_name" varchar, + "steam_id" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "email" varchar, + "username" varchar NOT NULL, + "reset_password_token" varchar, + "reset_password_expiration" timestamp(3) with time zone, + "salt" varchar, + "hash" varchar, + "login_attempts" numeric DEFAULT 0, + "lock_until" timestamp(3) with time zone + ); + + CREATE TABLE "ranks" ( + "id" serial PRIMARY KEY NOT NULL, + "_order" varchar, + "name" varchar NOT NULL, + "abbreviation" varchar NOT NULL, + "description" varchar NOT NULL, + "insignia_id" integer, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "profiles" ( + "id" serial PRIMARY KEY NOT NULL, + "user_id" integer NOT NULL, + "rank_id" integer NOT NULL, + "dossier_personal_excerpt" varchar, + "dossier_intel_excerpt" jsonb, + "progression_scoreboard_infantry_kills" numeric DEFAULT 0, + "progression_scoreboard_vehicle_kills" numeric DEFAULT 0, + "progression_scoreboard_armor_kills" numeric DEFAULT 0, + "progression_scoreboard_air_kills" numeric DEFAULT 0, + "progression_scoreboard_deaths" numeric DEFAULT 0, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "profiles_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "awards_id" integer + ); + + CREATE TABLE "awards" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "description" jsonb NOT NULL, + "type" "enum_awards_type" DEFAULT 'commendation', + "image_id" integer, + "experience_points" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "qualifications" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "assignments" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "type" "enum_assignments_type" NOT NULL, + "callsign" varchar, + "description" jsonb, + "leader_id" integer, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "assignments_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "assignments_id" integer, + "users_id" integer + ); + + CREATE TABLE "missions_mission_roles_provided_roles" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "role_name" varchar NOT NULL, + "mission_critical" boolean DEFAULT true, + "minimum_rank_id" integer + ); + + CREATE TABLE "missions_briefing" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "section_name" varchar NOT NULL, + "details" jsonb NOT NULL + ); + + CREATE TABLE "missions_mission_objectives" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "title" varchar NOT NULL, + "description" varchar, + "mission_critical" boolean DEFAULT true, + "success_or_fail_conditions" varchar + ); + + CREATE TABLE "missions_factions_involved" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "faction_name" varchar NOT NULL, + "threat_level" "enum_missions_factions_involved_threat_level" DEFAULT 'hostile' NOT NULL + ); + + CREATE TABLE "missions_logistics_and_support_insertion" ( + "order" integer NOT NULL, + "parent_id" integer NOT NULL, + "value" "enum_missions_logistics_and_support_insertion", + "id" serial PRIMARY KEY NOT NULL + ); + + CREATE TABLE "missions_logistics_and_support_extraction" ( + "order" integer NOT NULL, + "parent_id" integer NOT NULL, + "value" "enum_missions_logistics_and_support_extraction", + "id" serial PRIMARY KEY NOT NULL + ); + + CREATE TABLE "missions_logistics_and_support_assets_available" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "asset_type" varchar NOT NULL, + "asset_count" varchar, + "does_respawn" boolean, + "asset_callsign" varchar + ); + + CREATE TABLE "missions_comms_and_docs_frequencies" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "frequency" numeric NOT NULL, + "channel" numeric, + "net_name" varchar NOT NULL, + "freq_usage" varchar NOT NULL + ); + + CREATE TABLE "missions" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "code_name" varchar NOT NULL, + "summary" varchar NOT NULL, + "operation_type" "enum_missions_operation_type" NOT NULL, + "classification_map_id" integer NOT NULL, + "classification_mission_type" "enum_missions_classification_mission_type" DEFAULT 'Zeus' NOT NULL, + "classification_campaign_id" integer NOT NULL, + "classification_custom_scripts" boolean, + "classification_start_date_time" timestamp(3) with time zone NOT NULL, + "classification_estimated_duration" numeric DEFAULT 240 NOT NULL, + "ownership_and_status_status" "enum_missions_ownership_and_status_status" DEFAULT 'Concept' NOT NULL, + "ownership_and_status_visibility" "enum_missions_ownership_and_status_visibility" DEFAULT 'leadership' NOT NULL, + "mission_roles_max_players" numeric DEFAULT 32 NOT NULL, + "mission_roles_notes" varchar, + "civilian_presence" "enum_missions_civilian_presence" DEFAULT 'None', + "game_details_server_details_server_ip" varchar DEFAULT 'arma.onyxsimple.com' NOT NULL, + "game_details_server_details_server_port" numeric DEFAULT 2302 NOT NULL, + "game_details_server_details_server_password" varchar DEFAULT 'ptf313', + "game_details_game_setup_mission_file_id" integer NOT NULL, + "game_details_game_setup_required_mods_id" integer, + "comms_and_docs_radio_plan" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "missions_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "users_id" integer, + "qualifications_id" integer + ); + + CREATE TABLE "campaigns" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "summary" varchar DEFAULT 'An Arma 3 campaign.' NOT NULL, + "status" "enum_campaigns_status" DEFAULT 'concept' NOT NULL, + "description" jsonb, + "start_date" timestamp(3) with time zone, + "end_date" timestamp(3) with time zone, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "factions" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "type" "enum_factions_type" DEFAULT 'minorFaction' NOT NULL, + "description" jsonb, + "playable_faction" boolean, + "starting_faction" boolean, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "factions_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "campaigns_id" integer + ); + + CREATE TABLE "technologies_requirements_prerequisite_technologies" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL + ); + + CREATE TABLE "technologies" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "type" "enum_technologies_type" DEFAULT 'upgrade' NOT NULL, + "summary" varchar NOT NULL, + "description" jsonb, + "requirements_intelligence_points" numeric, + "research_costs_minimum_research_duration" numeric DEFAULT 0 NOT NULL, + "research_costs_maximum_research_duration" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "technologies_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "technologies_id" integer + ); + + CREATE TABLE "assets_crafting_crafting_data_inputs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "quantity" numeric, + "lended" boolean + ); + + CREATE TABLE "assets_crafting_crafting_data_byproducts" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "quantity" numeric + ); + + CREATE TABLE "assets" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "class_name" varchar DEFAULT '' NOT NULL, + "asset_type" "enum_assets_asset_type" DEFAULT 'weapon' NOT NULL, + "weapon_configuration_slot_type" "enum_assets_weapon_configuration_slot_type", + "nightvision_configuration_nvg_generation" "enum_assets_nightvision_configuration_nvg_generation", + "nightvision_configuration_nvg_has_thermals" boolean, + "container_configuration_capacity_kg" numeric, + "container_configuration_weight_kg" numeric, + "magazine_configuration_round_capacity" numeric, + "magazine_configuration_ammo_type" varchar, + "magazine_configuration_greenmag_compatible" boolean, + "asset_metadata_mod" varchar, + "asset_metadata_thumbnail_id" integer, + "asset_metadata_game_description" varchar, + "tradeable" boolean, + "market_trading_rarity" "enum_assets_market_trading_rarity", + "market_trading_perceived_value_base_buy_price" numeric, + "market_trading_perceived_value_base_sell_price" numeric, + "crafting_craftable" boolean, + "crafting_blueprint_required" boolean, + "crafting_technology_required_to_use" boolean, + "crafting_crafting_data_crafting_time_per_unit" numeric DEFAULT 1 NOT NULL, + "crafting_crafting_data_batch_size" numeric DEFAULT 1 NOT NULL, + "is_live" boolean, + "notes" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "assets_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "assets_id" integer, + "technologies_id" integer, + "resources_id" integer, + "structures_id" integer + ); + + CREATE TABLE "resources" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "code_name" varchar NOT NULL, + "type" "enum_resources_type" DEFAULT 'physical' NOT NULL, + "description" jsonb, + "icon_id" integer, + "color" varchar, + "base_value" numeric DEFAULT 1 NOT NULL, + "tradeable" boolean, + "rarity" "enum_resources_rarity" DEFAULT 'common' NOT NULL, + "unit_of_measure" varchar NOT NULL, + "mass_per_unit" numeric DEFAULT 0 NOT NULL, + "stack_size" numeric DEFAULT 1, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "vehicles_category" ( + "order" integer NOT NULL, + "parent_id" integer NOT NULL, + "value" "enum_vehicles_category", + "id" serial PRIMARY KEY NOT NULL + ); + + CREATE TABLE "vehicles_materials" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount" numeric + ); + + CREATE TABLE "vehicles_scrap_returns" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount" numeric DEFAULT 1, + "chance" numeric DEFAULT 100 + ); + + CREATE TABLE "vehicles_upkeep_costs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount" numeric DEFAULT 1 + ); + + CREATE TABLE "vehicles_allowed_virtual_cargo" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "amount" numeric DEFAULT 1 + ); + + CREATE TABLE "vehicles_pylons" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "pylon_name" varchar NOT NULL, + "pylon_type" "enum_vehicles_pylons_pylon_type" DEFAULT 'mountedWeapon' NOT NULL, + "amount" numeric DEFAULT 1, + "ammo_type_id" integer + ); + + CREATE TABLE "vehicles" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "classname" varchar, + "description" jsonb, + "image_id" integer, + "construction_time" numeric, + "width" numeric, + "height" numeric, + "max_mass" numeric, + "ace_cargo_slots" numeric, + "max_health" numeric, + "armor_rating" "enum_vehicles_armor_rating", + "max_speed_on_road" numeric, + "max_speed_off_road" numeric, + "max_airspeed" numeric, + "max_knots" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "vehicles_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "technologies_id" integer, + "assets_id" integer, + "vehicles_id" integer, + "resources_id" integer + ); + + CREATE TABLE "structures_materials" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount" numeric + ); + + CREATE TABLE "structures_resources_in_range" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer, + "range" numeric + ); + + CREATE TABLE "structures_structures_in_range" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "structure_id" integer, + "range" numeric + ); + + CREATE TABLE "structures_upkeep" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer, + "amount" numeric + ); + + CREATE TABLE "structures_auto_generated_resources" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer, + "amount" numeric, + "frequency" varchar + ); + + CREATE TABLE "structures_allowed_storage" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "amount" numeric + ); + + CREATE TABLE "structures_prohibited_storage" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL + ); + + CREATE TABLE "structures" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "code_name" varchar NOT NULL, + "description" jsonb NOT NULL, + "image_id" integer, + "category" "enum_structures_category" NOT NULL, + "construction_time" numeric NOT NULL, + "requires_upgrade" boolean, + "upgrades_into_id" integer, + "upgrade_cost_multiplier" numeric DEFAULT 1, + "terrain_type" "enum_structures_terrain_type" NOT NULL, + "sell_price" numeric, + "function_type" "enum_structures_function_type", + "max_capacity_mass" numeric, + "x_size" numeric, + "y_size" numeric, + "max_health" numeric NOT NULL, + "repair_speed" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "structures_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "technologies_id" integer, + "assets_id" integer, + "vehicles_id" integer, + "resources_id" integer + ); + + CREATE TABLE "maps" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "file_name" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "narrative_events" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "summary" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "mission_files" ( + "id" serial PRIMARY KEY NOT NULL, + "mission_file_name" varchar NOT NULL, + "author_id" integer NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric + ); + + CREATE TABLE "mod_lists" ( + "id" serial PRIMARY KEY NOT NULL, + "modlist_name" varchar NOT NULL, + "author_id" integer NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric + ); + + CREATE TABLE "payload_locked_documents" ( + "id" serial PRIMARY KEY NOT NULL, + "global_slug" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "payload_locked_documents_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "media_id" integer, + "users_id" integer, + "ranks_id" integer, + "profiles_id" integer, + "awards_id" integer, + "qualifications_id" integer, + "assignments_id" integer, + "missions_id" integer, + "campaigns_id" integer, + "factions_id" integer, + "technologies_id" integer, + "assets_id" integer, + "resources_id" integer, + "vehicles_id" integer, + "structures_id" integer, + "maps_id" integer, + "narrative_events_id" integer, + "mission_files_id" integer, + "mod_lists_id" integer + ); + + CREATE TABLE "payload_preferences" ( + "id" serial PRIMARY KEY NOT NULL, + "key" varchar, + "value" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "payload_preferences_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "users_id" integer + ); + + CREATE TABLE "payload_migrations" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar, + "batch" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "game_rules" ( + "id" serial PRIMARY KEY NOT NULL, + "main_currency_id" integer NOT NULL, + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + ALTER TABLE "users_roles" ADD CONSTRAINT "users_roles_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "users_sessions" ADD CONSTRAINT "users_sessions_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "ranks" ADD CONSTRAINT "ranks_insignia_id_media_id_fk" FOREIGN KEY ("insignia_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "profiles" ADD CONSTRAINT "profiles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "profiles" ADD CONSTRAINT "profiles_rank_id_ranks_id_fk" FOREIGN KEY ("rank_id") REFERENCES "public"."ranks"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "profiles_rels" ADD CONSTRAINT "profiles_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."profiles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "profiles_rels" ADD CONSTRAINT "profiles_rels_awards_fk" FOREIGN KEY ("awards_id") REFERENCES "public"."awards"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "awards" ADD CONSTRAINT "awards_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "assignments" ADD CONSTRAINT "assignments_leader_id_users_id_fk" FOREIGN KEY ("leader_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "assignments_rels" ADD CONSTRAINT "assignments_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."assignments"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assignments_rels" ADD CONSTRAINT "assignments_rels_assignments_fk" FOREIGN KEY ("assignments_id") REFERENCES "public"."assignments"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assignments_rels" ADD CONSTRAINT "assignments_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_mission_roles_provided_roles" ADD CONSTRAINT "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk" FOREIGN KEY ("minimum_rank_id") REFERENCES "public"."ranks"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "missions_mission_roles_provided_roles" ADD CONSTRAINT "missions_mission_roles_provided_roles_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_briefing" ADD CONSTRAINT "missions_briefing_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_mission_objectives" ADD CONSTRAINT "missions_mission_objectives_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_factions_involved" ADD CONSTRAINT "missions_factions_involved_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_logistics_and_support_insertion" ADD CONSTRAINT "missions_logistics_and_support_insertion_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_logistics_and_support_extraction" ADD CONSTRAINT "missions_logistics_and_support_extraction_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_logistics_and_support_assets_available" ADD CONSTRAINT "missions_logistics_and_support_assets_available_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_comms_and_docs_frequencies" ADD CONSTRAINT "missions_comms_and_docs_frequencies_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions" ADD CONSTRAINT "missions_classification_map_id_maps_id_fk" FOREIGN KEY ("classification_map_id") REFERENCES "public"."maps"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "missions" ADD CONSTRAINT "missions_classification_campaign_id_campaigns_id_fk" FOREIGN KEY ("classification_campaign_id") REFERENCES "public"."campaigns"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "missions" ADD CONSTRAINT "missions_game_details_game_setup_mission_file_id_mission_files_id_fk" FOREIGN KEY ("game_details_game_setup_mission_file_id") REFERENCES "public"."mission_files"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "missions" ADD CONSTRAINT "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk" FOREIGN KEY ("game_details_game_setup_required_mods_id") REFERENCES "public"."mod_lists"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "missions_rels" ADD CONSTRAINT "missions_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_rels" ADD CONSTRAINT "missions_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "missions_rels" ADD CONSTRAINT "missions_rels_qualifications_fk" FOREIGN KEY ("qualifications_id") REFERENCES "public"."qualifications"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "factions_rels" ADD CONSTRAINT "factions_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."factions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "factions_rels" ADD CONSTRAINT "factions_rels_campaigns_fk" FOREIGN KEY ("campaigns_id") REFERENCES "public"."campaigns"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "technologies_requirements_prerequisite_technologies" ADD CONSTRAINT "technologies_requirements_prerequisite_technologies_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "technologies_rels" ADD CONSTRAINT "technologies_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "technologies_rels" ADD CONSTRAINT "technologies_rels_technologies_fk" FOREIGN KEY ("technologies_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_crafting_crafting_data_inputs" ADD CONSTRAINT "assets_crafting_crafting_data_inputs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_crafting_crafting_data_byproducts" ADD CONSTRAINT "assets_crafting_crafting_data_byproducts_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets" ADD CONSTRAINT "assets_asset_metadata_thumbnail_id_media_id_fk" FOREIGN KEY ("asset_metadata_thumbnail_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "assets_rels" ADD CONSTRAINT "assets_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_rels" ADD CONSTRAINT "assets_rels_assets_fk" FOREIGN KEY ("assets_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_rels" ADD CONSTRAINT "assets_rels_technologies_fk" FOREIGN KEY ("technologies_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_rels" ADD CONSTRAINT "assets_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "assets_rels" ADD CONSTRAINT "assets_rels_structures_fk" FOREIGN KEY ("structures_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "resources" ADD CONSTRAINT "resources_icon_id_media_id_fk" FOREIGN KEY ("icon_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_category" ADD CONSTRAINT "vehicles_category_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_materials" ADD CONSTRAINT "vehicles_materials_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_materials" ADD CONSTRAINT "vehicles_materials_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_scrap_returns" ADD CONSTRAINT "vehicles_scrap_returns_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_scrap_returns" ADD CONSTRAINT "vehicles_scrap_returns_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_upkeep_costs" ADD CONSTRAINT "vehicles_upkeep_costs_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_upkeep_costs" ADD CONSTRAINT "vehicles_upkeep_costs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_allowed_virtual_cargo" ADD CONSTRAINT "vehicles_allowed_virtual_cargo_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_pylons" ADD CONSTRAINT "vehicles_pylons_ammo_type_id_assets_id_fk" FOREIGN KEY ("ammo_type_id") REFERENCES "public"."assets"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_pylons" ADD CONSTRAINT "vehicles_pylons_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles" ADD CONSTRAINT "vehicles_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "vehicles_rels" ADD CONSTRAINT "vehicles_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_rels" ADD CONSTRAINT "vehicles_rels_technologies_fk" FOREIGN KEY ("technologies_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_rels" ADD CONSTRAINT "vehicles_rels_assets_fk" FOREIGN KEY ("assets_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_rels" ADD CONSTRAINT "vehicles_rels_vehicles_fk" FOREIGN KEY ("vehicles_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "vehicles_rels" ADD CONSTRAINT "vehicles_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_materials" ADD CONSTRAINT "structures_materials_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_materials" ADD CONSTRAINT "structures_materials_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_resources_in_range" ADD CONSTRAINT "structures_resources_in_range_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_resources_in_range" ADD CONSTRAINT "structures_resources_in_range_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_structures_in_range" ADD CONSTRAINT "structures_structures_in_range_structure_id_structures_id_fk" FOREIGN KEY ("structure_id") REFERENCES "public"."structures"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_structures_in_range" ADD CONSTRAINT "structures_structures_in_range_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_upkeep" ADD CONSTRAINT "structures_upkeep_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_upkeep" ADD CONSTRAINT "structures_upkeep_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_auto_generated_resources" ADD CONSTRAINT "structures_auto_generated_resources_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_auto_generated_resources" ADD CONSTRAINT "structures_auto_generated_resources_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_allowed_storage" ADD CONSTRAINT "structures_allowed_storage_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_prohibited_storage" ADD CONSTRAINT "structures_prohibited_storage_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures" ADD CONSTRAINT "structures_image_id_media_id_fk" FOREIGN KEY ("image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures" ADD CONSTRAINT "structures_upgrades_into_id_structures_id_fk" FOREIGN KEY ("upgrades_into_id") REFERENCES "public"."structures"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_rels" ADD CONSTRAINT "structures_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_rels" ADD CONSTRAINT "structures_rels_technologies_fk" FOREIGN KEY ("technologies_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_rels" ADD CONSTRAINT "structures_rels_assets_fk" FOREIGN KEY ("assets_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_rels" ADD CONSTRAINT "structures_rels_vehicles_fk" FOREIGN KEY ("vehicles_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_rels" ADD CONSTRAINT "structures_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "mission_files" ADD CONSTRAINT "mission_files_author_id_users_id_fk" FOREIGN KEY ("author_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "mod_lists" ADD CONSTRAINT "mod_lists_author_id_users_id_fk" FOREIGN KEY ("author_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_locked_documents"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_media_fk" FOREIGN KEY ("media_id") REFERENCES "public"."media"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_ranks_fk" FOREIGN KEY ("ranks_id") REFERENCES "public"."ranks"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_profiles_fk" FOREIGN KEY ("profiles_id") REFERENCES "public"."profiles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_awards_fk" FOREIGN KEY ("awards_id") REFERENCES "public"."awards"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_qualifications_fk" FOREIGN KEY ("qualifications_id") REFERENCES "public"."qualifications"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_assignments_fk" FOREIGN KEY ("assignments_id") REFERENCES "public"."assignments"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_missions_fk" FOREIGN KEY ("missions_id") REFERENCES "public"."missions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_campaigns_fk" FOREIGN KEY ("campaigns_id") REFERENCES "public"."campaigns"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_factions_fk" FOREIGN KEY ("factions_id") REFERENCES "public"."factions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_technologies_fk" FOREIGN KEY ("technologies_id") REFERENCES "public"."technologies"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_assets_fk" FOREIGN KEY ("assets_id") REFERENCES "public"."assets"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_resources_fk" FOREIGN KEY ("resources_id") REFERENCES "public"."resources"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_vehicles_fk" FOREIGN KEY ("vehicles_id") REFERENCES "public"."vehicles"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_structures_fk" FOREIGN KEY ("structures_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_maps_fk" FOREIGN KEY ("maps_id") REFERENCES "public"."maps"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_narrative_events_fk" FOREIGN KEY ("narrative_events_id") REFERENCES "public"."narrative_events"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_mission_files_fk" FOREIGN KEY ("mission_files_id") REFERENCES "public"."mission_files"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_mod_lists_fk" FOREIGN KEY ("mod_lists_id") REFERENCES "public"."mod_lists"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_preferences"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "game_rules" ADD CONSTRAINT "game_rules_main_currency_id_resources_id_fk" FOREIGN KEY ("main_currency_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + CREATE INDEX "media_updated_at_idx" ON "media" USING btree ("updated_at"); + CREATE INDEX "media_created_at_idx" ON "media" USING btree ("created_at"); + CREATE UNIQUE INDEX "media_filename_idx" ON "media" USING btree ("filename"); + CREATE INDEX "users_roles_order_idx" ON "users_roles" USING btree ("order"); + CREATE INDEX "users_roles_parent_idx" ON "users_roles" USING btree ("parent_id"); + CREATE INDEX "users_sessions_order_idx" ON "users_sessions" USING btree ("_order"); + CREATE INDEX "users_sessions_parent_id_idx" ON "users_sessions" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "users_discord_username_idx" ON "users" USING btree ("discord_username"); + CREATE INDEX "users_updated_at_idx" ON "users" USING btree ("updated_at"); + CREATE INDEX "users_created_at_idx" ON "users" USING btree ("created_at"); + CREATE UNIQUE INDEX "users_username_idx" ON "users" USING btree ("username"); + CREATE INDEX "ranks__order_idx" ON "ranks" USING btree ("_order"); + CREATE UNIQUE INDEX "ranks_name_idx" ON "ranks" USING btree ("name"); + CREATE UNIQUE INDEX "ranks_abbreviation_idx" ON "ranks" USING btree ("abbreviation"); + CREATE INDEX "ranks_insignia_idx" ON "ranks" USING btree ("insignia_id"); + CREATE INDEX "ranks_updated_at_idx" ON "ranks" USING btree ("updated_at"); + CREATE INDEX "ranks_created_at_idx" ON "ranks" USING btree ("created_at"); + CREATE INDEX "profiles_user_idx" ON "profiles" USING btree ("user_id"); + CREATE INDEX "profiles_rank_idx" ON "profiles" USING btree ("rank_id"); + CREATE INDEX "profiles_updated_at_idx" ON "profiles" USING btree ("updated_at"); + CREATE INDEX "profiles_created_at_idx" ON "profiles" USING btree ("created_at"); + CREATE INDEX "profiles_rels_order_idx" ON "profiles_rels" USING btree ("order"); + CREATE INDEX "profiles_rels_parent_idx" ON "profiles_rels" USING btree ("parent_id"); + CREATE INDEX "profiles_rels_path_idx" ON "profiles_rels" USING btree ("path"); + CREATE INDEX "profiles_rels_awards_id_idx" ON "profiles_rels" USING btree ("awards_id"); + CREATE UNIQUE INDEX "awards_name_idx" ON "awards" USING btree ("name"); + CREATE INDEX "awards_image_idx" ON "awards" USING btree ("image_id"); + CREATE INDEX "awards_updated_at_idx" ON "awards" USING btree ("updated_at"); + CREATE INDEX "awards_created_at_idx" ON "awards" USING btree ("created_at"); + CREATE UNIQUE INDEX "qualifications_name_idx" ON "qualifications" USING btree ("name"); + CREATE INDEX "qualifications_updated_at_idx" ON "qualifications" USING btree ("updated_at"); + CREATE INDEX "qualifications_created_at_idx" ON "qualifications" USING btree ("created_at"); + CREATE INDEX "assignments_leader_idx" ON "assignments" USING btree ("leader_id"); + CREATE INDEX "assignments_updated_at_idx" ON "assignments" USING btree ("updated_at"); + CREATE INDEX "assignments_created_at_idx" ON "assignments" USING btree ("created_at"); + CREATE INDEX "assignments_rels_order_idx" ON "assignments_rels" USING btree ("order"); + CREATE INDEX "assignments_rels_parent_idx" ON "assignments_rels" USING btree ("parent_id"); + CREATE INDEX "assignments_rels_path_idx" ON "assignments_rels" USING btree ("path"); + CREATE INDEX "assignments_rels_assignments_id_idx" ON "assignments_rels" USING btree ("assignments_id"); + CREATE INDEX "assignments_rels_users_id_idx" ON "assignments_rels" USING btree ("users_id"); + CREATE INDEX "missions_mission_roles_provided_roles_order_idx" ON "missions_mission_roles_provided_roles" USING btree ("_order"); + CREATE INDEX "missions_mission_roles_provided_roles_parent_id_idx" ON "missions_mission_roles_provided_roles" USING btree ("_parent_id"); + CREATE INDEX "missions_mission_roles_provided_roles_minimum_rank_idx" ON "missions_mission_roles_provided_roles" USING btree ("minimum_rank_id"); + CREATE INDEX "missions_briefing_order_idx" ON "missions_briefing" USING btree ("_order"); + CREATE INDEX "missions_briefing_parent_id_idx" ON "missions_briefing" USING btree ("_parent_id"); + CREATE INDEX "missions_mission_objectives_order_idx" ON "missions_mission_objectives" USING btree ("_order"); + CREATE INDEX "missions_mission_objectives_parent_id_idx" ON "missions_mission_objectives" USING btree ("_parent_id"); + CREATE INDEX "missions_factions_involved_order_idx" ON "missions_factions_involved" USING btree ("_order"); + CREATE INDEX "missions_factions_involved_parent_id_idx" ON "missions_factions_involved" USING btree ("_parent_id"); + CREATE INDEX "missions_logistics_and_support_insertion_order_idx" ON "missions_logistics_and_support_insertion" USING btree ("order"); + CREATE INDEX "missions_logistics_and_support_insertion_parent_idx" ON "missions_logistics_and_support_insertion" USING btree ("parent_id"); + CREATE INDEX "missions_logistics_and_support_extraction_order_idx" ON "missions_logistics_and_support_extraction" USING btree ("order"); + CREATE INDEX "missions_logistics_and_support_extraction_parent_idx" ON "missions_logistics_and_support_extraction" USING btree ("parent_id"); + CREATE INDEX "missions_logistics_and_support_assets_available_order_idx" ON "missions_logistics_and_support_assets_available" USING btree ("_order"); + CREATE INDEX "missions_logistics_and_support_assets_available_parent_id_idx" ON "missions_logistics_and_support_assets_available" USING btree ("_parent_id"); + CREATE INDEX "missions_comms_and_docs_frequencies_order_idx" ON "missions_comms_and_docs_frequencies" USING btree ("_order"); + CREATE INDEX "missions_comms_and_docs_frequencies_parent_id_idx" ON "missions_comms_and_docs_frequencies" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "missions_code_name_idx" ON "missions" USING btree ("code_name"); + CREATE INDEX "missions_classification_classification_map_idx" ON "missions" USING btree ("classification_map_id"); + CREATE INDEX "missions_classification_classification_campaign_idx" ON "missions" USING btree ("classification_campaign_id"); + CREATE INDEX "missions_game_details_game_setup_game_details_game_setup_idx" ON "missions" USING btree ("game_details_game_setup_mission_file_id"); + CREATE INDEX "missions_game_details_game_setup_game_details_game_set_1_idx" ON "missions" USING btree ("game_details_game_setup_required_mods_id"); + CREATE INDEX "missions_updated_at_idx" ON "missions" USING btree ("updated_at"); + CREATE INDEX "missions_created_at_idx" ON "missions" USING btree ("created_at"); + CREATE INDEX "missions_rels_order_idx" ON "missions_rels" USING btree ("order"); + CREATE INDEX "missions_rels_parent_idx" ON "missions_rels" USING btree ("parent_id"); + CREATE INDEX "missions_rels_path_idx" ON "missions_rels" USING btree ("path"); + CREATE INDEX "missions_rels_users_id_idx" ON "missions_rels" USING btree ("users_id"); + CREATE INDEX "missions_rels_qualifications_id_idx" ON "missions_rels" USING btree ("qualifications_id"); + CREATE UNIQUE INDEX "campaigns_name_idx" ON "campaigns" USING btree ("name"); + CREATE INDEX "campaigns_updated_at_idx" ON "campaigns" USING btree ("updated_at"); + CREATE INDEX "campaigns_created_at_idx" ON "campaigns" USING btree ("created_at"); + CREATE UNIQUE INDEX "factions_name_idx" ON "factions" USING btree ("name"); + CREATE INDEX "factions_updated_at_idx" ON "factions" USING btree ("updated_at"); + CREATE INDEX "factions_created_at_idx" ON "factions" USING btree ("created_at"); + CREATE INDEX "factions_rels_order_idx" ON "factions_rels" USING btree ("order"); + CREATE INDEX "factions_rels_parent_idx" ON "factions_rels" USING btree ("parent_id"); + CREATE INDEX "factions_rels_path_idx" ON "factions_rels" USING btree ("path"); + CREATE INDEX "factions_rels_campaigns_id_idx" ON "factions_rels" USING btree ("campaigns_id"); + CREATE INDEX "technologies_requirements_prerequisite_technologies_order_idx" ON "technologies_requirements_prerequisite_technologies" USING btree ("_order"); + CREATE INDEX "technologies_requirements_prerequisite_technologies_parent_id_idx" ON "technologies_requirements_prerequisite_technologies" USING btree ("_parent_id"); + CREATE INDEX "technologies_updated_at_idx" ON "technologies" USING btree ("updated_at"); + CREATE INDEX "technologies_created_at_idx" ON "technologies" USING btree ("created_at"); + CREATE INDEX "technologies_rels_order_idx" ON "technologies_rels" USING btree ("order"); + CREATE INDEX "technologies_rels_parent_idx" ON "technologies_rels" USING btree ("parent_id"); + CREATE INDEX "technologies_rels_path_idx" ON "technologies_rels" USING btree ("path"); + CREATE INDEX "technologies_rels_technologies_id_idx" ON "technologies_rels" USING btree ("technologies_id"); + CREATE INDEX "assets_crafting_crafting_data_inputs_order_idx" ON "assets_crafting_crafting_data_inputs" USING btree ("_order"); + CREATE INDEX "assets_crafting_crafting_data_inputs_parent_id_idx" ON "assets_crafting_crafting_data_inputs" USING btree ("_parent_id"); + CREATE INDEX "assets_crafting_crafting_data_byproducts_order_idx" ON "assets_crafting_crafting_data_byproducts" USING btree ("_order"); + CREATE INDEX "assets_crafting_crafting_data_byproducts_parent_id_idx" ON "assets_crafting_crafting_data_byproducts" USING btree ("_parent_id"); + CREATE INDEX "assets_asset_metadata_asset_metadata_thumbnail_idx" ON "assets" USING btree ("asset_metadata_thumbnail_id"); + CREATE INDEX "assets_updated_at_idx" ON "assets" USING btree ("updated_at"); + CREATE INDEX "assets_created_at_idx" ON "assets" USING btree ("created_at"); + CREATE INDEX "assets_rels_order_idx" ON "assets_rels" USING btree ("order"); + CREATE INDEX "assets_rels_parent_idx" ON "assets_rels" USING btree ("parent_id"); + CREATE INDEX "assets_rels_path_idx" ON "assets_rels" USING btree ("path"); + CREATE INDEX "assets_rels_assets_id_idx" ON "assets_rels" USING btree ("assets_id"); + CREATE INDEX "assets_rels_technologies_id_idx" ON "assets_rels" USING btree ("technologies_id"); + CREATE INDEX "assets_rels_resources_id_idx" ON "assets_rels" USING btree ("resources_id"); + CREATE INDEX "assets_rels_structures_id_idx" ON "assets_rels" USING btree ("structures_id"); + CREATE INDEX "resources_icon_idx" ON "resources" USING btree ("icon_id"); + CREATE INDEX "resources_updated_at_idx" ON "resources" USING btree ("updated_at"); + CREATE INDEX "resources_created_at_idx" ON "resources" USING btree ("created_at"); + CREATE INDEX "vehicles_category_order_idx" ON "vehicles_category" USING btree ("order"); + CREATE INDEX "vehicles_category_parent_idx" ON "vehicles_category" USING btree ("parent_id"); + CREATE INDEX "vehicles_materials_order_idx" ON "vehicles_materials" USING btree ("_order"); + CREATE INDEX "vehicles_materials_parent_id_idx" ON "vehicles_materials" USING btree ("_parent_id"); + CREATE INDEX "vehicles_materials_resource_idx" ON "vehicles_materials" USING btree ("resource_id"); + CREATE INDEX "vehicles_scrap_returns_order_idx" ON "vehicles_scrap_returns" USING btree ("_order"); + CREATE INDEX "vehicles_scrap_returns_parent_id_idx" ON "vehicles_scrap_returns" USING btree ("_parent_id"); + CREATE INDEX "vehicles_scrap_returns_resource_idx" ON "vehicles_scrap_returns" USING btree ("resource_id"); + CREATE INDEX "vehicles_upkeep_costs_order_idx" ON "vehicles_upkeep_costs" USING btree ("_order"); + CREATE INDEX "vehicles_upkeep_costs_parent_id_idx" ON "vehicles_upkeep_costs" USING btree ("_parent_id"); + CREATE INDEX "vehicles_upkeep_costs_resource_idx" ON "vehicles_upkeep_costs" USING btree ("resource_id"); + CREATE INDEX "vehicles_allowed_virtual_cargo_order_idx" ON "vehicles_allowed_virtual_cargo" USING btree ("_order"); + CREATE INDEX "vehicles_allowed_virtual_cargo_parent_id_idx" ON "vehicles_allowed_virtual_cargo" USING btree ("_parent_id"); + CREATE INDEX "vehicles_pylons_order_idx" ON "vehicles_pylons" USING btree ("_order"); + CREATE INDEX "vehicles_pylons_parent_id_idx" ON "vehicles_pylons" USING btree ("_parent_id"); + CREATE INDEX "vehicles_pylons_ammo_type_idx" ON "vehicles_pylons" USING btree ("ammo_type_id"); + CREATE INDEX "vehicles_image_idx" ON "vehicles" USING btree ("image_id"); + CREATE INDEX "vehicles_updated_at_idx" ON "vehicles" USING btree ("updated_at"); + CREATE INDEX "vehicles_created_at_idx" ON "vehicles" USING btree ("created_at"); + CREATE INDEX "vehicles_rels_order_idx" ON "vehicles_rels" USING btree ("order"); + CREATE INDEX "vehicles_rels_parent_idx" ON "vehicles_rels" USING btree ("parent_id"); + CREATE INDEX "vehicles_rels_path_idx" ON "vehicles_rels" USING btree ("path"); + CREATE INDEX "vehicles_rels_technologies_id_idx" ON "vehicles_rels" USING btree ("technologies_id"); + CREATE INDEX "vehicles_rels_assets_id_idx" ON "vehicles_rels" USING btree ("assets_id"); + CREATE INDEX "vehicles_rels_vehicles_id_idx" ON "vehicles_rels" USING btree ("vehicles_id"); + CREATE INDEX "vehicles_rels_resources_id_idx" ON "vehicles_rels" USING btree ("resources_id"); + CREATE INDEX "structures_materials_order_idx" ON "structures_materials" USING btree ("_order"); + CREATE INDEX "structures_materials_parent_id_idx" ON "structures_materials" USING btree ("_parent_id"); + CREATE INDEX "structures_materials_resource_idx" ON "structures_materials" USING btree ("resource_id"); + CREATE INDEX "structures_resources_in_range_order_idx" ON "structures_resources_in_range" USING btree ("_order"); + CREATE INDEX "structures_resources_in_range_parent_id_idx" ON "structures_resources_in_range" USING btree ("_parent_id"); + CREATE INDEX "structures_resources_in_range_resource_idx" ON "structures_resources_in_range" USING btree ("resource_id"); + CREATE INDEX "structures_structures_in_range_order_idx" ON "structures_structures_in_range" USING btree ("_order"); + CREATE INDEX "structures_structures_in_range_parent_id_idx" ON "structures_structures_in_range" USING btree ("_parent_id"); + CREATE INDEX "structures_structures_in_range_structure_idx" ON "structures_structures_in_range" USING btree ("structure_id"); + CREATE INDEX "structures_upkeep_order_idx" ON "structures_upkeep" USING btree ("_order"); + CREATE INDEX "structures_upkeep_parent_id_idx" ON "structures_upkeep" USING btree ("_parent_id"); + CREATE INDEX "structures_upkeep_resource_idx" ON "structures_upkeep" USING btree ("resource_id"); + CREATE INDEX "structures_auto_generated_resources_order_idx" ON "structures_auto_generated_resources" USING btree ("_order"); + CREATE INDEX "structures_auto_generated_resources_parent_id_idx" ON "structures_auto_generated_resources" USING btree ("_parent_id"); + CREATE INDEX "structures_auto_generated_resources_resource_idx" ON "structures_auto_generated_resources" USING btree ("resource_id"); + CREATE INDEX "structures_allowed_storage_order_idx" ON "structures_allowed_storage" USING btree ("_order"); + CREATE INDEX "structures_allowed_storage_parent_id_idx" ON "structures_allowed_storage" USING btree ("_parent_id"); + CREATE INDEX "structures_prohibited_storage_order_idx" ON "structures_prohibited_storage" USING btree ("_order"); + CREATE INDEX "structures_prohibited_storage_parent_id_idx" ON "structures_prohibited_storage" USING btree ("_parent_id"); + CREATE INDEX "structures_image_idx" ON "structures" USING btree ("image_id"); + CREATE INDEX "structures_upgrades_into_idx" ON "structures" USING btree ("upgrades_into_id"); + CREATE INDEX "structures_updated_at_idx" ON "structures" USING btree ("updated_at"); + CREATE INDEX "structures_created_at_idx" ON "structures" USING btree ("created_at"); + CREATE INDEX "structures_rels_order_idx" ON "structures_rels" USING btree ("order"); + CREATE INDEX "structures_rels_parent_idx" ON "structures_rels" USING btree ("parent_id"); + CREATE INDEX "structures_rels_path_idx" ON "structures_rels" USING btree ("path"); + CREATE INDEX "structures_rels_technologies_id_idx" ON "structures_rels" USING btree ("technologies_id"); + CREATE INDEX "structures_rels_assets_id_idx" ON "structures_rels" USING btree ("assets_id"); + CREATE INDEX "structures_rels_vehicles_id_idx" ON "structures_rels" USING btree ("vehicles_id"); + CREATE INDEX "structures_rels_resources_id_idx" ON "structures_rels" USING btree ("resources_id"); + CREATE UNIQUE INDEX "maps_name_idx" ON "maps" USING btree ("name"); + CREATE UNIQUE INDEX "maps_file_name_idx" ON "maps" USING btree ("file_name"); + CREATE INDEX "maps_updated_at_idx" ON "maps" USING btree ("updated_at"); + CREATE INDEX "maps_created_at_idx" ON "maps" USING btree ("created_at"); + CREATE INDEX "narrative_events_updated_at_idx" ON "narrative_events" USING btree ("updated_at"); + CREATE INDEX "narrative_events_created_at_idx" ON "narrative_events" USING btree ("created_at"); + CREATE INDEX "mission_files_author_idx" ON "mission_files" USING btree ("author_id"); + CREATE INDEX "mission_files_updated_at_idx" ON "mission_files" USING btree ("updated_at"); + CREATE INDEX "mission_files_created_at_idx" ON "mission_files" USING btree ("created_at"); + CREATE UNIQUE INDEX "mission_files_filename_idx" ON "mission_files" USING btree ("filename"); + CREATE INDEX "mod_lists_author_idx" ON "mod_lists" USING btree ("author_id"); + CREATE INDEX "mod_lists_updated_at_idx" ON "mod_lists" USING btree ("updated_at"); + CREATE INDEX "mod_lists_created_at_idx" ON "mod_lists" USING btree ("created_at"); + CREATE UNIQUE INDEX "mod_lists_filename_idx" ON "mod_lists" USING btree ("filename"); + CREATE INDEX "payload_locked_documents_global_slug_idx" ON "payload_locked_documents" USING btree ("global_slug"); + CREATE INDEX "payload_locked_documents_updated_at_idx" ON "payload_locked_documents" USING btree ("updated_at"); + CREATE INDEX "payload_locked_documents_created_at_idx" ON "payload_locked_documents" USING btree ("created_at"); + CREATE INDEX "payload_locked_documents_rels_order_idx" ON "payload_locked_documents_rels" USING btree ("order"); + CREATE INDEX "payload_locked_documents_rels_parent_idx" ON "payload_locked_documents_rels" USING btree ("parent_id"); + CREATE INDEX "payload_locked_documents_rels_path_idx" ON "payload_locked_documents_rels" USING btree ("path"); + CREATE INDEX "payload_locked_documents_rels_media_id_idx" ON "payload_locked_documents_rels" USING btree ("media_id"); + CREATE INDEX "payload_locked_documents_rels_users_id_idx" ON "payload_locked_documents_rels" USING btree ("users_id"); + CREATE INDEX "payload_locked_documents_rels_ranks_id_idx" ON "payload_locked_documents_rels" USING btree ("ranks_id"); + CREATE INDEX "payload_locked_documents_rels_profiles_id_idx" ON "payload_locked_documents_rels" USING btree ("profiles_id"); + CREATE INDEX "payload_locked_documents_rels_awards_id_idx" ON "payload_locked_documents_rels" USING btree ("awards_id"); + CREATE INDEX "payload_locked_documents_rels_qualifications_id_idx" ON "payload_locked_documents_rels" USING btree ("qualifications_id"); + CREATE INDEX "payload_locked_documents_rels_assignments_id_idx" ON "payload_locked_documents_rels" USING btree ("assignments_id"); + CREATE INDEX "payload_locked_documents_rels_missions_id_idx" ON "payload_locked_documents_rels" USING btree ("missions_id"); + CREATE INDEX "payload_locked_documents_rels_campaigns_id_idx" ON "payload_locked_documents_rels" USING btree ("campaigns_id"); + CREATE INDEX "payload_locked_documents_rels_factions_id_idx" ON "payload_locked_documents_rels" USING btree ("factions_id"); + CREATE INDEX "payload_locked_documents_rels_technologies_id_idx" ON "payload_locked_documents_rels" USING btree ("technologies_id"); + CREATE INDEX "payload_locked_documents_rels_assets_id_idx" ON "payload_locked_documents_rels" USING btree ("assets_id"); + CREATE INDEX "payload_locked_documents_rels_resources_id_idx" ON "payload_locked_documents_rels" USING btree ("resources_id"); + CREATE INDEX "payload_locked_documents_rels_vehicles_id_idx" ON "payload_locked_documents_rels" USING btree ("vehicles_id"); + CREATE INDEX "payload_locked_documents_rels_structures_id_idx" ON "payload_locked_documents_rels" USING btree ("structures_id"); + CREATE INDEX "payload_locked_documents_rels_maps_id_idx" ON "payload_locked_documents_rels" USING btree ("maps_id"); + CREATE INDEX "payload_locked_documents_rels_narrative_events_id_idx" ON "payload_locked_documents_rels" USING btree ("narrative_events_id"); + CREATE INDEX "payload_locked_documents_rels_mission_files_id_idx" ON "payload_locked_documents_rels" USING btree ("mission_files_id"); + CREATE INDEX "payload_locked_documents_rels_mod_lists_id_idx" ON "payload_locked_documents_rels" USING btree ("mod_lists_id"); + CREATE INDEX "payload_preferences_key_idx" ON "payload_preferences" USING btree ("key"); + CREATE INDEX "payload_preferences_updated_at_idx" ON "payload_preferences" USING btree ("updated_at"); + CREATE INDEX "payload_preferences_created_at_idx" ON "payload_preferences" USING btree ("created_at"); + CREATE INDEX "payload_preferences_rels_order_idx" ON "payload_preferences_rels" USING btree ("order"); + CREATE INDEX "payload_preferences_rels_parent_idx" ON "payload_preferences_rels" USING btree ("parent_id"); + CREATE INDEX "payload_preferences_rels_path_idx" ON "payload_preferences_rels" USING btree ("path"); + CREATE INDEX "payload_preferences_rels_users_id_idx" ON "payload_preferences_rels" USING btree ("users_id"); + CREATE INDEX "payload_migrations_updated_at_idx" ON "payload_migrations" USING btree ("updated_at"); + CREATE INDEX "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at"); + CREATE INDEX "game_rules_main_currency_idx" ON "game_rules" USING btree ("main_currency_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + DROP TABLE "media" CASCADE; + DROP TABLE "users_roles" CASCADE; + DROP TABLE "users_sessions" CASCADE; + DROP TABLE "users" CASCADE; + DROP TABLE "ranks" CASCADE; + DROP TABLE "profiles" CASCADE; + DROP TABLE "profiles_rels" CASCADE; + DROP TABLE "awards" CASCADE; + DROP TABLE "qualifications" CASCADE; + DROP TABLE "assignments" CASCADE; + DROP TABLE "assignments_rels" CASCADE; + DROP TABLE "missions_mission_roles_provided_roles" CASCADE; + DROP TABLE "missions_briefing" CASCADE; + DROP TABLE "missions_mission_objectives" CASCADE; + DROP TABLE "missions_factions_involved" CASCADE; + DROP TABLE "missions_logistics_and_support_insertion" CASCADE; + DROP TABLE "missions_logistics_and_support_extraction" CASCADE; + DROP TABLE "missions_logistics_and_support_assets_available" CASCADE; + DROP TABLE "missions_comms_and_docs_frequencies" CASCADE; + DROP TABLE "missions" CASCADE; + DROP TABLE "missions_rels" CASCADE; + DROP TABLE "campaigns" CASCADE; + DROP TABLE "factions" CASCADE; + DROP TABLE "factions_rels" CASCADE; + DROP TABLE "technologies_requirements_prerequisite_technologies" CASCADE; + DROP TABLE "technologies" CASCADE; + DROP TABLE "technologies_rels" CASCADE; + DROP TABLE "assets_crafting_crafting_data_inputs" CASCADE; + DROP TABLE "assets_crafting_crafting_data_byproducts" CASCADE; + DROP TABLE "assets" CASCADE; + DROP TABLE "assets_rels" CASCADE; + DROP TABLE "resources" CASCADE; + DROP TABLE "vehicles_category" CASCADE; + DROP TABLE "vehicles_materials" CASCADE; + DROP TABLE "vehicles_scrap_returns" CASCADE; + DROP TABLE "vehicles_upkeep_costs" CASCADE; + DROP TABLE "vehicles_allowed_virtual_cargo" CASCADE; + DROP TABLE "vehicles_pylons" CASCADE; + DROP TABLE "vehicles" CASCADE; + DROP TABLE "vehicles_rels" CASCADE; + DROP TABLE "structures_materials" CASCADE; + DROP TABLE "structures_resources_in_range" CASCADE; + DROP TABLE "structures_structures_in_range" CASCADE; + DROP TABLE "structures_upkeep" CASCADE; + DROP TABLE "structures_auto_generated_resources" CASCADE; + DROP TABLE "structures_allowed_storage" CASCADE; + DROP TABLE "structures_prohibited_storage" CASCADE; + DROP TABLE "structures" CASCADE; + DROP TABLE "structures_rels" CASCADE; + DROP TABLE "maps" CASCADE; + DROP TABLE "narrative_events" CASCADE; + DROP TABLE "mission_files" CASCADE; + DROP TABLE "mod_lists" CASCADE; + DROP TABLE "payload_locked_documents" CASCADE; + DROP TABLE "payload_locked_documents_rels" CASCADE; + DROP TABLE "payload_preferences" CASCADE; + DROP TABLE "payload_preferences_rels" CASCADE; + DROP TABLE "payload_migrations" CASCADE; + DROP TABLE "game_rules" CASCADE; + DROP TYPE "public"."enum_users_roles"; + DROP TYPE "public"."enum_awards_type"; + DROP TYPE "public"."enum_assignments_type"; + DROP TYPE "public"."enum_missions_factions_involved_threat_level"; + DROP TYPE "public"."enum_missions_logistics_and_support_insertion"; + DROP TYPE "public"."enum_missions_logistics_and_support_extraction"; + DROP TYPE "public"."enum_missions_operation_type"; + DROP TYPE "public"."enum_missions_classification_mission_type"; + DROP TYPE "public"."enum_missions_ownership_and_status_status"; + DROP TYPE "public"."enum_missions_ownership_and_status_visibility"; + DROP TYPE "public"."enum_missions_civilian_presence"; + DROP TYPE "public"."enum_campaigns_status"; + DROP TYPE "public"."enum_factions_type"; + DROP TYPE "public"."enum_technologies_type"; + DROP TYPE "public"."enum_assets_asset_type"; + DROP TYPE "public"."enum_assets_weapon_configuration_slot_type"; + DROP TYPE "public"."enum_assets_nightvision_configuration_nvg_generation"; + DROP TYPE "public"."enum_assets_market_trading_rarity"; + DROP TYPE "public"."enum_resources_type"; + DROP TYPE "public"."enum_resources_rarity"; + DROP TYPE "public"."enum_vehicles_category"; + DROP TYPE "public"."enum_vehicles_pylons_pylon_type"; + DROP TYPE "public"."enum_vehicles_armor_rating"; + DROP TYPE "public"."enum_structures_category"; + DROP TYPE "public"."enum_structures_terrain_type"; + DROP TYPE "public"."enum_structures_function_type";`) +} diff --git a/src/migrations/20251212_183607.json b/src/migrations/20251212_183607.json new file mode 100644 index 0000000..c7353fa --- /dev/null +++ b/src/migrations/20251212_183607.json @@ -0,0 +1,8535 @@ +{ + "id": "5f20fe44-0c4d-4e1d-9e4f-56877fd4a42b", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_awards_id_idx": { + "name": "profiles_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_awards_fk": { + "name": "profiles_rels_awards_fk", + "tableFrom": "profiles_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_name": { + "name": "faction_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "requirements_intelligence_points": { + "name": "requirements_intelligence_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "frequency": { + "name": "frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_file_name_idx": { + "name": "maps_file_name_idx", + "columns": [ + { + "expression": "file_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "admin", + "developer" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/src/migrations/20251212_183607.ts b/src/migrations/20251212_183607.ts new file mode 100644 index 0000000..1e30352 --- /dev/null +++ b/src/migrations/20251212_183607.ts @@ -0,0 +1,11 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + ALTER TABLE "media" ALTER COLUMN "alt" DROP NOT NULL;`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "media" ALTER COLUMN "alt" SET NOT NULL;`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts new file mode 100644 index 0000000..201c1dc --- /dev/null +++ b/src/migrations/index.ts @@ -0,0 +1,15 @@ +import * as migration_20251206_065831 from './20251206_065831'; +import * as migration_20251212_183607 from './20251212_183607'; + +export const migrations = [ + { + up: migration_20251206_065831.up, + down: migration_20251206_065831.down, + name: '20251206_065831', + }, + { + up: migration_20251212_183607.up, + down: migration_20251212_183607.down, + name: '20251212_183607' + }, +]; diff --git a/src/payload-generated-schema.ts b/src/payload-generated-schema.ts new file mode 100644 index 0000000..9b9a8b1 --- /dev/null +++ b/src/payload-generated-schema.ts @@ -0,0 +1,2864 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * This file was automatically generated by Payload. + * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config, + * and re-run `payload generate:db-schema` to regenerate this file. + */ + +import type {} from "@payloadcms/db-postgres"; +import { + pgTable, + index, + uniqueIndex, + foreignKey, + serial, + varchar, + timestamp, + numeric, + integer, + jsonb, + boolean, + type AnyPgColumn, + pgEnum, +} from "@payloadcms/db-postgres/drizzle/pg-core"; +import { sql, relations } from "@payloadcms/db-postgres/drizzle"; +export const enum_users_roles = pgEnum("enum_users_roles", ["guest", "user", "admin", "developer"]); +export const enum_awards_type = pgEnum("enum_awards_type", ["commendation", "ribbon", "medal"]); +export const enum_assignments_type = pgEnum("enum_assignments_type", [ + "division", + "squad", + "team", + "special", +]); +export const enum_missions_factions_involved_threat_level = pgEnum( + "enum_missions_factions_involved_threat_level", + ["ally", "friendly", "neutral", "hostile"], +); +export const enum_missions_logistics_and_support_insertion = pgEnum( + "enum_missions_logistics_and_support_insertion", + ["helicopter", "aircraft", "paradrop", "boat", "car", "onFoot"], +); +export const enum_missions_logistics_and_support_extraction = pgEnum( + "enum_missions_logistics_and_support_extraction", + ["helicopter", "aircraft", "paradrop", "boat", "car", "onFoot"], +); +export const enum_missions_operation_type = pgEnum("enum_missions_operation_type", [ + "main", + "side", + "external", +]); +export const enum_missions_classification_mission_type = pgEnum( + "enum_missions_classification_mission_type", + ["Zeus", "PvE", "PvP", "PvPvE", "Training", "Special"], +); +export const enum_missions_ownership_and_status_status = pgEnum( + "enum_missions_ownership_and_status_status", + ["Concept", "Planning", "Ready", "Scheduled", "Active", "Completed", "Cancelled"], +); +export const enum_missions_ownership_and_status_visibility = pgEnum( + "enum_missions_ownership_and_status_visibility", + ["unit", "leadership", "intel", "private"], +); +export const enum_missions_civilian_presence = pgEnum("enum_missions_civilian_presence", [ + "None", + "Low", + "Medium", + "High", +]); +export const enum_campaigns_status = pgEnum("enum_campaigns_status", [ + "concept", + "inProgress", + "completed", +]); +export const enum_factions_type = pgEnum("enum_factions_type", [ + "majorFaction", + "minorFaction", + "corporation", + "special", +]); +export const enum_technologies_type = pgEnum("enum_technologies_type", ["asset", "upgrade"]); +export const enum_assets_asset_type = pgEnum("enum_assets_asset_type", [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "miscellaneous", +]); +export const enum_assets_weapon_configuration_slot_type = pgEnum( + "enum_assets_weapon_configuration_slot_type", + ["primary", "secondary", "launcher"], +); +export const enum_assets_nightvision_configuration_nvg_generation = pgEnum( + "enum_assets_nightvision_configuration_nvg_generation", + ["gen1", "gen2", "gen3"], +); +export const enum_assets_market_trading_rarity = pgEnum("enum_assets_market_trading_rarity", [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique", +]); +export const enum_resources_type = pgEnum("enum_resources_type", [ + "physical", + "fluid", + "energy", + "abstract", +]); +export const enum_resources_rarity = pgEnum("enum_resources_rarity", [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique", +]); +export const enum_vehicles_category = pgEnum("enum_vehicles_category", [ + "civilian", + "utility", + "transport", + "weaponized", + "military", +]); +export const enum_vehicles_pylons_pylon_type = pgEnum("enum_vehicles_pylons_pylon_type", [ + "mountedWeapon", + "pylon", +]); +export const enum_vehicles_armor_rating = pgEnum("enum_vehicles_armor_rating", [ + "none", + "light", + "medium", + "heavy", + "composite", +]); +export const enum_structures_category = pgEnum("enum_structures_category", [ + "logistics", + "military", + "civilian", +]); +export const enum_structures_terrain_type = pgEnum("enum_structures_terrain_type", [ + "land", + "water", +]); +export const enum_structures_function_type = pgEnum("enum_structures_function_type", [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous", +]); + +export const media = pgTable( + "media", + { + id: serial("id").primaryKey(), + alt: varchar("alt"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + url: varchar("url"), + thumbnailURL: varchar("thumbnail_u_r_l"), + filename: varchar("filename"), + mimeType: varchar("mime_type"), + filesize: numeric("filesize"), + width: numeric("width"), + height: numeric("height"), + focalX: numeric("focal_x"), + focalY: numeric("focal_y"), + }, + (columns) => [ + index("media_updated_at_idx").on(columns.updatedAt), + index("media_created_at_idx").on(columns.createdAt), + uniqueIndex("media_filename_idx").on(columns.filename), + ], +); + +export const users_roles = pgTable( + "users_roles", + { + order: integer("order").notNull(), + parent: integer("parent_id").notNull(), + value: enum_users_roles("value"), + id: serial("id").primaryKey(), + }, + (columns) => [ + index("users_roles_order_idx").on(columns.order), + index("users_roles_parent_idx").on(columns.parent), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [users.id], + name: "users_roles_parent_fk", + }).onDelete("cascade"), + ], +); + +export const users_sessions = pgTable( + "users_sessions", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }), + expiresAt: timestamp("expires_at", { + mode: "string", + withTimezone: true, + precision: 3, + }).notNull(), + }, + (columns) => [ + index("users_sessions_order_idx").on(columns._order), + index("users_sessions_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [users.id], + name: "users_sessions_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const users = pgTable( + "users", + { + id: serial("id").primaryKey(), + discordUsername: varchar("discord_username").notNull(), + displayName: varchar("display_name").notNull(), + payloadDisplayName: varchar("payload_display_name"), + steamId: varchar("steam_id").notNull(), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + email: varchar("email"), + username: varchar("username").notNull(), + resetPasswordToken: varchar("reset_password_token"), + resetPasswordExpiration: timestamp("reset_password_expiration", { + mode: "string", + withTimezone: true, + precision: 3, + }), + salt: varchar("salt"), + hash: varchar("hash"), + loginAttempts: numeric("login_attempts").default("0"), + lockUntil: timestamp("lock_until", { mode: "string", withTimezone: true, precision: 3 }), + }, + (columns) => [ + uniqueIndex("users_discord_username_idx").on(columns.discordUsername), + index("users_updated_at_idx").on(columns.updatedAt), + index("users_created_at_idx").on(columns.createdAt), + uniqueIndex("users_username_idx").on(columns.username), + ], +); + +export const ranks = pgTable( + "ranks", + { + id: serial("id").primaryKey(), + _order: varchar("_order"), + name: varchar("name").notNull(), + abbreviation: varchar("abbreviation").notNull(), + description: varchar("description").notNull(), + insignia: integer("insignia_id").references(() => media.id, { + onDelete: "set null", + }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("ranks__order_idx").on(columns._order), + uniqueIndex("ranks_name_idx").on(columns.name), + uniqueIndex("ranks_abbreviation_idx").on(columns.abbreviation), + index("ranks_insignia_idx").on(columns.insignia), + index("ranks_updated_at_idx").on(columns.updatedAt), + index("ranks_created_at_idx").on(columns.createdAt), + ], +); + +export const profiles = pgTable( + "profiles", + { + id: serial("id").primaryKey(), + user: integer("user_id") + .notNull() + .references(() => users.id, { + onDelete: "set null", + }), + rank: integer("rank_id") + .notNull() + .references(() => ranks.id, { + onDelete: "set null", + }), + dossier_personalExcerpt: varchar("dossier_personal_excerpt"), + dossier_intelExcerpt: jsonb("dossier_intel_excerpt"), + progression_scoreboard_infantryKills: numeric("progression_scoreboard_infantry_kills").default( + "0", + ), + progression_scoreboard_vehicleKills: numeric("progression_scoreboard_vehicle_kills").default( + "0", + ), + progression_scoreboard_armorKills: numeric("progression_scoreboard_armor_kills").default("0"), + progression_scoreboard_airKills: numeric("progression_scoreboard_air_kills").default("0"), + progression_scoreboard_deaths: numeric("progression_scoreboard_deaths").default("0"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("profiles_user_idx").on(columns.user), + index("profiles_rank_idx").on(columns.rank), + index("profiles_updated_at_idx").on(columns.updatedAt), + index("profiles_created_at_idx").on(columns.createdAt), + ], +); + +export const profiles_rels = pgTable( + "profiles_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + awardsID: integer("awards_id"), + }, + (columns) => [ + index("profiles_rels_order_idx").on(columns.order), + index("profiles_rels_parent_idx").on(columns.parent), + index("profiles_rels_path_idx").on(columns.path), + index("profiles_rels_awards_id_idx").on(columns.awardsID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [profiles.id], + name: "profiles_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["awardsID"]], + foreignColumns: [awards.id], + name: "profiles_rels_awards_fk", + }).onDelete("cascade"), + ], +); + +export const awards = pgTable( + "awards", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + description: jsonb("description").notNull(), + type: enum_awards_type("type").default("commendation"), + image: integer("image_id").references(() => media.id, { + onDelete: "set null", + }), + experiencePoints: numeric("experience_points"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("awards_name_idx").on(columns.name), + index("awards_image_idx").on(columns.image), + index("awards_updated_at_idx").on(columns.updatedAt), + index("awards_created_at_idx").on(columns.createdAt), + ], +); + +export const qualifications = pgTable( + "qualifications", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("qualifications_name_idx").on(columns.name), + index("qualifications_updated_at_idx").on(columns.updatedAt), + index("qualifications_created_at_idx").on(columns.createdAt), + ], +); + +export const assignments = pgTable( + "assignments", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + type: enum_assignments_type("type").notNull(), + callsign: varchar("callsign"), + description: jsonb("description"), + leader: integer("leader_id").references(() => users.id, { + onDelete: "set null", + }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("assignments_leader_idx").on(columns.leader), + index("assignments_updated_at_idx").on(columns.updatedAt), + index("assignments_created_at_idx").on(columns.createdAt), + ], +); + +export const assignments_rels = pgTable( + "assignments_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + assignmentsID: integer("assignments_id"), + usersID: integer("users_id"), + }, + (columns) => [ + index("assignments_rels_order_idx").on(columns.order), + index("assignments_rels_parent_idx").on(columns.parent), + index("assignments_rels_path_idx").on(columns.path), + index("assignments_rels_assignments_id_idx").on(columns.assignmentsID), + index("assignments_rels_users_id_idx").on(columns.usersID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [assignments.id], + name: "assignments_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assignmentsID"]], + foreignColumns: [assignments.id], + name: "assignments_rels_assignments_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["usersID"]], + foreignColumns: [users.id], + name: "assignments_rels_users_fk", + }).onDelete("cascade"), + ], +); + +export const missions_mission_roles_provided_roles = pgTable( + "missions_mission_roles_provided_roles", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + roleName: varchar("role_name").notNull(), + missionCritical: boolean("mission_critical").default(true), + minimumRank: integer("minimum_rank_id").references(() => ranks.id, { + onDelete: "set null", + }), + }, + (columns) => [ + index("missions_mission_roles_provided_roles_order_idx").on(columns._order), + index("missions_mission_roles_provided_roles_parent_id_idx").on(columns._parentID), + index("missions_mission_roles_provided_roles_minimum_rank_idx").on(columns.minimumRank), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_mission_roles_provided_roles_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions_briefing = pgTable( + "missions_briefing", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + sectionName: varchar("section_name").notNull(), + details: jsonb("details").notNull(), + }, + (columns) => [ + index("missions_briefing_order_idx").on(columns._order), + index("missions_briefing_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_briefing_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions_mission_objectives = pgTable( + "missions_mission_objectives", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + title: varchar("title").notNull(), + description: varchar("description"), + missionCritical: boolean("mission_critical").default(true), + successOrFailConditions: varchar("success_or_fail_conditions"), + }, + (columns) => [ + index("missions_mission_objectives_order_idx").on(columns._order), + index("missions_mission_objectives_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_mission_objectives_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions_factions_involved = pgTable( + "missions_factions_involved", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + factionName: varchar("faction_name").notNull(), + threatLevel: enum_missions_factions_involved_threat_level("threat_level") + .notNull() + .default("hostile"), + }, + (columns) => [ + index("missions_factions_involved_order_idx").on(columns._order), + index("missions_factions_involved_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_factions_involved_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions_logistics_and_support_insertion = pgTable( + "missions_logistics_and_support_insertion", + { + order: integer("order").notNull(), + parent: integer("parent_id").notNull(), + value: enum_missions_logistics_and_support_insertion("value"), + id: serial("id").primaryKey(), + }, + (columns) => [ + index("missions_logistics_and_support_insertion_order_idx").on(columns.order), + index("missions_logistics_and_support_insertion_parent_idx").on(columns.parent), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [missions.id], + name: "missions_logistics_and_support_insertion_parent_fk", + }).onDelete("cascade"), + ], +); + +export const missions_logistics_and_support_extraction = pgTable( + "missions_logistics_and_support_extraction", + { + order: integer("order").notNull(), + parent: integer("parent_id").notNull(), + value: enum_missions_logistics_and_support_extraction("value"), + id: serial("id").primaryKey(), + }, + (columns) => [ + index("missions_logistics_and_support_extraction_order_idx").on(columns.order), + index("missions_logistics_and_support_extraction_parent_idx").on(columns.parent), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [missions.id], + name: "missions_logistics_and_support_extraction_parent_fk", + }).onDelete("cascade"), + ], +); + +export const missions_logistics_and_support_assets_available = pgTable( + "missions_logistics_and_support_assets_available", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + assetType: varchar("asset_type").notNull(), + assetCount: varchar("asset_count"), + doesRespawn: boolean("does_respawn"), + assetCallsign: varchar("asset_callsign"), + }, + (columns) => [ + index("missions_logistics_and_support_assets_available_order_idx").on(columns._order), + index("missions_logistics_and_support_assets_available_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_logistics_and_support_assets_available_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions_comms_and_docs_frequencies = pgTable( + "missions_comms_and_docs_frequencies", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + frequency: numeric("frequency").notNull(), + channel: numeric("channel"), + netName: varchar("net_name").notNull(), + freqUsage: varchar("freq_usage").notNull(), + }, + (columns) => [ + index("missions_comms_and_docs_frequencies_order_idx").on(columns._order), + index("missions_comms_and_docs_frequencies_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [missions.id], + name: "missions_comms_and_docs_frequencies_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const missions = pgTable( + "missions", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + codeName: varchar("code_name").notNull(), + summary: varchar("summary").notNull(), + operationType: enum_missions_operation_type("operation_type").notNull(), + classification_map: integer("classification_map_id") + .notNull() + .references(() => maps.id, { + onDelete: "set null", + }), + classification_missionType: enum_missions_classification_mission_type( + "classification_mission_type", + ) + .notNull() + .default("Zeus"), + classification_campaign: integer("classification_campaign_id") + .notNull() + .references(() => campaigns.id, { + onDelete: "set null", + }), + classification_customScripts: boolean("classification_custom_scripts"), + classification_startDateTime: timestamp("classification_start_date_time", { + mode: "string", + withTimezone: true, + precision: 3, + }).notNull(), + classification_estimatedDuration: numeric("classification_estimated_duration") + .notNull() + .default("240"), + ownershipAndStatus_status: enum_missions_ownership_and_status_status( + "ownership_and_status_status", + ) + .notNull() + .default("Concept"), + ownershipAndStatus_visibility: enum_missions_ownership_and_status_visibility( + "ownership_and_status_visibility", + ) + .notNull() + .default("leadership"), + missionRoles_maxPlayers: numeric("mission_roles_max_players").notNull().default("32"), + missionRoles_notes: varchar("mission_roles_notes"), + civilianPresence: enum_missions_civilian_presence("civilian_presence").default("None"), + gameDetails_serverDetails_serverIp: varchar("game_details_server_details_server_ip") + .notNull() + .default("arma.onyxsimple.com"), + gameDetails_serverDetails_serverPort: numeric("game_details_server_details_server_port") + .notNull() + .default("2302"), + gameDetails_serverDetails_serverPassword: varchar( + "game_details_server_details_server_password", + ).default("ptf313"), + gameDetails_gameSetup_missionFile: integer("game_details_game_setup_mission_file_id") + .notNull() + .references(() => mission_files.id, { + onDelete: "set null", + }), + gameDetails_gameSetup_requiredMods: integer( + "game_details_game_setup_required_mods_id", + ).references(() => mod_lists.id, { + onDelete: "set null", + }), + commsAndDocs_radioPlan: jsonb("comms_and_docs_radio_plan"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("missions_code_name_idx").on(columns.codeName), + index("missions_classification_classification_map_idx").on(columns.classification_map), + index("missions_classification_classification_campaign_idx").on( + columns.classification_campaign, + ), + index("missions_game_details_game_setup_game_details_game_setup_idx").on( + columns.gameDetails_gameSetup_missionFile, + ), + index("missions_game_details_game_setup_game_details_game_set_1_idx").on( + columns.gameDetails_gameSetup_requiredMods, + ), + index("missions_updated_at_idx").on(columns.updatedAt), + index("missions_created_at_idx").on(columns.createdAt), + ], +); + +export const missions_rels = pgTable( + "missions_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + usersID: integer("users_id"), + qualificationsID: integer("qualifications_id"), + }, + (columns) => [ + index("missions_rels_order_idx").on(columns.order), + index("missions_rels_parent_idx").on(columns.parent), + index("missions_rels_path_idx").on(columns.path), + index("missions_rels_users_id_idx").on(columns.usersID), + index("missions_rels_qualifications_id_idx").on(columns.qualificationsID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [missions.id], + name: "missions_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["usersID"]], + foreignColumns: [users.id], + name: "missions_rels_users_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["qualificationsID"]], + foreignColumns: [qualifications.id], + name: "missions_rels_qualifications_fk", + }).onDelete("cascade"), + ], +); + +export const campaigns = pgTable( + "campaigns", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + summary: varchar("summary").notNull().default("An Arma 3 campaign."), + status: enum_campaigns_status("status").notNull().default("concept"), + description: jsonb("description"), + startDate: timestamp("start_date", { mode: "string", withTimezone: true, precision: 3 }), + endDate: timestamp("end_date", { mode: "string", withTimezone: true, precision: 3 }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("campaigns_name_idx").on(columns.name), + index("campaigns_updated_at_idx").on(columns.updatedAt), + index("campaigns_created_at_idx").on(columns.createdAt), + ], +); + +export const factions = pgTable( + "factions", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + type: enum_factions_type("type").notNull().default("minorFaction"), + description: jsonb("description"), + playableFaction: boolean("playable_faction"), + startingFaction: boolean("starting_faction"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("factions_name_idx").on(columns.name), + index("factions_updated_at_idx").on(columns.updatedAt), + index("factions_created_at_idx").on(columns.createdAt), + ], +); + +export const factions_rels = pgTable( + "factions_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + campaignsID: integer("campaigns_id"), + }, + (columns) => [ + index("factions_rels_order_idx").on(columns.order), + index("factions_rels_parent_idx").on(columns.parent), + index("factions_rels_path_idx").on(columns.path), + index("factions_rels_campaigns_id_idx").on(columns.campaignsID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [factions.id], + name: "factions_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["campaignsID"]], + foreignColumns: [campaigns.id], + name: "factions_rels_campaigns_fk", + }).onDelete("cascade"), + ], +); + +export const technologies_requirements_prerequisite_technologies = pgTable( + "technologies_requirements_prerequisite_technologies", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + }, + (columns) => [ + index("technologies_requirements_prerequisite_technologies_order_idx").on(columns._order), + index("technologies_requirements_prerequisite_technologies_parent_id_idx").on( + columns._parentID, + ), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [technologies.id], + name: "technologies_requirements_prerequisite_technologies_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const technologies = pgTable( + "technologies", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + type: enum_technologies_type("type").notNull().default("upgrade"), + summary: varchar("summary").notNull(), + description: jsonb("description"), + requirements_intelligencePoints: numeric("requirements_intelligence_points"), + researchCosts_minimumResearchDuration: numeric("research_costs_minimum_research_duration") + .notNull() + .default("0"), + researchCosts_maximumResearchDuration: numeric("research_costs_maximum_research_duration"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("technologies_updated_at_idx").on(columns.updatedAt), + index("technologies_created_at_idx").on(columns.createdAt), + ], +); + +export const technologies_rels = pgTable( + "technologies_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + technologiesID: integer("technologies_id"), + }, + (columns) => [ + index("technologies_rels_order_idx").on(columns.order), + index("technologies_rels_parent_idx").on(columns.parent), + index("technologies_rels_path_idx").on(columns.path), + index("technologies_rels_technologies_id_idx").on(columns.technologiesID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [technologies.id], + name: "technologies_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["technologiesID"]], + foreignColumns: [technologies.id], + name: "technologies_rels_technologies_fk", + }).onDelete("cascade"), + ], +); + +export const assets_crafting_crafting_data_inputs = pgTable( + "assets_crafting_crafting_data_inputs", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + quantity: numeric("quantity"), + lended: boolean("lended"), + }, + (columns) => [ + index("assets_crafting_crafting_data_inputs_order_idx").on(columns._order), + index("assets_crafting_crafting_data_inputs_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [assets.id], + name: "assets_crafting_crafting_data_inputs_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const assets_crafting_crafting_data_byproducts = pgTable( + "assets_crafting_crafting_data_byproducts", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + quantity: numeric("quantity"), + }, + (columns) => [ + index("assets_crafting_crafting_data_byproducts_order_idx").on(columns._order), + index("assets_crafting_crafting_data_byproducts_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [assets.id], + name: "assets_crafting_crafting_data_byproducts_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const assets = pgTable( + "assets", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + className: varchar("class_name").notNull().default(""), + assetType: enum_assets_asset_type("asset_type").notNull().default("weapon"), + "Weapon Configuration_slotType": enum_assets_weapon_configuration_slot_type( + "weapon_configuration_slot_type", + ), + "Nightvision Configuration_nvgGeneration": enum_assets_nightvision_configuration_nvg_generation( + "nightvision_configuration_nvg_generation", + ), + "Nightvision Configuration_nvgHasThermals": boolean( + "nightvision_configuration_nvg_has_thermals", + ), + "Container Configuration_capacityKg": numeric("container_configuration_capacity_kg"), + "Container Configuration_weightKg": numeric("container_configuration_weight_kg"), + "Magazine Configuration_roundCapacity": numeric("magazine_configuration_round_capacity"), + "Magazine Configuration_ammoType": varchar("magazine_configuration_ammo_type"), + "Magazine Configuration_greenmagCompatible": boolean( + "magazine_configuration_greenmag_compatible", + ), + "Asset Metadata_mod": varchar("asset_metadata_mod"), + "Asset Metadata_thumbnail": integer("asset_metadata_thumbnail_id").references(() => media.id, { + onDelete: "set null", + }), + "Asset Metadata_gameDescription": varchar("asset_metadata_game_description"), + tradeable: boolean("tradeable"), + marketTrading_Rarity: enum_assets_market_trading_rarity("market_trading_rarity"), + marketTrading_perceivedValue_baseBuyPrice: numeric( + "market_trading_perceived_value_base_buy_price", + ), + marketTrading_perceivedValue_baseSellPrice: numeric( + "market_trading_perceived_value_base_sell_price", + ), + crafting_craftable: boolean("crafting_craftable"), + crafting_blueprintRequired: boolean("crafting_blueprint_required"), + crafting_technologyRequiredToUse: boolean("crafting_technology_required_to_use"), + crafting_craftingData_craftingTimePerUnit: numeric( + "crafting_crafting_data_crafting_time_per_unit", + ) + .notNull() + .default("1"), + crafting_craftingData_batchSize: numeric("crafting_crafting_data_batch_size") + .notNull() + .default("1"), + isLive: boolean("is_live"), + notes: jsonb("notes"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("assets_asset_metadata_asset_metadata_thumbnail_idx").on( + columns["Asset Metadata_thumbnail"], + ), + index("assets_updated_at_idx").on(columns.updatedAt), + index("assets_created_at_idx").on(columns.createdAt), + ], +); + +export const assets_rels = pgTable( + "assets_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + assetsID: integer("assets_id"), + technologiesID: integer("technologies_id"), + resourcesID: integer("resources_id"), + structuresID: integer("structures_id"), + }, + (columns) => [ + index("assets_rels_order_idx").on(columns.order), + index("assets_rels_parent_idx").on(columns.parent), + index("assets_rels_path_idx").on(columns.path), + index("assets_rels_assets_id_idx").on(columns.assetsID), + index("assets_rels_technologies_id_idx").on(columns.technologiesID), + index("assets_rels_resources_id_idx").on(columns.resourcesID), + index("assets_rels_structures_id_idx").on(columns.structuresID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [assets.id], + name: "assets_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assetsID"]], + foreignColumns: [assets.id], + name: "assets_rels_assets_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["technologiesID"]], + foreignColumns: [technologies.id], + name: "assets_rels_technologies_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["resourcesID"]], + foreignColumns: [resources.id], + name: "assets_rels_resources_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["structuresID"]], + foreignColumns: [structures.id], + name: "assets_rels_structures_fk", + }).onDelete("cascade"), + ], +); + +export const resources = pgTable( + "resources", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + codeName: varchar("code_name").notNull(), + type: enum_resources_type("type").notNull().default("physical"), + description: jsonb("description"), + icon: integer("icon_id").references(() => media.id, { + onDelete: "set null", + }), + color: varchar("color"), + baseValue: numeric("base_value").notNull().default("1"), + tradeable: boolean("tradeable"), + rarity: enum_resources_rarity("rarity").notNull().default("common"), + unitOfMeasure: varchar("unit_of_measure").notNull(), + massPerUnit: numeric("mass_per_unit").notNull().default("0"), + stackSize: numeric("stack_size").default("1"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("resources_icon_idx").on(columns.icon), + index("resources_updated_at_idx").on(columns.updatedAt), + index("resources_created_at_idx").on(columns.createdAt), + ], +); + +export const vehicles_category = pgTable( + "vehicles_category", + { + order: integer("order").notNull(), + parent: integer("parent_id").notNull(), + value: enum_vehicles_category("value"), + id: serial("id").primaryKey(), + }, + (columns) => [ + index("vehicles_category_order_idx").on(columns.order), + index("vehicles_category_parent_idx").on(columns.parent), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [vehicles.id], + name: "vehicles_category_parent_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles_materials = pgTable( + "vehicles_materials", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id") + .notNull() + .references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount"), + }, + (columns) => [ + index("vehicles_materials_order_idx").on(columns._order), + index("vehicles_materials_parent_id_idx").on(columns._parentID), + index("vehicles_materials_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [vehicles.id], + name: "vehicles_materials_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles_scrap_returns = pgTable( + "vehicles_scrap_returns", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id") + .notNull() + .references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount").default("1"), + chance: numeric("chance").default("100"), + }, + (columns) => [ + index("vehicles_scrap_returns_order_idx").on(columns._order), + index("vehicles_scrap_returns_parent_id_idx").on(columns._parentID), + index("vehicles_scrap_returns_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [vehicles.id], + name: "vehicles_scrap_returns_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles_upkeep_costs = pgTable( + "vehicles_upkeep_costs", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id") + .notNull() + .references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount").default("1"), + }, + (columns) => [ + index("vehicles_upkeep_costs_order_idx").on(columns._order), + index("vehicles_upkeep_costs_parent_id_idx").on(columns._parentID), + index("vehicles_upkeep_costs_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [vehicles.id], + name: "vehicles_upkeep_costs_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles_allowed_virtual_cargo = pgTable( + "vehicles_allowed_virtual_cargo", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + amount: numeric("amount").default("1"), + }, + (columns) => [ + index("vehicles_allowed_virtual_cargo_order_idx").on(columns._order), + index("vehicles_allowed_virtual_cargo_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [vehicles.id], + name: "vehicles_allowed_virtual_cargo_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles_pylons = pgTable( + "vehicles_pylons", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + pylonName: varchar("pylon_name").notNull(), + pylonType: enum_vehicles_pylons_pylon_type("pylon_type").notNull().default("mountedWeapon"), + amount: numeric("amount").default("1"), + ammoType: integer("ammo_type_id").references(() => assets.id, { + onDelete: "set null", + }), + }, + (columns) => [ + index("vehicles_pylons_order_idx").on(columns._order), + index("vehicles_pylons_parent_id_idx").on(columns._parentID), + index("vehicles_pylons_ammo_type_idx").on(columns.ammoType), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [vehicles.id], + name: "vehicles_pylons_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const vehicles = pgTable( + "vehicles", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + classname: varchar("classname"), + Description: jsonb("description"), + image: integer("image_id").references(() => media.id, { + onDelete: "set null", + }), + constructionTime: numeric("construction_time"), + width: numeric("width"), + height: numeric("height"), + maxMass: numeric("max_mass"), + aceCargoSlots: numeric("ace_cargo_slots"), + maxHealth: numeric("max_health"), + armorRating: enum_vehicles_armor_rating("armor_rating"), + maxSpeedOnRoad: numeric("max_speed_on_road"), + maxSpeedOffRoad: numeric("max_speed_off_road"), + maxAirspeed: numeric("max_airspeed"), + maxKnots: numeric("max_knots"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("vehicles_image_idx").on(columns.image), + index("vehicles_updated_at_idx").on(columns.updatedAt), + index("vehicles_created_at_idx").on(columns.createdAt), + ], +); + +export const vehicles_rels = pgTable( + "vehicles_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + technologiesID: integer("technologies_id"), + assetsID: integer("assets_id"), + vehiclesID: integer("vehicles_id"), + resourcesID: integer("resources_id"), + }, + (columns) => [ + index("vehicles_rels_order_idx").on(columns.order), + index("vehicles_rels_parent_idx").on(columns.parent), + index("vehicles_rels_path_idx").on(columns.path), + index("vehicles_rels_technologies_id_idx").on(columns.technologiesID), + index("vehicles_rels_assets_id_idx").on(columns.assetsID), + index("vehicles_rels_vehicles_id_idx").on(columns.vehiclesID), + index("vehicles_rels_resources_id_idx").on(columns.resourcesID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [vehicles.id], + name: "vehicles_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["technologiesID"]], + foreignColumns: [technologies.id], + name: "vehicles_rels_technologies_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assetsID"]], + foreignColumns: [assets.id], + name: "vehicles_rels_assets_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["vehiclesID"]], + foreignColumns: [vehicles.id], + name: "vehicles_rels_vehicles_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["resourcesID"]], + foreignColumns: [resources.id], + name: "vehicles_rels_resources_fk", + }).onDelete("cascade"), + ], +); + +export const structures_materials = pgTable( + "structures_materials", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id") + .notNull() + .references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount"), + }, + (columns) => [ + index("structures_materials_order_idx").on(columns._order), + index("structures_materials_parent_id_idx").on(columns._parentID), + index("structures_materials_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_materials_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_resources_in_range = pgTable( + "structures_resources_in_range", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id").references(() => resources.id, { + onDelete: "set null", + }), + range: numeric("range"), + }, + (columns) => [ + index("structures_resources_in_range_order_idx").on(columns._order), + index("structures_resources_in_range_parent_id_idx").on(columns._parentID), + index("structures_resources_in_range_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_resources_in_range_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_structures_in_range = pgTable( + "structures_structures_in_range", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + structure: integer("structure_id").references(() => structures.id, { + onDelete: "set null", + }), + range: numeric("range"), + }, + (columns) => [ + index("structures_structures_in_range_order_idx").on(columns._order), + index("structures_structures_in_range_parent_id_idx").on(columns._parentID), + index("structures_structures_in_range_structure_idx").on(columns.structure), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_structures_in_range_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_upkeep = pgTable( + "structures_upkeep", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id").references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount"), + }, + (columns) => [ + index("structures_upkeep_order_idx").on(columns._order), + index("structures_upkeep_parent_id_idx").on(columns._parentID), + index("structures_upkeep_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_upkeep_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_auto_generated_resources = pgTable( + "structures_auto_generated_resources", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + resource: integer("resource_id").references(() => resources.id, { + onDelete: "set null", + }), + amount: numeric("amount"), + frequency: varchar("frequency"), + }, + (columns) => [ + index("structures_auto_generated_resources_order_idx").on(columns._order), + index("structures_auto_generated_resources_parent_id_idx").on(columns._parentID), + index("structures_auto_generated_resources_resource_idx").on(columns.resource), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_auto_generated_resources_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_allowed_storage = pgTable( + "structures_allowed_storage", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + amount: numeric("amount"), + }, + (columns) => [ + index("structures_allowed_storage_order_idx").on(columns._order), + index("structures_allowed_storage_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_allowed_storage_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures_prohibited_storage = pgTable( + "structures_prohibited_storage", + { + _order: integer("_order").notNull(), + _parentID: integer("_parent_id").notNull(), + id: varchar("id").primaryKey(), + }, + (columns) => [ + index("structures_prohibited_storage_order_idx").on(columns._order), + index("structures_prohibited_storage_parent_id_idx").on(columns._parentID), + foreignKey({ + columns: [columns["_parentID"]], + foreignColumns: [structures.id], + name: "structures_prohibited_storage_parent_id_fk", + }).onDelete("cascade"), + ], +); + +export const structures = pgTable( + "structures", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + codeName: varchar("code_name").notNull(), + description: jsonb("description").notNull(), + image: integer("image_id").references(() => media.id, { + onDelete: "set null", + }), + category: enum_structures_category("category").notNull(), + constructionTime: numeric("construction_time").notNull(), + requiresUpgrade: boolean("requires_upgrade"), + upgradesInto: integer("upgrades_into_id").references((): AnyPgColumn => structures.id, { + onDelete: "set null", + }), + upgradeCostMultiplier: numeric("upgrade_cost_multiplier").default("1"), + terrainType: enum_structures_terrain_type("terrain_type").notNull(), + sellPrice: numeric("sell_price"), + functionType: enum_structures_function_type("function_type"), + maxCapacityMass: numeric("max_capacity_mass"), + xSize: numeric("x_size"), + ySize: numeric("y_size"), + maxHealth: numeric("max_health").notNull(), + repairSpeed: numeric("repair_speed"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("structures_image_idx").on(columns.image), + index("structures_upgrades_into_idx").on(columns.upgradesInto), + index("structures_updated_at_idx").on(columns.updatedAt), + index("structures_created_at_idx").on(columns.createdAt), + ], +); + +export const structures_rels = pgTable( + "structures_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + technologiesID: integer("technologies_id"), + assetsID: integer("assets_id"), + vehiclesID: integer("vehicles_id"), + resourcesID: integer("resources_id"), + }, + (columns) => [ + index("structures_rels_order_idx").on(columns.order), + index("structures_rels_parent_idx").on(columns.parent), + index("structures_rels_path_idx").on(columns.path), + index("structures_rels_technologies_id_idx").on(columns.technologiesID), + index("structures_rels_assets_id_idx").on(columns.assetsID), + index("structures_rels_vehicles_id_idx").on(columns.vehiclesID), + index("structures_rels_resources_id_idx").on(columns.resourcesID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [structures.id], + name: "structures_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["technologiesID"]], + foreignColumns: [technologies.id], + name: "structures_rels_technologies_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assetsID"]], + foreignColumns: [assets.id], + name: "structures_rels_assets_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["vehiclesID"]], + foreignColumns: [vehicles.id], + name: "structures_rels_vehicles_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["resourcesID"]], + foreignColumns: [resources.id], + name: "structures_rels_resources_fk", + }).onDelete("cascade"), + ], +); + +export const maps = pgTable( + "maps", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + fileName: varchar("file_name"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + uniqueIndex("maps_name_idx").on(columns.name), + uniqueIndex("maps_file_name_idx").on(columns.fileName), + index("maps_updated_at_idx").on(columns.updatedAt), + index("maps_created_at_idx").on(columns.createdAt), + ], +); + +export const narrative_events = pgTable( + "narrative_events", + { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + summary: varchar("summary").notNull(), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("narrative_events_updated_at_idx").on(columns.updatedAt), + index("narrative_events_created_at_idx").on(columns.createdAt), + ], +); + +export const mission_files = pgTable( + "mission_files", + { + id: serial("id").primaryKey(), + missionFileName: varchar("mission_file_name").notNull(), + author: integer("author_id") + .notNull() + .references(() => users.id, { + onDelete: "set null", + }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + url: varchar("url"), + thumbnailURL: varchar("thumbnail_u_r_l"), + filename: varchar("filename"), + mimeType: varchar("mime_type"), + filesize: numeric("filesize"), + width: numeric("width"), + height: numeric("height"), + focalX: numeric("focal_x"), + focalY: numeric("focal_y"), + }, + (columns) => [ + index("mission_files_author_idx").on(columns.author), + index("mission_files_updated_at_idx").on(columns.updatedAt), + index("mission_files_created_at_idx").on(columns.createdAt), + uniqueIndex("mission_files_filename_idx").on(columns.filename), + ], +); + +export const mod_lists = pgTable( + "mod_lists", + { + id: serial("id").primaryKey(), + modlistName: varchar("modlist_name").notNull(), + author: integer("author_id") + .notNull() + .references(() => users.id, { + onDelete: "set null", + }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + url: varchar("url"), + thumbnailURL: varchar("thumbnail_u_r_l"), + filename: varchar("filename"), + mimeType: varchar("mime_type"), + filesize: numeric("filesize"), + width: numeric("width"), + height: numeric("height"), + focalX: numeric("focal_x"), + focalY: numeric("focal_y"), + }, + (columns) => [ + index("mod_lists_author_idx").on(columns.author), + index("mod_lists_updated_at_idx").on(columns.updatedAt), + index("mod_lists_created_at_idx").on(columns.createdAt), + uniqueIndex("mod_lists_filename_idx").on(columns.filename), + ], +); + +export const payload_locked_documents = pgTable( + "payload_locked_documents", + { + id: serial("id").primaryKey(), + globalSlug: varchar("global_slug"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("payload_locked_documents_global_slug_idx").on(columns.globalSlug), + index("payload_locked_documents_updated_at_idx").on(columns.updatedAt), + index("payload_locked_documents_created_at_idx").on(columns.createdAt), + ], +); + +export const payload_locked_documents_rels = pgTable( + "payload_locked_documents_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + mediaID: integer("media_id"), + usersID: integer("users_id"), + ranksID: integer("ranks_id"), + profilesID: integer("profiles_id"), + awardsID: integer("awards_id"), + qualificationsID: integer("qualifications_id"), + assignmentsID: integer("assignments_id"), + missionsID: integer("missions_id"), + campaignsID: integer("campaigns_id"), + factionsID: integer("factions_id"), + technologiesID: integer("technologies_id"), + assetsID: integer("assets_id"), + resourcesID: integer("resources_id"), + vehiclesID: integer("vehicles_id"), + structuresID: integer("structures_id"), + mapsID: integer("maps_id"), + "narrative-eventsID": integer("narrative_events_id"), + "mission-filesID": integer("mission_files_id"), + "mod-listsID": integer("mod_lists_id"), + }, + (columns) => [ + index("payload_locked_documents_rels_order_idx").on(columns.order), + index("payload_locked_documents_rels_parent_idx").on(columns.parent), + index("payload_locked_documents_rels_path_idx").on(columns.path), + index("payload_locked_documents_rels_media_id_idx").on(columns.mediaID), + index("payload_locked_documents_rels_users_id_idx").on(columns.usersID), + index("payload_locked_documents_rels_ranks_id_idx").on(columns.ranksID), + index("payload_locked_documents_rels_profiles_id_idx").on(columns.profilesID), + index("payload_locked_documents_rels_awards_id_idx").on(columns.awardsID), + index("payload_locked_documents_rels_qualifications_id_idx").on(columns.qualificationsID), + index("payload_locked_documents_rels_assignments_id_idx").on(columns.assignmentsID), + index("payload_locked_documents_rels_missions_id_idx").on(columns.missionsID), + index("payload_locked_documents_rels_campaigns_id_idx").on(columns.campaignsID), + index("payload_locked_documents_rels_factions_id_idx").on(columns.factionsID), + index("payload_locked_documents_rels_technologies_id_idx").on(columns.technologiesID), + index("payload_locked_documents_rels_assets_id_idx").on(columns.assetsID), + index("payload_locked_documents_rels_resources_id_idx").on(columns.resourcesID), + index("payload_locked_documents_rels_vehicles_id_idx").on(columns.vehiclesID), + index("payload_locked_documents_rels_structures_id_idx").on(columns.structuresID), + index("payload_locked_documents_rels_maps_id_idx").on(columns.mapsID), + index("payload_locked_documents_rels_narrative_events_id_idx").on( + columns["narrative-eventsID"], + ), + index("payload_locked_documents_rels_mission_files_id_idx").on(columns["mission-filesID"]), + index("payload_locked_documents_rels_mod_lists_id_idx").on(columns["mod-listsID"]), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [payload_locked_documents.id], + name: "payload_locked_documents_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["mediaID"]], + foreignColumns: [media.id], + name: "payload_locked_documents_rels_media_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["usersID"]], + foreignColumns: [users.id], + name: "payload_locked_documents_rels_users_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["ranksID"]], + foreignColumns: [ranks.id], + name: "payload_locked_documents_rels_ranks_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["profilesID"]], + foreignColumns: [profiles.id], + name: "payload_locked_documents_rels_profiles_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["awardsID"]], + foreignColumns: [awards.id], + name: "payload_locked_documents_rels_awards_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["qualificationsID"]], + foreignColumns: [qualifications.id], + name: "payload_locked_documents_rels_qualifications_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assignmentsID"]], + foreignColumns: [assignments.id], + name: "payload_locked_documents_rels_assignments_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["missionsID"]], + foreignColumns: [missions.id], + name: "payload_locked_documents_rels_missions_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["campaignsID"]], + foreignColumns: [campaigns.id], + name: "payload_locked_documents_rels_campaigns_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["factionsID"]], + foreignColumns: [factions.id], + name: "payload_locked_documents_rels_factions_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["technologiesID"]], + foreignColumns: [technologies.id], + name: "payload_locked_documents_rels_technologies_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["assetsID"]], + foreignColumns: [assets.id], + name: "payload_locked_documents_rels_assets_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["resourcesID"]], + foreignColumns: [resources.id], + name: "payload_locked_documents_rels_resources_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["vehiclesID"]], + foreignColumns: [vehicles.id], + name: "payload_locked_documents_rels_vehicles_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["structuresID"]], + foreignColumns: [structures.id], + name: "payload_locked_documents_rels_structures_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["mapsID"]], + foreignColumns: [maps.id], + name: "payload_locked_documents_rels_maps_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["narrative-eventsID"]], + foreignColumns: [narrative_events.id], + name: "payload_locked_documents_rels_narrative_events_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["mission-filesID"]], + foreignColumns: [mission_files.id], + name: "payload_locked_documents_rels_mission_files_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["mod-listsID"]], + foreignColumns: [mod_lists.id], + name: "payload_locked_documents_rels_mod_lists_fk", + }).onDelete("cascade"), + ], +); + +export const payload_preferences = pgTable( + "payload_preferences", + { + id: serial("id").primaryKey(), + key: varchar("key"), + value: jsonb("value"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("payload_preferences_key_idx").on(columns.key), + index("payload_preferences_updated_at_idx").on(columns.updatedAt), + index("payload_preferences_created_at_idx").on(columns.createdAt), + ], +); + +export const payload_preferences_rels = pgTable( + "payload_preferences_rels", + { + id: serial("id").primaryKey(), + order: integer("order"), + parent: integer("parent_id").notNull(), + path: varchar("path").notNull(), + usersID: integer("users_id"), + }, + (columns) => [ + index("payload_preferences_rels_order_idx").on(columns.order), + index("payload_preferences_rels_parent_idx").on(columns.parent), + index("payload_preferences_rels_path_idx").on(columns.path), + index("payload_preferences_rels_users_id_idx").on(columns.usersID), + foreignKey({ + columns: [columns["parent"]], + foreignColumns: [payload_preferences.id], + name: "payload_preferences_rels_parent_fk", + }).onDelete("cascade"), + foreignKey({ + columns: [columns["usersID"]], + foreignColumns: [users.id], + name: "payload_preferences_rels_users_fk", + }).onDelete("cascade"), + ], +); + +export const payload_migrations = pgTable( + "payload_migrations", + { + id: serial("id").primaryKey(), + name: varchar("name"), + batch: numeric("batch"), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }) + .defaultNow() + .notNull(), + }, + (columns) => [ + index("payload_migrations_updated_at_idx").on(columns.updatedAt), + index("payload_migrations_created_at_idx").on(columns.createdAt), + ], +); + +export const game_rules = pgTable( + "game_rules", + { + id: serial("id").primaryKey(), + mainCurrency: integer("main_currency_id") + .notNull() + .references(() => resources.id, { + onDelete: "set null", + }), + updatedAt: timestamp("updated_at", { mode: "string", withTimezone: true, precision: 3 }), + createdAt: timestamp("created_at", { mode: "string", withTimezone: true, precision: 3 }), + }, + (columns) => [index("game_rules_main_currency_idx").on(columns.mainCurrency)], +); + +export const relations_media = relations(media, () => ({})); +export const relations_users_roles = relations(users_roles, ({ one }) => ({ + parent: one(users, { + fields: [users_roles.parent], + references: [users.id], + relationName: "roles", + }), +})); +export const relations_users_sessions = relations(users_sessions, ({ one }) => ({ + _parentID: one(users, { + fields: [users_sessions._parentID], + references: [users.id], + relationName: "sessions", + }), +})); +export const relations_users = relations(users, ({ many }) => ({ + roles: many(users_roles, { + relationName: "roles", + }), + sessions: many(users_sessions, { + relationName: "sessions", + }), +})); +export const relations_ranks = relations(ranks, ({ one }) => ({ + insignia: one(media, { + fields: [ranks.insignia], + references: [media.id], + relationName: "insignia", + }), +})); +export const relations_profiles_rels = relations(profiles_rels, ({ one }) => ({ + parent: one(profiles, { + fields: [profiles_rels.parent], + references: [profiles.id], + relationName: "_rels", + }), + awardsID: one(awards, { + fields: [profiles_rels.awardsID], + references: [awards.id], + relationName: "awards", + }), +})); +export const relations_profiles = relations(profiles, ({ one, many }) => ({ + user: one(users, { + fields: [profiles.user], + references: [users.id], + relationName: "user", + }), + rank: one(ranks, { + fields: [profiles.rank], + references: [ranks.id], + relationName: "rank", + }), + _rels: many(profiles_rels, { + relationName: "_rels", + }), +})); +export const relations_awards = relations(awards, ({ one }) => ({ + image: one(media, { + fields: [awards.image], + references: [media.id], + relationName: "image", + }), +})); +export const relations_qualifications = relations(qualifications, () => ({})); +export const relations_assignments_rels = relations(assignments_rels, ({ one }) => ({ + parent: one(assignments, { + fields: [assignments_rels.parent], + references: [assignments.id], + relationName: "_rels", + }), + assignmentsID: one(assignments, { + fields: [assignments_rels.assignmentsID], + references: [assignments.id], + relationName: "assignments", + }), + usersID: one(users, { + fields: [assignments_rels.usersID], + references: [users.id], + relationName: "users", + }), +})); +export const relations_assignments = relations(assignments, ({ one, many }) => ({ + leader: one(users, { + fields: [assignments.leader], + references: [users.id], + relationName: "leader", + }), + _rels: many(assignments_rels, { + relationName: "_rels", + }), +})); +export const relations_missions_mission_roles_provided_roles = relations( + missions_mission_roles_provided_roles, + ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_mission_roles_provided_roles._parentID], + references: [missions.id], + relationName: "missionRoles_providedRoles", + }), + minimumRank: one(ranks, { + fields: [missions_mission_roles_provided_roles.minimumRank], + references: [ranks.id], + relationName: "minimumRank", + }), + }), +); +export const relations_missions_briefing = relations(missions_briefing, ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_briefing._parentID], + references: [missions.id], + relationName: "briefing", + }), +})); +export const relations_missions_mission_objectives = relations( + missions_mission_objectives, + ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_mission_objectives._parentID], + references: [missions.id], + relationName: "missionObjectives", + }), + }), +); +export const relations_missions_factions_involved = relations( + missions_factions_involved, + ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_factions_involved._parentID], + references: [missions.id], + relationName: "factionsInvolved", + }), + }), +); +export const relations_missions_logistics_and_support_insertion = relations( + missions_logistics_and_support_insertion, + ({ one }) => ({ + parent: one(missions, { + fields: [missions_logistics_and_support_insertion.parent], + references: [missions.id], + relationName: "logisticsAndSupport_insertion", + }), + }), +); +export const relations_missions_logistics_and_support_extraction = relations( + missions_logistics_and_support_extraction, + ({ one }) => ({ + parent: one(missions, { + fields: [missions_logistics_and_support_extraction.parent], + references: [missions.id], + relationName: "logisticsAndSupport_extraction", + }), + }), +); +export const relations_missions_logistics_and_support_assets_available = relations( + missions_logistics_and_support_assets_available, + ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_logistics_and_support_assets_available._parentID], + references: [missions.id], + relationName: "logisticsAndSupport_assetsAvailable", + }), + }), +); +export const relations_missions_comms_and_docs_frequencies = relations( + missions_comms_and_docs_frequencies, + ({ one }) => ({ + _parentID: one(missions, { + fields: [missions_comms_and_docs_frequencies._parentID], + references: [missions.id], + relationName: "commsAndDocs_frequencies", + }), + }), +); +export const relations_missions_rels = relations(missions_rels, ({ one }) => ({ + parent: one(missions, { + fields: [missions_rels.parent], + references: [missions.id], + relationName: "_rels", + }), + usersID: one(users, { + fields: [missions_rels.usersID], + references: [users.id], + relationName: "users", + }), + qualificationsID: one(qualifications, { + fields: [missions_rels.qualificationsID], + references: [qualifications.id], + relationName: "qualifications", + }), +})); +export const relations_missions = relations(missions, ({ one, many }) => ({ + classification_map: one(maps, { + fields: [missions.classification_map], + references: [maps.id], + relationName: "classification_map", + }), + classification_campaign: one(campaigns, { + fields: [missions.classification_campaign], + references: [campaigns.id], + relationName: "classification_campaign", + }), + missionRoles_providedRoles: many(missions_mission_roles_provided_roles, { + relationName: "missionRoles_providedRoles", + }), + briefing: many(missions_briefing, { + relationName: "briefing", + }), + missionObjectives: many(missions_mission_objectives, { + relationName: "missionObjectives", + }), + factionsInvolved: many(missions_factions_involved, { + relationName: "factionsInvolved", + }), + gameDetails_gameSetup_missionFile: one(mission_files, { + fields: [missions.gameDetails_gameSetup_missionFile], + references: [mission_files.id], + relationName: "gameDetails_gameSetup_missionFile", + }), + gameDetails_gameSetup_requiredMods: one(mod_lists, { + fields: [missions.gameDetails_gameSetup_requiredMods], + references: [mod_lists.id], + relationName: "gameDetails_gameSetup_requiredMods", + }), + logisticsAndSupport_insertion: many(missions_logistics_and_support_insertion, { + relationName: "logisticsAndSupport_insertion", + }), + logisticsAndSupport_extraction: many(missions_logistics_and_support_extraction, { + relationName: "logisticsAndSupport_extraction", + }), + logisticsAndSupport_assetsAvailable: many(missions_logistics_and_support_assets_available, { + relationName: "logisticsAndSupport_assetsAvailable", + }), + commsAndDocs_frequencies: many(missions_comms_and_docs_frequencies, { + relationName: "commsAndDocs_frequencies", + }), + _rels: many(missions_rels, { + relationName: "_rels", + }), +})); +export const relations_campaigns = relations(campaigns, () => ({})); +export const relations_factions_rels = relations(factions_rels, ({ one }) => ({ + parent: one(factions, { + fields: [factions_rels.parent], + references: [factions.id], + relationName: "_rels", + }), + campaignsID: one(campaigns, { + fields: [factions_rels.campaignsID], + references: [campaigns.id], + relationName: "campaigns", + }), +})); +export const relations_factions = relations(factions, ({ many }) => ({ + _rels: many(factions_rels, { + relationName: "_rels", + }), +})); +export const relations_technologies_requirements_prerequisite_technologies = relations( + technologies_requirements_prerequisite_technologies, + ({ one }) => ({ + _parentID: one(technologies, { + fields: [technologies_requirements_prerequisite_technologies._parentID], + references: [technologies.id], + relationName: "requirements_prerequisiteTechnologies", + }), + }), +); +export const relations_technologies_rels = relations(technologies_rels, ({ one }) => ({ + parent: one(technologies, { + fields: [technologies_rels.parent], + references: [technologies.id], + relationName: "_rels", + }), + technologiesID: one(technologies, { + fields: [technologies_rels.technologiesID], + references: [technologies.id], + relationName: "technologies", + }), +})); +export const relations_technologies = relations(technologies, ({ many }) => ({ + requirements_prerequisiteTechnologies: many(technologies_requirements_prerequisite_technologies, { + relationName: "requirements_prerequisiteTechnologies", + }), + _rels: many(technologies_rels, { + relationName: "_rels", + }), +})); +export const relations_assets_crafting_crafting_data_inputs = relations( + assets_crafting_crafting_data_inputs, + ({ one }) => ({ + _parentID: one(assets, { + fields: [assets_crafting_crafting_data_inputs._parentID], + references: [assets.id], + relationName: "crafting_craftingData_inputs", + }), + }), +); +export const relations_assets_crafting_crafting_data_byproducts = relations( + assets_crafting_crafting_data_byproducts, + ({ one }) => ({ + _parentID: one(assets, { + fields: [assets_crafting_crafting_data_byproducts._parentID], + references: [assets.id], + relationName: "crafting_craftingData_byproducts", + }), + }), +); +export const relations_assets_rels = relations(assets_rels, ({ one }) => ({ + parent: one(assets, { + fields: [assets_rels.parent], + references: [assets.id], + relationName: "_rels", + }), + assetsID: one(assets, { + fields: [assets_rels.assetsID], + references: [assets.id], + relationName: "assets", + }), + technologiesID: one(technologies, { + fields: [assets_rels.technologiesID], + references: [technologies.id], + relationName: "technologies", + }), + resourcesID: one(resources, { + fields: [assets_rels.resourcesID], + references: [resources.id], + relationName: "resources", + }), + structuresID: one(structures, { + fields: [assets_rels.structuresID], + references: [structures.id], + relationName: "structures", + }), +})); +export const relations_assets = relations(assets, ({ one, many }) => ({ + "Asset Metadata_thumbnail": one(media, { + fields: [assets["Asset Metadata_thumbnail"]], + references: [media.id], + relationName: "Asset Metadata_thumbnail", + }), + crafting_craftingData_inputs: many(assets_crafting_crafting_data_inputs, { + relationName: "crafting_craftingData_inputs", + }), + crafting_craftingData_byproducts: many(assets_crafting_crafting_data_byproducts, { + relationName: "crafting_craftingData_byproducts", + }), + _rels: many(assets_rels, { + relationName: "_rels", + }), +})); +export const relations_resources = relations(resources, ({ one }) => ({ + icon: one(media, { + fields: [resources.icon], + references: [media.id], + relationName: "icon", + }), +})); +export const relations_vehicles_category = relations(vehicles_category, ({ one }) => ({ + parent: one(vehicles, { + fields: [vehicles_category.parent], + references: [vehicles.id], + relationName: "category", + }), +})); +export const relations_vehicles_materials = relations(vehicles_materials, ({ one }) => ({ + _parentID: one(vehicles, { + fields: [vehicles_materials._parentID], + references: [vehicles.id], + relationName: "materials", + }), + resource: one(resources, { + fields: [vehicles_materials.resource], + references: [resources.id], + relationName: "resource", + }), +})); +export const relations_vehicles_scrap_returns = relations(vehicles_scrap_returns, ({ one }) => ({ + _parentID: one(vehicles, { + fields: [vehicles_scrap_returns._parentID], + references: [vehicles.id], + relationName: "scrapReturns", + }), + resource: one(resources, { + fields: [vehicles_scrap_returns.resource], + references: [resources.id], + relationName: "resource", + }), +})); +export const relations_vehicles_upkeep_costs = relations(vehicles_upkeep_costs, ({ one }) => ({ + _parentID: one(vehicles, { + fields: [vehicles_upkeep_costs._parentID], + references: [vehicles.id], + relationName: "upkeepCosts", + }), + resource: one(resources, { + fields: [vehicles_upkeep_costs.resource], + references: [resources.id], + relationName: "resource", + }), +})); +export const relations_vehicles_allowed_virtual_cargo = relations( + vehicles_allowed_virtual_cargo, + ({ one }) => ({ + _parentID: one(vehicles, { + fields: [vehicles_allowed_virtual_cargo._parentID], + references: [vehicles.id], + relationName: "allowedVirtualCargo", + }), + }), +); +export const relations_vehicles_pylons = relations(vehicles_pylons, ({ one }) => ({ + _parentID: one(vehicles, { + fields: [vehicles_pylons._parentID], + references: [vehicles.id], + relationName: "pylons", + }), + ammoType: one(assets, { + fields: [vehicles_pylons.ammoType], + references: [assets.id], + relationName: "ammoType", + }), +})); +export const relations_vehicles_rels = relations(vehicles_rels, ({ one }) => ({ + parent: one(vehicles, { + fields: [vehicles_rels.parent], + references: [vehicles.id], + relationName: "_rels", + }), + technologiesID: one(technologies, { + fields: [vehicles_rels.technologiesID], + references: [technologies.id], + relationName: "technologies", + }), + assetsID: one(assets, { + fields: [vehicles_rels.assetsID], + references: [assets.id], + relationName: "assets", + }), + vehiclesID: one(vehicles, { + fields: [vehicles_rels.vehiclesID], + references: [vehicles.id], + relationName: "vehicles", + }), + resourcesID: one(resources, { + fields: [vehicles_rels.resourcesID], + references: [resources.id], + relationName: "resources", + }), +})); +export const relations_vehicles = relations(vehicles, ({ one, many }) => ({ + image: one(media, { + fields: [vehicles.image], + references: [media.id], + relationName: "image", + }), + category: many(vehicles_category, { + relationName: "category", + }), + materials: many(vehicles_materials, { + relationName: "materials", + }), + scrapReturns: many(vehicles_scrap_returns, { + relationName: "scrapReturns", + }), + upkeepCosts: many(vehicles_upkeep_costs, { + relationName: "upkeepCosts", + }), + allowedVirtualCargo: many(vehicles_allowed_virtual_cargo, { + relationName: "allowedVirtualCargo", + }), + pylons: many(vehicles_pylons, { + relationName: "pylons", + }), + _rels: many(vehicles_rels, { + relationName: "_rels", + }), +})); +export const relations_structures_materials = relations(structures_materials, ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_materials._parentID], + references: [structures.id], + relationName: "materials", + }), + resource: one(resources, { + fields: [structures_materials.resource], + references: [resources.id], + relationName: "resource", + }), +})); +export const relations_structures_resources_in_range = relations( + structures_resources_in_range, + ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_resources_in_range._parentID], + references: [structures.id], + relationName: "resourcesInRange", + }), + resource: one(resources, { + fields: [structures_resources_in_range.resource], + references: [resources.id], + relationName: "resource", + }), + }), +); +export const relations_structures_structures_in_range = relations( + structures_structures_in_range, + ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_structures_in_range._parentID], + references: [structures.id], + relationName: "structuresInRange", + }), + structure: one(structures, { + fields: [structures_structures_in_range.structure], + references: [structures.id], + relationName: "structure", + }), + }), +); +export const relations_structures_upkeep = relations(structures_upkeep, ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_upkeep._parentID], + references: [structures.id], + relationName: "upkeep", + }), + resource: one(resources, { + fields: [structures_upkeep.resource], + references: [resources.id], + relationName: "resource", + }), +})); +export const relations_structures_auto_generated_resources = relations( + structures_auto_generated_resources, + ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_auto_generated_resources._parentID], + references: [structures.id], + relationName: "autoGeneratedResources", + }), + resource: one(resources, { + fields: [structures_auto_generated_resources.resource], + references: [resources.id], + relationName: "resource", + }), + }), +); +export const relations_structures_allowed_storage = relations( + structures_allowed_storage, + ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_allowed_storage._parentID], + references: [structures.id], + relationName: "allowedStorage", + }), + }), +); +export const relations_structures_prohibited_storage = relations( + structures_prohibited_storage, + ({ one }) => ({ + _parentID: one(structures, { + fields: [structures_prohibited_storage._parentID], + references: [structures.id], + relationName: "prohibitedStorage", + }), + }), +); +export const relations_structures_rels = relations(structures_rels, ({ one }) => ({ + parent: one(structures, { + fields: [structures_rels.parent], + references: [structures.id], + relationName: "_rels", + }), + technologiesID: one(technologies, { + fields: [structures_rels.technologiesID], + references: [technologies.id], + relationName: "technologies", + }), + assetsID: one(assets, { + fields: [structures_rels.assetsID], + references: [assets.id], + relationName: "assets", + }), + vehiclesID: one(vehicles, { + fields: [structures_rels.vehiclesID], + references: [vehicles.id], + relationName: "vehicles", + }), + resourcesID: one(resources, { + fields: [structures_rels.resourcesID], + references: [resources.id], + relationName: "resources", + }), +})); +export const relations_structures = relations(structures, ({ one, many }) => ({ + image: one(media, { + fields: [structures.image], + references: [media.id], + relationName: "image", + }), + materials: many(structures_materials, { + relationName: "materials", + }), + upgradesInto: one(structures, { + fields: [structures.upgradesInto], + references: [structures.id], + relationName: "upgradesInto", + }), + resourcesInRange: many(structures_resources_in_range, { + relationName: "resourcesInRange", + }), + structuresInRange: many(structures_structures_in_range, { + relationName: "structuresInRange", + }), + upkeep: many(structures_upkeep, { + relationName: "upkeep", + }), + autoGeneratedResources: many(structures_auto_generated_resources, { + relationName: "autoGeneratedResources", + }), + allowedStorage: many(structures_allowed_storage, { + relationName: "allowedStorage", + }), + prohibitedStorage: many(structures_prohibited_storage, { + relationName: "prohibitedStorage", + }), + _rels: many(structures_rels, { + relationName: "_rels", + }), +})); +export const relations_maps = relations(maps, () => ({})); +export const relations_narrative_events = relations(narrative_events, () => ({})); +export const relations_mission_files = relations(mission_files, ({ one }) => ({ + author: one(users, { + fields: [mission_files.author], + references: [users.id], + relationName: "author", + }), +})); +export const relations_mod_lists = relations(mod_lists, ({ one }) => ({ + author: one(users, { + fields: [mod_lists.author], + references: [users.id], + relationName: "author", + }), +})); +export const relations_payload_locked_documents_rels = relations( + payload_locked_documents_rels, + ({ one }) => ({ + parent: one(payload_locked_documents, { + fields: [payload_locked_documents_rels.parent], + references: [payload_locked_documents.id], + relationName: "_rels", + }), + mediaID: one(media, { + fields: [payload_locked_documents_rels.mediaID], + references: [media.id], + relationName: "media", + }), + usersID: one(users, { + fields: [payload_locked_documents_rels.usersID], + references: [users.id], + relationName: "users", + }), + ranksID: one(ranks, { + fields: [payload_locked_documents_rels.ranksID], + references: [ranks.id], + relationName: "ranks", + }), + profilesID: one(profiles, { + fields: [payload_locked_documents_rels.profilesID], + references: [profiles.id], + relationName: "profiles", + }), + awardsID: one(awards, { + fields: [payload_locked_documents_rels.awardsID], + references: [awards.id], + relationName: "awards", + }), + qualificationsID: one(qualifications, { + fields: [payload_locked_documents_rels.qualificationsID], + references: [qualifications.id], + relationName: "qualifications", + }), + assignmentsID: one(assignments, { + fields: [payload_locked_documents_rels.assignmentsID], + references: [assignments.id], + relationName: "assignments", + }), + missionsID: one(missions, { + fields: [payload_locked_documents_rels.missionsID], + references: [missions.id], + relationName: "missions", + }), + campaignsID: one(campaigns, { + fields: [payload_locked_documents_rels.campaignsID], + references: [campaigns.id], + relationName: "campaigns", + }), + factionsID: one(factions, { + fields: [payload_locked_documents_rels.factionsID], + references: [factions.id], + relationName: "factions", + }), + technologiesID: one(technologies, { + fields: [payload_locked_documents_rels.technologiesID], + references: [technologies.id], + relationName: "technologies", + }), + assetsID: one(assets, { + fields: [payload_locked_documents_rels.assetsID], + references: [assets.id], + relationName: "assets", + }), + resourcesID: one(resources, { + fields: [payload_locked_documents_rels.resourcesID], + references: [resources.id], + relationName: "resources", + }), + vehiclesID: one(vehicles, { + fields: [payload_locked_documents_rels.vehiclesID], + references: [vehicles.id], + relationName: "vehicles", + }), + structuresID: one(structures, { + fields: [payload_locked_documents_rels.structuresID], + references: [structures.id], + relationName: "structures", + }), + mapsID: one(maps, { + fields: [payload_locked_documents_rels.mapsID], + references: [maps.id], + relationName: "maps", + }), + "narrative-eventsID": one(narrative_events, { + fields: [payload_locked_documents_rels["narrative-eventsID"]], + references: [narrative_events.id], + relationName: "narrative-events", + }), + "mission-filesID": one(mission_files, { + fields: [payload_locked_documents_rels["mission-filesID"]], + references: [mission_files.id], + relationName: "mission-files", + }), + "mod-listsID": one(mod_lists, { + fields: [payload_locked_documents_rels["mod-listsID"]], + references: [mod_lists.id], + relationName: "mod-lists", + }), + }), +); +export const relations_payload_locked_documents = relations( + payload_locked_documents, + ({ many }) => ({ + _rels: many(payload_locked_documents_rels, { + relationName: "_rels", + }), + }), +); +export const relations_payload_preferences_rels = relations( + payload_preferences_rels, + ({ one }) => ({ + parent: one(payload_preferences, { + fields: [payload_preferences_rels.parent], + references: [payload_preferences.id], + relationName: "_rels", + }), + usersID: one(users, { + fields: [payload_preferences_rels.usersID], + references: [users.id], + relationName: "users", + }), + }), +); +export const relations_payload_preferences = relations(payload_preferences, ({ many }) => ({ + _rels: many(payload_preferences_rels, { + relationName: "_rels", + }), +})); +export const relations_payload_migrations = relations(payload_migrations, () => ({})); +export const relations_game_rules = relations(game_rules, ({ one }) => ({ + mainCurrency: one(resources, { + fields: [game_rules.mainCurrency], + references: [resources.id], + relationName: "mainCurrency", + }), +})); + +type DatabaseSchema = { + enum_users_roles: typeof enum_users_roles; + enum_awards_type: typeof enum_awards_type; + enum_assignments_type: typeof enum_assignments_type; + enum_missions_factions_involved_threat_level: typeof enum_missions_factions_involved_threat_level; + enum_missions_logistics_and_support_insertion: typeof enum_missions_logistics_and_support_insertion; + enum_missions_logistics_and_support_extraction: typeof enum_missions_logistics_and_support_extraction; + enum_missions_operation_type: typeof enum_missions_operation_type; + enum_missions_classification_mission_type: typeof enum_missions_classification_mission_type; + enum_missions_ownership_and_status_status: typeof enum_missions_ownership_and_status_status; + enum_missions_ownership_and_status_visibility: typeof enum_missions_ownership_and_status_visibility; + enum_missions_civilian_presence: typeof enum_missions_civilian_presence; + enum_campaigns_status: typeof enum_campaigns_status; + enum_factions_type: typeof enum_factions_type; + enum_technologies_type: typeof enum_technologies_type; + enum_assets_asset_type: typeof enum_assets_asset_type; + enum_assets_weapon_configuration_slot_type: typeof enum_assets_weapon_configuration_slot_type; + enum_assets_nightvision_configuration_nvg_generation: typeof enum_assets_nightvision_configuration_nvg_generation; + enum_assets_market_trading_rarity: typeof enum_assets_market_trading_rarity; + enum_resources_type: typeof enum_resources_type; + enum_resources_rarity: typeof enum_resources_rarity; + enum_vehicles_category: typeof enum_vehicles_category; + enum_vehicles_pylons_pylon_type: typeof enum_vehicles_pylons_pylon_type; + enum_vehicles_armor_rating: typeof enum_vehicles_armor_rating; + enum_structures_category: typeof enum_structures_category; + enum_structures_terrain_type: typeof enum_structures_terrain_type; + enum_structures_function_type: typeof enum_structures_function_type; + media: typeof media; + users_roles: typeof users_roles; + users_sessions: typeof users_sessions; + users: typeof users; + ranks: typeof ranks; + profiles: typeof profiles; + profiles_rels: typeof profiles_rels; + awards: typeof awards; + qualifications: typeof qualifications; + assignments: typeof assignments; + assignments_rels: typeof assignments_rels; + missions_mission_roles_provided_roles: typeof missions_mission_roles_provided_roles; + missions_briefing: typeof missions_briefing; + missions_mission_objectives: typeof missions_mission_objectives; + missions_factions_involved: typeof missions_factions_involved; + missions_logistics_and_support_insertion: typeof missions_logistics_and_support_insertion; + missions_logistics_and_support_extraction: typeof missions_logistics_and_support_extraction; + missions_logistics_and_support_assets_available: typeof missions_logistics_and_support_assets_available; + missions_comms_and_docs_frequencies: typeof missions_comms_and_docs_frequencies; + missions: typeof missions; + missions_rels: typeof missions_rels; + campaigns: typeof campaigns; + factions: typeof factions; + factions_rels: typeof factions_rels; + technologies_requirements_prerequisite_technologies: typeof technologies_requirements_prerequisite_technologies; + technologies: typeof technologies; + technologies_rels: typeof technologies_rels; + assets_crafting_crafting_data_inputs: typeof assets_crafting_crafting_data_inputs; + assets_crafting_crafting_data_byproducts: typeof assets_crafting_crafting_data_byproducts; + assets: typeof assets; + assets_rels: typeof assets_rels; + resources: typeof resources; + vehicles_category: typeof vehicles_category; + vehicles_materials: typeof vehicles_materials; + vehicles_scrap_returns: typeof vehicles_scrap_returns; + vehicles_upkeep_costs: typeof vehicles_upkeep_costs; + vehicles_allowed_virtual_cargo: typeof vehicles_allowed_virtual_cargo; + vehicles_pylons: typeof vehicles_pylons; + vehicles: typeof vehicles; + vehicles_rels: typeof vehicles_rels; + structures_materials: typeof structures_materials; + structures_resources_in_range: typeof structures_resources_in_range; + structures_structures_in_range: typeof structures_structures_in_range; + structures_upkeep: typeof structures_upkeep; + structures_auto_generated_resources: typeof structures_auto_generated_resources; + structures_allowed_storage: typeof structures_allowed_storage; + structures_prohibited_storage: typeof structures_prohibited_storage; + structures: typeof structures; + structures_rels: typeof structures_rels; + maps: typeof maps; + narrative_events: typeof narrative_events; + mission_files: typeof mission_files; + mod_lists: typeof mod_lists; + payload_locked_documents: typeof payload_locked_documents; + payload_locked_documents_rels: typeof payload_locked_documents_rels; + payload_preferences: typeof payload_preferences; + payload_preferences_rels: typeof payload_preferences_rels; + payload_migrations: typeof payload_migrations; + game_rules: typeof game_rules; + relations_media: typeof relations_media; + relations_users_roles: typeof relations_users_roles; + relations_users_sessions: typeof relations_users_sessions; + relations_users: typeof relations_users; + relations_ranks: typeof relations_ranks; + relations_profiles_rels: typeof relations_profiles_rels; + relations_profiles: typeof relations_profiles; + relations_awards: typeof relations_awards; + relations_qualifications: typeof relations_qualifications; + relations_assignments_rels: typeof relations_assignments_rels; + relations_assignments: typeof relations_assignments; + relations_missions_mission_roles_provided_roles: typeof relations_missions_mission_roles_provided_roles; + relations_missions_briefing: typeof relations_missions_briefing; + relations_missions_mission_objectives: typeof relations_missions_mission_objectives; + relations_missions_factions_involved: typeof relations_missions_factions_involved; + relations_missions_logistics_and_support_insertion: typeof relations_missions_logistics_and_support_insertion; + relations_missions_logistics_and_support_extraction: typeof relations_missions_logistics_and_support_extraction; + relations_missions_logistics_and_support_assets_available: typeof relations_missions_logistics_and_support_assets_available; + relations_missions_comms_and_docs_frequencies: typeof relations_missions_comms_and_docs_frequencies; + relations_missions_rels: typeof relations_missions_rels; + relations_missions: typeof relations_missions; + relations_campaigns: typeof relations_campaigns; + relations_factions_rels: typeof relations_factions_rels; + relations_factions: typeof relations_factions; + relations_technologies_requirements_prerequisite_technologies: typeof relations_technologies_requirements_prerequisite_technologies; + relations_technologies_rels: typeof relations_technologies_rels; + relations_technologies: typeof relations_technologies; + relations_assets_crafting_crafting_data_inputs: typeof relations_assets_crafting_crafting_data_inputs; + relations_assets_crafting_crafting_data_byproducts: typeof relations_assets_crafting_crafting_data_byproducts; + relations_assets_rels: typeof relations_assets_rels; + relations_assets: typeof relations_assets; + relations_resources: typeof relations_resources; + relations_vehicles_category: typeof relations_vehicles_category; + relations_vehicles_materials: typeof relations_vehicles_materials; + relations_vehicles_scrap_returns: typeof relations_vehicles_scrap_returns; + relations_vehicles_upkeep_costs: typeof relations_vehicles_upkeep_costs; + relations_vehicles_allowed_virtual_cargo: typeof relations_vehicles_allowed_virtual_cargo; + relations_vehicles_pylons: typeof relations_vehicles_pylons; + relations_vehicles_rels: typeof relations_vehicles_rels; + relations_vehicles: typeof relations_vehicles; + relations_structures_materials: typeof relations_structures_materials; + relations_structures_resources_in_range: typeof relations_structures_resources_in_range; + relations_structures_structures_in_range: typeof relations_structures_structures_in_range; + relations_structures_upkeep: typeof relations_structures_upkeep; + relations_structures_auto_generated_resources: typeof relations_structures_auto_generated_resources; + relations_structures_allowed_storage: typeof relations_structures_allowed_storage; + relations_structures_prohibited_storage: typeof relations_structures_prohibited_storage; + relations_structures_rels: typeof relations_structures_rels; + relations_structures: typeof relations_structures; + relations_maps: typeof relations_maps; + relations_narrative_events: typeof relations_narrative_events; + relations_mission_files: typeof relations_mission_files; + relations_mod_lists: typeof relations_mod_lists; + relations_payload_locked_documents_rels: typeof relations_payload_locked_documents_rels; + relations_payload_locked_documents: typeof relations_payload_locked_documents; + relations_payload_preferences_rels: typeof relations_payload_preferences_rels; + relations_payload_preferences: typeof relations_payload_preferences; + relations_payload_migrations: typeof relations_payload_migrations; + relations_game_rules: typeof relations_game_rules; +}; + +declare module "@payloadcms/db-postgres" { + export interface GeneratedDatabaseSchema { + schema: DatabaseSchema; + } +} diff --git a/src/payload-types.ts b/src/payload-types.ts index 9f8e92c..7d9fb97 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -67,22 +67,57 @@ export interface Config { }; blocks: {}; collections: { - users: User; media: Media; + users: User; ranks: Rank; profiles: Profile; awards: Award; + qualifications: Qualification; + assignments: Assignment; + missions: Mission; + campaigns: Campaign; + factions: Faction; + technologies: Technology; + assets: Asset; + resources: Resource; + vehicles: Vehicle; + structures: Structure; + maps: Map; + 'narrative-events': NarrativeEvent; + 'mission-files': MissionFile; + 'mod-lists': ModList; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; 'payload-migrations': PayloadMigration; }; - collectionsJoins: {}; + collectionsJoins: { + assignments: { + commandElement: 'assignments'; + }; + vehicles: { + requiredStructure: 'structures'; + }; + }; collectionsSelect: { - users: UsersSelect | UsersSelect; media: MediaSelect | MediaSelect; + users: UsersSelect | UsersSelect; ranks: RanksSelect | RanksSelect; profiles: ProfilesSelect | ProfilesSelect; awards: AwardsSelect | AwardsSelect; + qualifications: QualificationsSelect | QualificationsSelect; + assignments: AssignmentsSelect | AssignmentsSelect; + missions: MissionsSelect | MissionsSelect; + campaigns: CampaignsSelect | CampaignsSelect; + factions: FactionsSelect | FactionsSelect; + technologies: TechnologiesSelect | TechnologiesSelect; + assets: AssetsSelect | AssetsSelect; + resources: ResourcesSelect | ResourcesSelect; + vehicles: VehiclesSelect | VehiclesSelect; + structures: StructuresSelect | StructuresSelect; + maps: MapsSelect | MapsSelect; + 'narrative-events': NarrativeEventsSelect | NarrativeEventsSelect; + 'mission-files': MissionFilesSelect | MissionFilesSelect; + 'mod-lists': ModListsSelect | ModListsSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; 'payload-migrations': PayloadMigrationsSelect | PayloadMigrationsSelect; @@ -90,8 +125,12 @@ export interface Config { db: { defaultIDType: number; }; - globals: {}; - globalsSelect: {}; + globals: { + 'game-rules': GameRule; + }; + globalsSelect: { + 'game-rules': GameRulesSelect | GameRulesSelect; + }; locale: null; user: User & { collection: 'users'; @@ -117,6 +156,25 @@ export interface UserAuthOperations { username: string; }; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "media". + */ +export interface Media { + id: number; + alt?: string | null; + updatedAt: string; + createdAt: string; + url?: string | null; + thumbnailURL?: string | null; + filename?: string | null; + mimeType?: string | null; + filesize?: number | null; + width?: number | null; + height?: number | null; + focalX?: number | null; + focalY?: number | null; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "users". @@ -125,6 +183,8 @@ export interface User { id: number; discordUsername: string; displayName: string; + payloadDisplayName?: string | null; + steamId: string; roles?: ('guest' | 'user' | 'admin' | 'developer')[] | null; updatedAt: string; createdAt: string; @@ -145,25 +205,6 @@ export interface User { | null; password?: string | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "media". - */ -export interface Media { - id: number; - alt: string; - updatedAt: string; - createdAt: string; - url?: string | null; - thumbnailURL?: string | null; - filename?: string | null; - mimeType?: string | null; - filesize?: number | null; - width?: number | null; - height?: number | null; - focalX?: number | null; - focalY?: number | null; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "ranks". @@ -184,8 +225,8 @@ export interface Rank { */ export interface Profile { id: number; - user?: (number | null) | User; - rank?: (number | null) | Rank; + user: number | User; + rank: number | Rank; profileTitle?: string | null; dossier?: { personalExcerpt?: string | null; @@ -208,6 +249,13 @@ export interface Profile { progression?: { xp?: number | null; awards?: (number | Award)[] | null; + scoreboard?: { + infantryKills?: number | null; + vehicleKills?: number | null; + armorKills?: number | null; + airKills?: number | null; + deaths?: number | null; + }; }; updatedAt: string; createdAt: string; @@ -240,6 +288,948 @@ export interface Award { updatedAt: string; createdAt: string; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "qualifications". + */ +export interface Qualification { + id: number; + name: string; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "assignments". + */ +export interface Assignment { + id: number; + name: string; + type: 'division' | 'squad' | 'team' | 'special'; + callsign?: string | null; + description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + /** + * The leader represents the individual responsible for this assignment and its members. The leader automatically counts as a member when this assignment is queried. + */ + leader?: (number | null) | User; + commandElement?: { + docs?: (number | Assignment)[]; + hasNextPage?: boolean; + totalDocs?: number; + }; + /** + * Add other teams as members of this team/assignment. + */ + subAssignments?: (number | Assignment)[] | null; + /** + * Add individuals as members of this team/assignment. + */ + members?: (number | User)[] | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "missions". + */ +export interface Mission { + id: number; + name: string; + /** + * A "code name" provides a unique way to reference this mission beyond just the mission's name. For example, a mission called "Operation Dragon Break" could be codenamed "OP:DRGBRK". + */ + codeName: string; + /** + * A summary of the mission. This is not the same as a briefing; instead, it describes the mission's theme and concept to the unit as a whole. + */ + summary: string; + operationType: 'main' | 'side' | 'external'; + classification: { + map: number | Map; + missionType: 'Zeus' | 'PvE' | 'PvP' | 'PvPvE' | 'Training' | 'Special'; + campaign: number | Campaign; + /** + * This mission contains custom SQF scripts. + */ + customScripts?: boolean | null; + startDateTime: string; + estimatedDuration: number; + }; + ownershipAndStatus: { + authors: (number | User)[]; + zeus?: (number | User)[] | null; + status: 'Concept' | 'Planning' | 'Ready' | 'Scheduled' | 'Active' | 'Completed' | 'Cancelled'; + visibility: 'unit' | 'leadership' | 'intel' | 'private'; + }; + missionRoles: { + maxPlayers: number; + providedRoles?: + | { + roleName: string; + /** + * If true, this mission cannot be executed without someone fulfilling this role. + */ + missionCritical?: boolean | null; + /** + * This role can only be fulfilled by someone possessing these qualifications. + */ + requiredMos?: (number | Qualification)[] | null; + /** + * This role can only be fulfilled by someone of this rank or higher. + */ + minimumRank?: (number | null) | Rank; + id?: string | null; + }[] + | null; + notes?: string | null; + }; + briefing?: + | { + sectionName: string; + details: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + }; + id?: string | null; + }[] + | null; + missionObjectives?: + | { + title: string; + description?: string | null; + /** + * If true, this mission will be considered a failure if this objective is failed. + */ + missionCritical?: boolean | null; + successOrFailConditions?: string | null; + id?: string | null; + }[] + | null; + civilianPresence?: ('None' | 'Low' | 'Medium' | 'High') | null; + factionsInvolved?: + | { + factionName: string; + threatLevel: 'ally' | 'friendly' | 'neutral' | 'hostile'; + id?: string | null; + }[] + | null; + gameDetails: { + serverDetails: { + serverIp: string; + serverPort: number; + serverPassword?: string | null; + }; + gameSetup: { + missionFile: number | MissionFile; + /** + * This field is not required only because you may be running a vanilla gamemode. If you have any mods at all in your mission, you MUST include a mod list. + */ + requiredMods?: (number | null) | ModList; + }; + }; + /** + * Mission requirements and conditions surrounding the deployment and use of logistics and support assets during the mission's runtime. + */ + logisticsAndSupport?: { + insertion?: ('helicopter' | 'aircraft' | 'paradrop' | 'boat' | 'car' | 'onFoot')[] | null; + extraction?: ('helicopter' | 'aircraft' | 'paradrop' | 'boat' | 'car' | 'onFoot')[] | null; + assetsAvailable?: + | { + /** + * The name or type of the asset provided (e.g. "Artillery", "M1A1 Tank", "Fuel Truck", "Close Air Support", etc.) + */ + assetType: string; + /** + * If applicable, the number of this asset that will be available at the start of the mission. + */ + assetCount?: string | null; + /** + * Whether or not this asset respawns during the mission, either automatically or manually via Zeus. + */ + doesRespawn?: boolean | null; + /** + * If applicable, the callsign of this asset (such as an aicraft providing close air support.) + */ + assetCallsign?: string | null; + id?: string | null; + }[] + | null; + }; + /** + * Communications and Standard Operating Procedures specific to this mission. + */ + commsAndDocs?: { + /** + * A detailed description of how radios will be used during this operation, including signals, contingency plans, and other relevant details. + */ + radioPlan?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + /** + * A list and description of each of the radio frequencies used for this mission. + */ + frequencies?: + | { + frequency: number; + /** + * Must be provided if the frequency used requires a separate radio channel. + */ + channel?: number | null; + /** + * The name assigned to this frequency (+ channel.) Examples of names include "COMNET", "PLTNET", "CASNET", etc. + */ + netName: string; + /** + * An explanation of the expected usage and purpose of this radio net. + */ + freqUsage: string; + id?: string | null; + }[] + | null; + }; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "maps". + */ +export interface Map { + id: number; + name: string; + fileName?: string | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "campaigns". + */ +export interface Campaign { + id: number; + name: string; + summary: string; + status: 'concept' | 'inProgress' | 'completed'; + description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + startDate?: string | null; + endDate?: string | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "mission-files". + */ +export interface MissionFile { + id: number; + missionFileName: string; + author: number | User; + updatedAt: string; + createdAt: string; + url?: string | null; + thumbnailURL?: string | null; + filename?: string | null; + mimeType?: string | null; + filesize?: number | null; + width?: number | null; + height?: number | null; + focalX?: number | null; + focalY?: number | null; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "mod-lists". + */ +export interface ModList { + id: number; + /** + * A friendly name for the mod list. + */ + modlistName: string; + author: number | User; + updatedAt: string; + createdAt: string; + url?: string | null; + thumbnailURL?: string | null; + filename?: string | null; + mimeType?: string | null; + filesize?: number | null; + width?: number | null; + height?: number | null; + focalX?: number | null; + focalY?: number | null; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "factions". + */ +export interface Faction { + id: number; + name: string; + type: 'majorFaction' | 'minorFaction' | 'corporation' | 'special'; + description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + /** + * Whether or not this faction is playable. Some factions may be specifically intended to be unplayable based on narrative requirements. + */ + playableFaction?: boolean | null; + /** + * Whether or not this faction is/was available as a starting faction at the beginning of the campaign. + */ + startingFaction?: boolean | null; + associatedCampaigns?: (number | Campaign)[] | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "technologies". + */ +export interface Technology { + id: number; + name: string; + /** + * An "Asset" technology will unlock a new item, vehicle, gear piece, structure, etc. An "Upgrade" technology will unlock an improvement to an Asset, like faster build speed, more storage capacity, etc. + */ + type: 'asset' | 'upgrade'; + summary: string; + description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + requirements?: { + intelligencePoints?: number | null; + prerequisiteTechnologies?: + | { + /** + * ALL of these technologies MUST be unlocked before this one can be. + */ + requiresAnd?: { + technology?: (number | Technology)[] | null; + }; + /** + * One or more of these technologies MUST be unlocked before this one can be. + */ + requiresOr?: { + technology?: (number | Technology)[] | null; + }; + id?: string | null; + }[] + | null; + }; + researchCosts: { + /** + * The minimum amount of time in minutes that it takes to research this technology. If no maximum duration is provided, this technology will be researched in an amount of time exactly equal to this number. + */ + minimumResearchDuration: number; + /** + * The maximum amount of time in minutes that it takes to research this technology. + */ + maximumResearchDuration?: number | null; + }; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "assets". + */ +export interface Asset { + id: number; + name: string; + className: string; + assetType: + | 'weapon' + | 'magazine' + | 'optic' + | 'muzzle' + | 'bipod' + | 'uniform' + | 'vest' + | 'backpack' + | 'helmet' + | 'facewear' + | 'nvg' + | 'radio' + | 'medical' + | 'tool' + | 'explosive' + | 'miscellaneous'; + 'Weapon Configuration'?: { + slotType?: ('primary' | 'secondary' | 'launcher') | null; + compatibleMagazines?: (number | Asset)[] | null; + compatibleAttachments?: (number | Asset)[] | null; + }; + 'Nightvision Configuration'?: { + nvgGeneration?: ('gen1' | 'gen2' | 'gen3') | null; + /** + * Whether or not these night-vision goggles possess a thermal vision mode. + */ + nvgHasThermals?: boolean | null; + }; + 'Container Configuration'?: { + capacityKg?: number | null; + weightKg?: number | null; + }; + 'Magazine Configuration'?: { + roundCapacity?: number | null; + ammoType?: string | null; + /** + * Whether or not this magazine is compatible with the GreenMag mod. + */ + greenmagCompatible?: boolean | null; + }; + 'Asset Metadata'?: { + mod?: string | null; + thumbnail?: (number | null) | Media; + gameDescription?: string | null; + }; + /** + * Whether or not this asset can be traded on the market. If unchecked, the asset can never be bought or sold, only crafted or collected. + */ + tradeable?: boolean | null; + marketTrading?: { + /** + * The rarity of this item in the world of the active campaign. Rarity will be accounted for in market valuation and trading calculations. + */ + Rarity?: ('basic' | 'common' | 'uncommon' | 'rare' | 'veryRare' | 'epic' | 'legendary' | 'unique') | null; + /** + * The asset's "perceived value" when considered in market and trading calculations. Note that the "base" values are the "resting" valuations. Later calculations will increase and decrease the valuation based on this resting valuation, ultimately tending to remain within some percentage margin of this base price. Always and only considers the primary campaign currency in regard to price. + */ + perceivedValue?: { + baseBuyPrice?: number | null; + baseSellPrice?: number | null; + }; + }; + crafting: { + craftable?: boolean | null; + /** + * This asset requires a blueprint to be crafted, otherwise it can only be obtained from scavenging and/or trading. + */ + blueprintRequired?: boolean | null; + /** + * One or more technologies required before this weapon can be crafted. + */ + technologyRequired?: (number | Technology)[] | null; + /** + * If checked, this asset requires the above technologies or else cannot be used at all. + */ + technologyRequiredToUse?: boolean | null; + craftingData: { + inputs?: + | { + resource: (number | Resource)[]; + quantity?: number | null; + /** + * If checked, this resource is "lended" to the crafting of this asset. Upon the crafting's completion, this resource is refunded to the unit. + */ + lended?: boolean | null; + id?: string | null; + }[] + | null; + requiresStructure?: (number | Structure)[] | null; + craftingTimePerUnit: number; + /** + * Byproducts of the crafting process. For each unit crafted of this Asset, these byproducts are also created and added to the unit's resources. + */ + byproducts?: + | { + resource: (number | Resource)[]; + quantity?: number | null; + id?: string | null; + }[] + | null; + /** + * An optional batch size. If provided, this number of this asset will be created upon crafting completion. + */ + batchSize: number; + }; + }; + /** + * Suggested complements to this asset (for example, if the asset was a Bandage, some related assets could include an IV, blood bag, epinephrine, etc.) + */ + relatedAssets?: (number | Asset)[] | null; + /** + * If checked, this item is approved and considered "live" (i.e. it will be considered in calculations and made available in-game.) + */ + isLive?: boolean | null; + notes?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "resources". + */ +export interface Resource { + id: number; + showWarning?: boolean | null; + /** + * Human-readable name for resources (e.g., "Fuel"). + */ + name: string; + /** + * Internal ID for scripts (e.g., "res_fuel"). + */ + codeName: string; + type: 'physical' | 'fluid' | 'energy' | 'abstract'; + /** + * A description of the resource, including where it comes from, how it is used, and any lore-related details. + */ + description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + /** + * While not required, an icon is absolutely recommended and will affect the way this resource is displayed in the application UI. + */ + icon?: (number | null) | Media; + /** + * A HEX color code used by this resource in the application UI (e.g., progress bars, text highlighting, etc.) + */ + color?: string | null; + /** + * The inherent "gold standard" value of one (1) unit of this resource. Used for calculating exchange rates and total asset worth. + */ + baseValue: number; + /** + * Can this be bought and/or sold on the market? + */ + tradeable?: boolean | null; + rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary' | 'exotic' | 'unique'; + /** + * The unit of measure for this resource in singular form (no plurals, e.g., liter, kg, point, unit, megawatt, person, etc.) + */ + unitOfMeasure: string; + /** + * The weight of one (1) unit (can be "0" for abstract resources like "Intel", "Labor", etc.) Critical for logistics transport calculations. + */ + massPerUnit: number; + /** + * Maximum amount that fits in a single standard cargo slot (if applicable.) + */ + stackSize?: number | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "structures". + */ +export interface Structure { + id: number; + /** + * The display name (e.g., "Forward Operating Base"). + */ + name: string; + /** + * Internal ID for scripts (e.g., "fob_alpha_tier1"). + */ + codeName: string; + /** + * A detailed description of the structure, including details like tactical advantages, resource production, and/or world lore regarding this structure. + */ + description: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + }; + /** + * An image depicting the structure. While not required, it is highly recommended as the existence of an image will affect the layout of the structure's page on the front-end. + */ + image?: (number | null) | Media; + category: 'logistics' | 'military' | 'civilian'; + materials: { + resource: number | Resource; + amount?: number | null; + id?: string | null; + }[]; + /** + * The number of ticks it takes to complete construction of this structure. + */ + constructionTime: number; + /** + * What research must be done before this can be built. + */ + requiredTech?: (number | Technology)[] | null; + /** + * If true, this structure can only be constructed as the result of an upgrade to an existing structure. If false, this structure can be constructed independently of any other structure's upgrade tree, even if another structure can upgrade into this one. + */ + requiresUpgrade?: boolean | null; + /** + * When this structure is upgraded, it becomes this type of structure. Note that the costs of the new structure apply - if this field is set, the new structure's build costs will still be consumed when this building is upgraded. To make it cheaper to upgrade, lower the "Upgrade Cost Multiplier". + */ + upgradesInto?: (number | null) | Structure; + /** + * The multiplier applied to the base build cost of the structure being upgraded into. A value of one (1) means the cost will exactly equal the structure's normal build cost, while a value of zero (0) would make the upgrade entirely free, only taking up construction time instead. + */ + upgradeCostMultiplier?: number | null; + terrainType: 'land' | 'water'; + /** + * What resources, if any, must be within a certain distance of this structure on placement. + */ + resourcesInRange?: + | { + resource?: (number | null) | Resource; + range?: number | null; + id?: string | null; + }[] + | null; + /** + * What structures, if any, must be within a certain distance of this structure on placement. + */ + structuresInRange?: + | { + structure?: (number | null) | Structure; + range?: number | null; + id?: string | null; + }[] + | null; + /** + * Recurring costs to keep this structure online. + */ + upkeep?: + | { + resource?: (number | null) | Resource; + /** + * How much of this resource is consumed per "game tick" (every hour.) + */ + amount?: number | null; + id?: string | null; + }[] + | null; + /** + * A base price that this structure could sell for when fully operational. Leaving this empty will make this structure unsellable. + */ + sellPrice?: number | null; + /** + * The app will use this type to determine what processes should run for this structure type. + */ + functionType?: ('producer' | 'storage' | 'sensor' | 'converter' | 'defense' | 'miscellaneous') | null; + canProduce?: + | ( + | { + relationTo: 'assets'; + value: number | Asset; + } + | { + relationTo: 'vehicles'; + value: number | Vehicle; + } + | { + relationTo: 'resources'; + value: number | Resource; + } + )[] + | null; + autoGeneratedResources?: + | { + resource?: (number | null) | Resource; + amount?: number | null; + frequency?: string | null; + id?: string | null; + }[] + | null; + /** + * The maximum storage capacity of this structure as mass (retrieved from the mass defined for every asset stored here.) + */ + maxCapacityMass?: number | null; + xSize?: number | null; + ySize?: number | null; + allowedStorage?: + | { + item?: + | ({ + relationTo: 'assets'; + value: number | Asset; + } | null) + | ({ + relationTo: 'vehicles'; + value: number | Vehicle; + } | null) + | ({ + relationTo: 'resources'; + value: number | Resource; + } | null); + /** + * How many of this asset, vehicle, or resource can be stored here. + */ + amount?: number | null; + id?: string | null; + }[] + | null; + /** + * Any items from this list can never be stored here, even if they meet all other criteria. + */ + prohibitedStorage?: + | { + item?: + | ({ + relationTo: 'assets'; + value: number | Asset; + } | null) + | ({ + relationTo: 'vehicles'; + value: number | Vehicle; + } | null) + | ({ + relationTo: 'resources'; + value: number | Resource; + } | null); + id?: string | null; + }[] + | null; + maxHealth: number; + /** + * So long as the structure meets its operational requirements, this is the amount of health restored to the structure every game tick. + */ + repairSpeed?: number | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "vehicles". + */ +export interface Vehicle { + id: number; + name: string; + /** + * If not provided, this vehicle will ONLY be available as a virtual asset (i.e., cannot be used in Arma.) + */ + classname?: string | null; + /** + * A detailed description of the vehicle, including details like tactical usage, mechanical details, and/or world lore regarding this vehicle. + */ + Description?: { + root: { + type: string; + children: { + type: any; + version: number; + [k: string]: unknown; + }[]; + direction: ('ltr' | 'rtl') | null; + format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | ''; + indent: number; + version: number; + }; + [k: string]: unknown; + } | null; + image?: (number | null) | Media; + category?: ('civilian' | 'utility' | 'transport' | 'weaponized' | 'military')[] | null; + materials?: + | { + resource: number | Resource; + amount?: number | null; + id?: string | null; + }[] + | null; + /** + * The number of ticks it takes to complete construction of this vehicle. + */ + constructionTime?: number | null; + /** + * What research must be done before this can be built. + */ + requiredTech?: (number | Technology)[] | null; + requiredStructure?: { + docs?: (number | Structure)[]; + hasNextPage?: boolean; + totalDocs?: number; + }; + scrapReturns?: + | { + resource: number | Resource; + amount?: number | null; + /** + * An optional percent (%) chance to recover this specific resource (between 0 and 100). + */ + chance?: number | null; + id?: string | null; + }[] + | null; + /** + * Recurring costs to keep this vehicle operational. + */ + upkeepCosts?: + | { + resource: number | Resource; + /** + * How much of this resource is consumed per tick. + */ + amount?: number | null; + id?: string | null; + }[] + | null; + width?: number | null; + height?: number | null; + maxMass?: number | null; + /** + * The number of ACE cargo slots this vehicle has by default. + */ + aceCargoSlots?: number | null; + /** + * The cargo this vehicle is permitted to carry if used virtually (e.g., during deliveries, moving troops, etc.) + */ + allowedVirtualCargo?: + | { + item: + | { + relationTo: 'assets'; + value: number | Asset; + } + | { + relationTo: 'vehicles'; + value: number | Vehicle; + } + | { + relationTo: 'resources'; + value: number | Resource; + }; + amount?: number | null; + id?: string | null; + }[] + | null; + maxHealth?: number | null; + armorRating?: ('none' | 'light' | 'medium' | 'heavy' | 'composite') | null; + maxSpeedOnRoad?: number | null; + maxSpeedOffRoad?: number | null; + maxAirspeed?: number | null; + maxKnots?: number | null; + pylons?: + | { + pylonName: string; + pylonType: 'mountedWeapon' | 'pylon'; + amount?: number | null; + ammoType?: (number | null) | Asset; + id?: string | null; + }[] + | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "narrative-events". + */ +export interface NarrativeEvent { + id: number; + name: string; + summary: string; + updatedAt: string; + createdAt: string; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-locked-documents". @@ -247,14 +1237,14 @@ export interface Award { export interface PayloadLockedDocument { id: number; document?: - | ({ - relationTo: 'users'; - value: number | User; - } | null) | ({ relationTo: 'media'; value: number | Media; } | null) + | ({ + relationTo: 'users'; + value: number | User; + } | null) | ({ relationTo: 'ranks'; value: number | Rank; @@ -266,6 +1256,62 @@ export interface PayloadLockedDocument { | ({ relationTo: 'awards'; value: number | Award; + } | null) + | ({ + relationTo: 'qualifications'; + value: number | Qualification; + } | null) + | ({ + relationTo: 'assignments'; + value: number | Assignment; + } | null) + | ({ + relationTo: 'missions'; + value: number | Mission; + } | null) + | ({ + relationTo: 'campaigns'; + value: number | Campaign; + } | null) + | ({ + relationTo: 'factions'; + value: number | Faction; + } | null) + | ({ + relationTo: 'technologies'; + value: number | Technology; + } | null) + | ({ + relationTo: 'assets'; + value: number | Asset; + } | null) + | ({ + relationTo: 'resources'; + value: number | Resource; + } | null) + | ({ + relationTo: 'vehicles'; + value: number | Vehicle; + } | null) + | ({ + relationTo: 'structures'; + value: number | Structure; + } | null) + | ({ + relationTo: 'maps'; + value: number | Map; + } | null) + | ({ + relationTo: 'narrative-events'; + value: number | NarrativeEvent; + } | null) + | ({ + relationTo: 'mission-files'; + value: number | MissionFile; + } | null) + | ({ + relationTo: 'mod-lists'; + value: number | ModList; } | null); globalSlug?: string | null; user: { @@ -309,6 +1355,24 @@ export interface PayloadMigration { updatedAt: string; createdAt: string; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "media_select". + */ +export interface MediaSelect { + alt?: T; + updatedAt?: T; + createdAt?: T; + url?: T; + thumbnailURL?: T; + filename?: T; + mimeType?: T; + filesize?: T; + width?: T; + height?: T; + focalX?: T; + focalY?: T; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "users_select". @@ -316,6 +1380,8 @@ export interface PayloadMigration { export interface UsersSelect { discordUsername?: T; displayName?: T; + payloadDisplayName?: T; + steamId?: T; roles?: T; updatedAt?: T; createdAt?: T; @@ -335,24 +1401,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "media_select". - */ -export interface MediaSelect { - alt?: T; - updatedAt?: T; - createdAt?: T; - url?: T; - thumbnailURL?: T; - filename?: T; - mimeType?: T; - filesize?: T; - width?: T; - height?: T; - focalX?: T; - focalY?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "ranks_select". @@ -385,6 +1433,15 @@ export interface ProfilesSelect { | { xp?: T; awards?: T; + scoreboard?: + | T + | { + infantryKills?: T; + vehicleKills?: T; + armorKills?: T; + airKills?: T; + deaths?: T; + }; }; updatedAt?: T; createdAt?: T; @@ -402,6 +1459,520 @@ export interface AwardsSelect { updatedAt?: T; createdAt?: T; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "qualifications_select". + */ +export interface QualificationsSelect { + name?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "assignments_select". + */ +export interface AssignmentsSelect { + name?: T; + type?: T; + callsign?: T; + description?: T; + leader?: T; + commandElement?: T; + subAssignments?: T; + members?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "missions_select". + */ +export interface MissionsSelect { + name?: T; + codeName?: T; + summary?: T; + operationType?: T; + classification?: + | T + | { + map?: T; + missionType?: T; + campaign?: T; + customScripts?: T; + startDateTime?: T; + estimatedDuration?: T; + }; + ownershipAndStatus?: + | T + | { + authors?: T; + zeus?: T; + status?: T; + visibility?: T; + }; + missionRoles?: + | T + | { + maxPlayers?: T; + providedRoles?: + | T + | { + roleName?: T; + missionCritical?: T; + requiredMos?: T; + minimumRank?: T; + id?: T; + }; + notes?: T; + }; + briefing?: + | T + | { + sectionName?: T; + details?: T; + id?: T; + }; + missionObjectives?: + | T + | { + title?: T; + description?: T; + missionCritical?: T; + successOrFailConditions?: T; + id?: T; + }; + civilianPresence?: T; + factionsInvolved?: + | T + | { + factionName?: T; + threatLevel?: T; + id?: T; + }; + gameDetails?: + | T + | { + serverDetails?: + | T + | { + serverIp?: T; + serverPort?: T; + serverPassword?: T; + }; + gameSetup?: + | T + | { + missionFile?: T; + requiredMods?: T; + }; + }; + logisticsAndSupport?: + | T + | { + insertion?: T; + extraction?: T; + assetsAvailable?: + | T + | { + assetType?: T; + assetCount?: T; + doesRespawn?: T; + assetCallsign?: T; + id?: T; + }; + }; + commsAndDocs?: + | T + | { + radioPlan?: T; + frequencies?: + | T + | { + frequency?: T; + channel?: T; + netName?: T; + freqUsage?: T; + id?: T; + }; + }; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "campaigns_select". + */ +export interface CampaignsSelect { + name?: T; + summary?: T; + status?: T; + description?: T; + startDate?: T; + endDate?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "factions_select". + */ +export interface FactionsSelect { + name?: T; + type?: T; + description?: T; + playableFaction?: T; + startingFaction?: T; + associatedCampaigns?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "technologies_select". + */ +export interface TechnologiesSelect { + name?: T; + type?: T; + summary?: T; + description?: T; + requirements?: + | T + | { + intelligencePoints?: T; + prerequisiteTechnologies?: + | T + | { + requiresAnd?: + | T + | { + technology?: T; + }; + requiresOr?: + | T + | { + technology?: T; + }; + id?: T; + }; + }; + researchCosts?: + | T + | { + minimumResearchDuration?: T; + maximumResearchDuration?: T; + }; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "assets_select". + */ +export interface AssetsSelect { + name?: T; + className?: T; + assetType?: T; + 'Weapon Configuration'?: + | T + | { + slotType?: T; + compatibleMagazines?: T; + compatibleAttachments?: T; + }; + 'Nightvision Configuration'?: + | T + | { + nvgGeneration?: T; + nvgHasThermals?: T; + }; + 'Container Configuration'?: + | T + | { + capacityKg?: T; + weightKg?: T; + }; + 'Magazine Configuration'?: + | T + | { + roundCapacity?: T; + ammoType?: T; + greenmagCompatible?: T; + }; + 'Asset Metadata'?: + | T + | { + mod?: T; + thumbnail?: T; + gameDescription?: T; + }; + tradeable?: T; + marketTrading?: + | T + | { + Rarity?: T; + perceivedValue?: + | T + | { + baseBuyPrice?: T; + baseSellPrice?: T; + }; + }; + crafting?: + | T + | { + craftable?: T; + blueprintRequired?: T; + technologyRequired?: T; + technologyRequiredToUse?: T; + craftingData?: + | T + | { + inputs?: + | T + | { + resource?: T; + quantity?: T; + lended?: T; + id?: T; + }; + requiresStructure?: T; + craftingTimePerUnit?: T; + byproducts?: + | T + | { + resource?: T; + quantity?: T; + id?: T; + }; + batchSize?: T; + }; + }; + relatedAssets?: T; + isLive?: T; + notes?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "resources_select". + */ +export interface ResourcesSelect { + showWarning?: T; + name?: T; + codeName?: T; + type?: T; + description?: T; + icon?: T; + color?: T; + baseValue?: T; + tradeable?: T; + rarity?: T; + unitOfMeasure?: T; + massPerUnit?: T; + stackSize?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "vehicles_select". + */ +export interface VehiclesSelect { + name?: T; + classname?: T; + Description?: T; + image?: T; + category?: T; + materials?: + | T + | { + resource?: T; + amount?: T; + id?: T; + }; + constructionTime?: T; + requiredTech?: T; + requiredStructure?: T; + scrapReturns?: + | T + | { + resource?: T; + amount?: T; + chance?: T; + id?: T; + }; + upkeepCosts?: + | T + | { + resource?: T; + amount?: T; + id?: T; + }; + width?: T; + height?: T; + maxMass?: T; + aceCargoSlots?: T; + allowedVirtualCargo?: + | T + | { + item?: T; + amount?: T; + id?: T; + }; + maxHealth?: T; + armorRating?: T; + maxSpeedOnRoad?: T; + maxSpeedOffRoad?: T; + maxAirspeed?: T; + maxKnots?: T; + pylons?: + | T + | { + pylonName?: T; + pylonType?: T; + amount?: T; + ammoType?: T; + id?: T; + }; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "structures_select". + */ +export interface StructuresSelect { + name?: T; + codeName?: T; + description?: T; + image?: T; + category?: T; + materials?: + | T + | { + resource?: T; + amount?: T; + id?: T; + }; + constructionTime?: T; + requiredTech?: T; + requiresUpgrade?: T; + upgradesInto?: T; + upgradeCostMultiplier?: T; + terrainType?: T; + resourcesInRange?: + | T + | { + resource?: T; + range?: T; + id?: T; + }; + structuresInRange?: + | T + | { + structure?: T; + range?: T; + id?: T; + }; + upkeep?: + | T + | { + resource?: T; + amount?: T; + id?: T; + }; + sellPrice?: T; + functionType?: T; + canProduce?: T; + autoGeneratedResources?: + | T + | { + resource?: T; + amount?: T; + frequency?: T; + id?: T; + }; + maxCapacityMass?: T; + xSize?: T; + ySize?: T; + allowedStorage?: + | T + | { + item?: T; + amount?: T; + id?: T; + }; + prohibitedStorage?: + | T + | { + item?: T; + id?: T; + }; + maxHealth?: T; + repairSpeed?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "maps_select". + */ +export interface MapsSelect { + name?: T; + fileName?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "narrative-events_select". + */ +export interface NarrativeEventsSelect { + name?: T; + summary?: T; + updatedAt?: T; + createdAt?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "mission-files_select". + */ +export interface MissionFilesSelect { + missionFileName?: T; + author?: T; + updatedAt?: T; + createdAt?: T; + url?: T; + thumbnailURL?: T; + filename?: T; + mimeType?: T; + filesize?: T; + width?: T; + height?: T; + focalX?: T; + focalY?: T; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "mod-lists_select". + */ +export interface ModListsSelect { + modlistName?: T; + author?: T; + updatedAt?: T; + createdAt?: T; + url?: T; + thumbnailURL?: T; + filename?: T; + mimeType?: T; + filesize?: T; + width?: T; + height?: T; + focalX?: T; + focalY?: T; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-locked-documents_select". @@ -434,6 +2005,29 @@ export interface PayloadMigrationsSelect { updatedAt?: T; createdAt?: T; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "game-rules". + */ +export interface GameRule { + id: number; + /** + * The base currency ("gold standard") used by all factions to pay for goods and services. + */ + mainCurrency: number | Resource; + updatedAt?: string | null; + createdAt?: string | null; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "game-rules_select". + */ +export interface GameRulesSelect { + mainCurrency?: T; + updatedAt?: T; + createdAt?: T; + globalType?: T; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "auth". diff --git a/src/payload.config.ts b/src/payload.config.ts index bec4524..35555ed 100644 --- a/src/payload.config.ts +++ b/src/payload.config.ts @@ -1,6 +1,5 @@ // storage-adapter-import-placeholder import { postgresAdapter } from "@payloadcms/db-postgres"; -import { payloadCloudPlugin } from "@payloadcms/payload-cloud"; import { lexicalEditor } from "@payloadcms/richtext-lexical"; import path from "path"; import { buildConfig } from "payload"; @@ -8,22 +7,86 @@ import { fileURLToPath } from "url"; import sharp from "sharp"; import { Users } from "@/collections/users/Users"; -import { Media } from "@/collections/Media"; -import { Profiles } from "@/collections/users/Profiles"; -import { Ranks } from "@/collections/users/Ranks"; import { Awards } from "@/collections/users/Awards"; +import { Media } from "@/collections/Media"; +import { Ranks } from "@/collections/users/Ranks"; +import { Profiles } from "@/collections/users/Profiles"; +import { Missions } from "@/collections/intelligence/Missions"; +import { Maps } from "@/collections/world/Maps"; +import { Campaigns } from "@/collections/intelligence/Campaigns"; +import { Qualifications } from "@/collections/users/Qualifications"; +import { MissionFiles } from "@/collections/server/MissionFiles"; +import { ModLists } from "@/collections/server/ModLists"; +import { Factions } from "@/collections/intelligence/Factions"; +import { Assets } from "@/collections/logistics/Assets"; +import { NarrativeEvents } from "@/collections/world/NarrativeEvents"; +import { Resources } from "@/collections/logistics/Resources"; +import { Vehicles } from "@/collections/logistics/Vehicles"; +import { Structures } from "@/collections/logistics/Structures"; +import { Assignments } from "@/collections/users/Assignments"; +import { Technologies } from "@/collections/intelligence/Technologies"; +import { GameRules } from "@/collections/game/GameRules"; const filename = fileURLToPath(import.meta.url); const dirname = path.dirname(filename); export default buildConfig({ + // serverURL: "http://localhost:3000/", admin: { user: Users.slug, importMap: { baseDir: path.resolve(dirname), }, + meta: { + titleSuffix: "- Polaris Task Force", + icons: [ + { + rel: "icon", + type: "image/png", + url: "/images/icon-favicon.png", + }, + ], + }, + components: { + beforeDashboard: ["@/components/static/BeforeDashboardText"], + graphics: { + Logo: "@/components/graphics/AppLogo", + Icon: "@/components/graphics/AppIcon", + }, + }, }, - collections: [Users, Media, Ranks, Profiles, Awards], + globals: [GameRules], + collections: [ + Media, + + // Users + Users, + Ranks, + Profiles, + Awards, + Qualifications, + Assignments, + + // Intel + Missions, + Campaigns, + Factions, + Technologies, + + // Logistics + Assets, + Resources, + Vehicles, + Structures, + + // World + Maps, + NarrativeEvents, + + // Server + MissionFiles, + ModLists, + ], editor: lexicalEditor(), secret: process.env.PAYLOAD_SECRET || "", typescript: { @@ -36,7 +99,7 @@ export default buildConfig({ }), sharp, plugins: [ - payloadCloudPlugin(), + // payloadCloudPlugin(), // storage-adapter-placeholder ], }); diff --git a/src/tools/seed/seedEverything.ts b/src/tools/seed/seedEverything.ts new file mode 100644 index 0000000..c4cabb1 --- /dev/null +++ b/src/tools/seed/seedEverything.ts @@ -0,0 +1,10 @@ +import { seedRanks } from "@/tools/seed/seedRanks"; +import { seedUsers } from "@/tools/seed/seedUsers"; +import { seedFactions } from "@/tools/seed/seedFactions"; + +// Users +await seedUsers(); +await seedRanks(); + +// Intelligence +await seedFactions(); diff --git a/src/tools/seed/seedFactions.ts b/src/tools/seed/seedFactions.ts new file mode 100644 index 0000000..09e2594 --- /dev/null +++ b/src/tools/seed/seedFactions.ts @@ -0,0 +1,78 @@ +import { getPayload } from "payload"; +import config from "@payload-config"; +import { Faction } from "@/payload-types"; + +// These are the default factions as of the campaign "The World We Knew". +const DEFAULT_FACTIONS: Omit[] = + [ + { + name: "American Reclamation Project", + description: null, + playableFaction: true, + startingFaction: true, + type: "majorFaction", + }, + { + name: "Eurasian Redevelopment Alliance", + description: null, + playableFaction: true, + startingFaction: true, + type: "majorFaction", + }, + { + name: "Worldmark", + description: null, + playableFaction: true, + startingFaction: true, + type: "majorFaction", + }, + { + name: "Inheritors", + description: null, + playableFaction: true, + startingFaction: true, + type: "minorFaction", + }, + { + name: "Deepwell", + description: null, + playableFaction: true, + startingFaction: true, + type: "minorFaction", + }, + { + name: "New Horizons", + description: null, + playableFaction: true, + startingFaction: true, + type: "minorFaction", + }, + ]; + +export const seedFactions = async () => { + const payload = await getPayload({ config }); + + payload.logger.info("Seeding faction data..."); + + payload.logger.warn("Deleting all existing factions..."); + await payload.delete({ + collection: "factions", + where: { + name: { exists: true }, + }, + }); + + payload.logger.info(`Creating ${DEFAULT_FACTIONS.length} new factions...`); + for (const faction of DEFAULT_FACTIONS) { + const result = await payload.create({ + collection: "factions", + data: { + ...faction, + }, + }); + + payload.logger.info(`Faction '${result.name}' created.`); + } +}; + +await seedFactions(); diff --git a/src/tools/seed/seedProfiles.ts b/src/tools/seed/seedProfiles.ts new file mode 100644 index 0000000..4e86bba --- /dev/null +++ b/src/tools/seed/seedProfiles.ts @@ -0,0 +1,54 @@ +import { getPayload } from "payload"; +import config from "@payload-config"; + +export const seedProfiles = async () => { + const payload = await getPayload({ config }); + + payload.logger.info("Seeding profile data..."); + + payload.logger.warn("Deleting all existing profiles..."); + await payload.delete({ + collection: "profiles", + where: { + id: { exists: true }, + }, + }); + + payload.logger.info(`Creating initial sysadmin/developer profile...`); + try { + await payload.create({ + collection: "profiles", + data: { + user: ( + await payload.find({ + collection: "users", + where: { + role: { + contains: "developer", + }, + }, + limit: 1, + }) + ).docs[0].id, + rank: ( + await payload.find({ + collection: "ranks", + where: { + name: { + equals: "First Lieutenant", + }, + }, + limit: 1, + }) + ).docs[0].id, + }, + }); + + payload.logger.info(`Sysadmin/developer profile created.`); + } catch (_) { + payload.logger.error("Unable to create sysadmin/developer profile, aborting."); + return; + } +}; + +await seedProfiles(); diff --git a/src/tools/seed/seedUsers.ts b/src/tools/seed/seedUsers.ts new file mode 100644 index 0000000..59517c8 --- /dev/null +++ b/src/tools/seed/seedUsers.ts @@ -0,0 +1,37 @@ +import { getPayload } from "payload"; +import config from "@payload-config"; + +export const seedUsers = async () => { + const payload = await getPayload({ config }); + + payload.logger.info("Seeding user data..."); + + payload.logger.warn("Deleting all existing users..."); + await payload.delete({ + collection: "users", + where: { + username: { exists: true }, + }, + }); + + payload.logger.info(`Creating initial sysadmin/developer user...`); + try { + const result = await payload.create({ + collection: "users", + data: { + username: "dev", + password: "Test123", + displayName: "J. Fraley", + discordUsername: "Z8MB1E", + steamId: "76561198091303179", + }, + }); + + payload.logger.info(`Sysadmin/developer user created.`); + } catch (err) { + payload.logger.error("Unable to create sysadmin/developer user, aborting."); + return; + } +}; + +await seedUsers();