diff --git a/app/api/applications/get/route.ts b/app/api/applications/get/route.ts
index f481562..383e9e3 100644
--- a/app/api/applications/get/route.ts
+++ b/app/api/applications/get/route.ts
@@ -19,7 +19,6 @@ export async function POST(request: NextRequest) {
orderBy: { name: 'asc' }
});
- // Gesamtanzahl für Seitenberechnung
const totalCount = await prisma.application.count();
const maxPage = Math.ceil(totalCount / ITEMS_PER_PAGE);
diff --git a/app/api/servers/add/route.ts b/app/api/servers/add/route.ts
new file mode 100644
index 0000000..0f67576
--- /dev/null
+++ b/app/api/servers/add/route.ts
@@ -0,0 +1,31 @@
+import { NextResponse, NextRequest } from "next/server";
+import { PrismaClient } from '@/lib/generated/prisma'
+
+interface AddRequest {
+ name: string;
+ os: string;
+ ip: string;
+ url: string;
+}
+
+const prisma = new PrismaClient();
+
+export async function POST(request: NextRequest) {
+ try {
+ const body: AddRequest = await request.json();
+ const { name, os, ip, url } = body;
+
+ const server = await prisma.server.create({
+ data: {
+ name,
+ os,
+ ip,
+ url,
+ }
+ });
+
+ return NextResponse.json({ message: "Success", server });
+ } catch (error: any) {
+ return NextResponse.json({ error: error.message }, { status: 500 });
+ }
+}
diff --git a/app/api/servers/delete/route.ts b/app/api/servers/delete/route.ts
new file mode 100644
index 0000000..9dd9e84
--- /dev/null
+++ b/app/api/servers/delete/route.ts
@@ -0,0 +1,23 @@
+import { NextResponse, NextRequest } from "next/server";
+import { PrismaClient } from '@/lib/generated/prisma'
+
+const prisma = new PrismaClient();
+
+export async function POST(request: NextRequest) {
+ try {
+ const body = await request.json();
+ const id = Number(body.id);
+
+ if (!id) {
+ return NextResponse.json({ error: "Missing ID" }, { status: 400 });
+ }
+
+ await prisma.server.delete({
+ where: { id: id }
+ });
+
+ return NextResponse.json({ success: true });
+ } catch (error: any) {
+ return NextResponse.json({ error: error.message }, { status: 500 });
+ }
+}
\ No newline at end of file
diff --git a/app/api/servers/get/route.ts b/app/api/servers/get/route.ts
new file mode 100644
index 0000000..1f972b2
--- /dev/null
+++ b/app/api/servers/get/route.ts
@@ -0,0 +1,32 @@
+import { NextResponse, NextRequest } from "next/server";
+import { PrismaClient } from '@/lib/generated/prisma'
+
+interface GetRequest {
+ page: number;
+}
+
+const prisma = new PrismaClient();
+const ITEMS_PER_PAGE = 5;
+
+export async function POST(request: NextRequest) {
+ try {
+ const body: GetRequest = await request.json();
+ const page = Math.max(1, body.page || 1);
+
+ const servers = await prisma.server.findMany({
+ skip: (page - 1) * ITEMS_PER_PAGE,
+ take: ITEMS_PER_PAGE,
+ orderBy: { name: 'asc' }
+ });
+
+ const totalCount = await prisma.server.count();
+ const maxPage = Math.ceil(totalCount / ITEMS_PER_PAGE);
+
+ return NextResponse.json({
+ servers,
+ maxPage
+ });
+ } catch (error: any) {
+ return NextResponse.json({ error: error.message }, { status: 500 });
+ }
+}
\ No newline at end of file
diff --git a/app/dashboard/applications/Applications.tsx b/app/dashboard/applications/Applications.tsx
index 017352d..5ebb1c6 100644
--- a/app/dashboard/applications/Applications.tsx
+++ b/app/dashboard/applications/Applications.tsx
@@ -66,7 +66,6 @@ export default function Dashboard() {
const add = async () => {
try {
const response = await axios.post('/api/applications/add', { name, description, icon, publicURL, localURL });
- // Nach erfolgreichem Hinzufügen kannst du auch die Liste neu laden:
getApplications();
} catch (error: any) {
console.log(error.response.data);
diff --git a/app/dashboard/servers/Servers.tsx b/app/dashboard/servers/Servers.tsx
new file mode 100644
index 0000000..3916754
--- /dev/null
+++ b/app/dashboard/servers/Servers.tsx
@@ -0,0 +1,277 @@
+"use client";
+
+import { AppSidebar } from "@/components/app-sidebar"
+import {
+ Breadcrumb,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb"
+import { Separator } from "@/components/ui/separator"
+import {
+ SidebarInset,
+ SidebarProvider,
+ SidebarTrigger,
+} from "@/components/ui/sidebar"
+import { Button } from "@/components/ui/button"
+import { Plus, Link, MonitorCog, FileDigit, Trash2 } from "lucide-react" // Importiere Icons
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import {
+ Pagination,
+ PaginationContent,
+ PaginationEllipsis,
+ PaginationItem,
+ PaginationLink,
+ PaginationNext,
+ PaginationPrevious,
+} from "@/components/ui/pagination"
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from "@/components/ui/alert-dialog"
+import { Input } from "@/components/ui/input"
+import { Label } from "@/components/ui/label"
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+ } from "@/components/ui/select"
+ import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+ } from "@/components/ui/tooltip"
+
+import { useState, useEffect } from "react";
+import axios from 'axios';
+
+export default function Dashboard() {
+ const [name, setName] = useState("");
+ const [os, setOs] = useState("");
+ const [ip, setIp] = useState("");
+ const [url, setUrl] = useState("");
+
+ const [currentPage, setCurrentPage] = useState(1);
+ const [maxPage, setMaxPage] = useState(1);
+ const [servers, setServers] = useState([]);
+
+ const add = async () => {
+ try {
+ const response = await axios.post('/api/servers/add', { name, os, ip, url });
+ getServers();
+ } catch (error: any) {
+ console.log(error.response.data);
+ }
+ }
+
+ const getServers = async () => {
+ try {
+ const response = await axios.post('/api/servers/get', { page: currentPage });
+ setServers(response.data.servers);
+ setMaxPage(response.data.maxPage);
+ } catch (error: any) {
+ console.log(error.response);
+ }
+ }
+
+ useEffect(() => {
+ getServers();
+ }, [currentPage]);
+
+ const handlePrevious = () => {
+ setCurrentPage(prev => Math.max(1, prev - 1));
+ }
+
+ const handleNext = () => {
+ setCurrentPage(prev => Math.min(maxPage, prev + 1));
+ }
+
+ const deleteApplication = async (id: number) => {
+ try {
+ await axios.post('/api/servers/delete', { id });
+ getServers();
+ } catch (error: any) {
+ console.log(error.response.data);
+ }
+ }
+
+ return (
+
+
+
+
+
+
+
Your Servers
+
+
+
+
+
+
+ Add an server
+
+
+
+
+ setName(e.target.value)}/>
+
+
+
+
+
+
+
+ setIp(e.target.value)}/>
+
+
+
+
+
+
+
+
+ Link to a web interface (e.g. Proxmox or Portainer) with which the server can be managed
+
+
+
+ setUrl(e.target.value)}/>
+
+
+
+
+
+ Cancel
+
+
+
+
+
+
+ {servers.map((server) => (
+
+
+
+
+
+
{server.name}
+
+
+
+ OS: {server.os || '-'}
+
+
+
+ IP: {server.ip || 'Nicht angegeben'}
+
+
+
+
+
+
+
+ {server.url && (
+
+ )}
+
+
+
+
+
+
+
+ ))}
+
+
+
+
+ 1}
+ />
+
+
+
+ {currentPage}
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/app/dashboard/servers/page.tsx b/app/dashboard/servers/page.tsx
new file mode 100644
index 0000000..20b8d28
--- /dev/null
+++ b/app/dashboard/servers/page.tsx
@@ -0,0 +1,47 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import Cookies from "js-cookie";
+import { useRouter } from "next/navigation";
+import Servers from "./Servers"
+import axios from "axios";
+
+export default function DashboardPage() {
+ const router = useRouter();
+ const [isAuthChecked, setIsAuthChecked] = useState(false);
+ const [isValid, setIsValid] = useState(false);
+
+ useEffect(() => {
+ const token = Cookies.get("token");
+ if (!token) {
+ router.push("/");
+ } else {
+ const checkToken = async () => {
+ try {
+ const response = await axios.post("/api/auth/validate", {
+ token: token,
+ });
+
+ if (response.status === 200) {
+ setIsValid(true);
+ }
+ } catch (error: any) {
+ Cookies.remove("token");
+ router.push("/");
+ }
+ }
+ checkToken();
+ }
+ setIsAuthChecked(true);
+ }, [router]);
+
+ if (!isAuthChecked) {
+ return (
+
+
+
+ )
+ }
+
+ return isValid ? : null;
+}
\ No newline at end of file
diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsx
index 66b0bbd..30356c0 100644
--- a/components/app-sidebar.tsx
+++ b/components/app-sidebar.tsx
@@ -1,7 +1,7 @@
import * as React from "react"
import Image from "next/image"
-import { AppWindow, Settings, LayoutDashboardIcon, Briefcase } from "lucide-react"
+import { AppWindow, Settings, LayoutDashboardIcon, Briefcase, Server } from "lucide-react"
import {
Sidebar,
SidebarContent,
@@ -21,7 +21,6 @@ import Link from "next/link"
import Cookies from "js-cookie";
import { useRouter } from "next/navigation";
-// This is sample data.
const data = {
navMain: [
{
@@ -34,16 +33,21 @@ const data = {
url: "#",
icon: Briefcase,
items: [
- {
+ {
+ title: "Servers",
+ icon: Server,
+ url: "/dashboard/servers",
+ },
+ {
title: "Applications",
icon: AppWindow,
url: "/dashboard/applications",
- },
- {
+ },
+ {
title: "Settings",
icon: Settings,
url: "/Dashboard/setting",
- },
+ },
],
},
],
diff --git a/components/ui/select.tsx b/components/ui/select.tsx
new file mode 100644
index 0000000..dcbbc0c
--- /dev/null
+++ b/components/ui/select.tsx
@@ -0,0 +1,185 @@
+"use client"
+
+import * as React from "react"
+import * as SelectPrimitive from "@radix-ui/react-select"
+import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+function Select({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function SelectGroup({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function SelectValue({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function SelectTrigger({
+ className,
+ size = "default",
+ children,
+ ...props
+}: React.ComponentProps & {
+ size?: "sm" | "default"
+}) {
+ return (
+
+ {children}
+
+
+
+
+ )
+}
+
+function SelectContent({
+ className,
+ children,
+ position = "popper",
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+
+ {children}
+
+
+
+
+ )
+}
+
+function SelectLabel({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function SelectItem({
+ className,
+ children,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+
+
+
+ {children}
+
+ )
+}
+
+function SelectSeparator({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function SelectScrollUpButton({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+ )
+}
+
+function SelectScrollDownButton({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+ )
+}
+
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectScrollDownButton,
+ SelectScrollUpButton,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+}
diff --git a/lib/generated/prisma/edge.js b/lib/generated/prisma/edge.js
index 91f03bd..58c6762 100644
--- a/lib/generated/prisma/edge.js
+++ b/lib/generated/prisma/edge.js
@@ -99,6 +99,14 @@ exports.Prisma.ApplicationScalarFieldEnum = {
createdAt: 'createdAt'
};
+exports.Prisma.ServerScalarFieldEnum = {
+ id: 'id',
+ name: 'name',
+ os: 'os',
+ ip: 'ip',
+ url: 'url'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
@@ -116,7 +124,8 @@ exports.Prisma.NullsOrder = {
exports.Prisma.ModelName = {
- application: 'application'
+ application: 'application',
+ server: 'server'
};
/**
* Create the Client
@@ -165,13 +174,13 @@ const config = {
}
}
},
- "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel application {\n id Int @id @default(autoincrement())\n name String\n description String?\n icon String\n publicURL String\n localURL String?\n createdAt DateTime @default(now())\n}\n",
- "inlineSchemaHash": "a88ccb95a95cecea3377921cba4acd0f6f61b3cb7a62a3305def44cbec42c555",
+ "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel application {\n id Int @id @default(autoincrement())\n name String\n description String?\n icon String\n publicURL String\n localURL String?\n createdAt DateTime @default(now())\n}\n\nmodel server {\n id Int @id @default(autoincrement())\n name String\n os String?\n ip String?\n url String?\n}\n",
+ "inlineSchemaHash": "ddf72260e19ee586841a252bd3c8cf4f117ce15f0dc9aef0f129fd5d226787c0",
"copyEngine": true
}
config.dirname = '/'
-config.runtimeDataModel = JSON.parse("{\"models\":{\"application\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"localURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
+config.runtimeDataModel = JSON.parse("{\"models\":{\"application\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"localURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"server\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"os\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = undefined
config.compilerWasm = undefined
diff --git a/lib/generated/prisma/index-browser.js b/lib/generated/prisma/index-browser.js
index 3969594..da32d38 100644
--- a/lib/generated/prisma/index-browser.js
+++ b/lib/generated/prisma/index-browser.js
@@ -127,6 +127,14 @@ exports.Prisma.ApplicationScalarFieldEnum = {
createdAt: 'createdAt'
};
+exports.Prisma.ServerScalarFieldEnum = {
+ id: 'id',
+ name: 'name',
+ os: 'os',
+ ip: 'ip',
+ url: 'url'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
@@ -144,7 +152,8 @@ exports.Prisma.NullsOrder = {
exports.Prisma.ModelName = {
- application: 'application'
+ application: 'application',
+ server: 'server'
};
/**
diff --git a/lib/generated/prisma/index.d.ts b/lib/generated/prisma/index.d.ts
index e32701c..dc4965d 100644
--- a/lib/generated/prisma/index.d.ts
+++ b/lib/generated/prisma/index.d.ts
@@ -18,6 +18,11 @@ export type PrismaPromise = $Public.PrismaPromise
*
*/
export type application = $Result.DefaultSelection
+/**
+ * Model server
+ *
+ */
+export type server = $Result.DefaultSelection
/**
* ## Prisma Client ʲˢ
@@ -153,6 +158,16 @@ export class PrismaClient<
* ```
*/
get application(): Prisma.applicationDelegate;
+
+ /**
+ * `prisma.server`: Exposes CRUD operations for the **server** model.
+ * Example usage:
+ * ```ts
+ * // Fetch zero or more Servers
+ * const servers = await prisma.server.findMany()
+ * ```
+ */
+ get server(): Prisma.serverDelegate;
}
export namespace Prisma {
@@ -593,7 +608,8 @@ export namespace Prisma {
export const ModelName: {
- application: 'application'
+ application: 'application',
+ server: 'server'
};
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -612,7 +628,7 @@ export namespace Prisma {
omit: GlobalOmitOptions
}
meta: {
- modelProps: "application"
+ modelProps: "application" | "server"
txIsolationLevel: Prisma.TransactionIsolationLevel
}
model: {
@@ -690,6 +706,80 @@ export namespace Prisma {
}
}
}
+ server: {
+ payload: Prisma.$serverPayload
+ fields: Prisma.serverFieldRefs
+ operations: {
+ findUnique: {
+ args: Prisma.serverFindUniqueArgs
+ result: $Utils.PayloadToResult | null
+ }
+ findUniqueOrThrow: {
+ args: Prisma.serverFindUniqueOrThrowArgs
+ result: $Utils.PayloadToResult
+ }
+ findFirst: {
+ args: Prisma.serverFindFirstArgs
+ result: $Utils.PayloadToResult | null
+ }
+ findFirstOrThrow: {
+ args: Prisma.serverFindFirstOrThrowArgs
+ result: $Utils.PayloadToResult
+ }
+ findMany: {
+ args: Prisma.serverFindManyArgs
+ result: $Utils.PayloadToResult[]
+ }
+ create: {
+ args: Prisma.serverCreateArgs
+ result: $Utils.PayloadToResult
+ }
+ createMany: {
+ args: Prisma.serverCreateManyArgs
+ result: BatchPayload
+ }
+ createManyAndReturn: {
+ args: Prisma.serverCreateManyAndReturnArgs
+ result: $Utils.PayloadToResult[]
+ }
+ delete: {
+ args: Prisma.serverDeleteArgs
+ result: $Utils.PayloadToResult
+ }
+ update: {
+ args: Prisma.serverUpdateArgs
+ result: $Utils.PayloadToResult
+ }
+ deleteMany: {
+ args: Prisma.serverDeleteManyArgs
+ result: BatchPayload
+ }
+ updateMany: {
+ args: Prisma.serverUpdateManyArgs
+ result: BatchPayload
+ }
+ updateManyAndReturn: {
+ args: Prisma.serverUpdateManyAndReturnArgs
+ result: $Utils.PayloadToResult[]
+ }
+ upsert: {
+ args: Prisma.serverUpsertArgs
+ result: $Utils.PayloadToResult
+ }
+ aggregate: {
+ args: Prisma.ServerAggregateArgs
+ result: $Utils.Optional
+ }
+ groupBy: {
+ args: Prisma.serverGroupByArgs
+ result: $Utils.Optional[]
+ }
+ count: {
+ args: Prisma.serverCountArgs
+ result: $Utils.Optional | number
+ }
+ }
+ }
}
} & {
other: {
@@ -775,6 +865,7 @@ export namespace Prisma {
}
export type GlobalOmitConfig = {
application?: applicationOmit
+ server?: serverOmit
}
/* Types for Logging */
@@ -1924,6 +2015,1035 @@ export namespace Prisma {
}
+ /**
+ * Model server
+ */
+
+ export type AggregateServer = {
+ _count: ServerCountAggregateOutputType | null
+ _avg: ServerAvgAggregateOutputType | null
+ _sum: ServerSumAggregateOutputType | null
+ _min: ServerMinAggregateOutputType | null
+ _max: ServerMaxAggregateOutputType | null
+ }
+
+ export type ServerAvgAggregateOutputType = {
+ id: number | null
+ }
+
+ export type ServerSumAggregateOutputType = {
+ id: number | null
+ }
+
+ export type ServerMinAggregateOutputType = {
+ id: number | null
+ name: string | null
+ os: string | null
+ ip: string | null
+ url: string | null
+ }
+
+ export type ServerMaxAggregateOutputType = {
+ id: number | null
+ name: string | null
+ os: string | null
+ ip: string | null
+ url: string | null
+ }
+
+ export type ServerCountAggregateOutputType = {
+ id: number
+ name: number
+ os: number
+ ip: number
+ url: number
+ _all: number
+ }
+
+
+ export type ServerAvgAggregateInputType = {
+ id?: true
+ }
+
+ export type ServerSumAggregateInputType = {
+ id?: true
+ }
+
+ export type ServerMinAggregateInputType = {
+ id?: true
+ name?: true
+ os?: true
+ ip?: true
+ url?: true
+ }
+
+ export type ServerMaxAggregateInputType = {
+ id?: true
+ name?: true
+ os?: true
+ ip?: true
+ url?: true
+ }
+
+ export type ServerCountAggregateInputType = {
+ id?: true
+ name?: true
+ os?: true
+ ip?: true
+ url?: true
+ _all?: true
+ }
+
+ export type ServerAggregateArgs = {
+ /**
+ * Filter which server to aggregate.
+ */
+ where?: serverWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of servers to fetch.
+ */
+ orderBy?: serverOrderByWithRelationInput | serverOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the start position
+ */
+ cursor?: serverWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` servers from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` servers.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Count returned servers
+ **/
+ _count?: true | ServerCountAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to average
+ **/
+ _avg?: ServerAvgAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to sum
+ **/
+ _sum?: ServerSumAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to find the minimum value
+ **/
+ _min?: ServerMinAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to find the maximum value
+ **/
+ _max?: ServerMaxAggregateInputType
+ }
+
+ export type GetServerAggregateType = {
+ [P in keyof T & keyof AggregateServer]: P extends '_count' | 'count'
+ ? T[P] extends true
+ ? number
+ : GetScalarType
+ : GetScalarType
+ }
+
+
+
+
+ export type serverGroupByArgs = {
+ where?: serverWhereInput
+ orderBy?: serverOrderByWithAggregationInput | serverOrderByWithAggregationInput[]
+ by: ServerScalarFieldEnum[] | ServerScalarFieldEnum
+ having?: serverScalarWhereWithAggregatesInput
+ take?: number
+ skip?: number
+ _count?: ServerCountAggregateInputType | true
+ _avg?: ServerAvgAggregateInputType
+ _sum?: ServerSumAggregateInputType
+ _min?: ServerMinAggregateInputType
+ _max?: ServerMaxAggregateInputType
+ }
+
+ export type ServerGroupByOutputType = {
+ id: number
+ name: string
+ os: string | null
+ ip: string | null
+ url: string | null
+ _count: ServerCountAggregateOutputType | null
+ _avg: ServerAvgAggregateOutputType | null
+ _sum: ServerSumAggregateOutputType | null
+ _min: ServerMinAggregateOutputType | null
+ _max: ServerMaxAggregateOutputType | null
+ }
+
+ type GetServerGroupByPayload = Prisma.PrismaPromise<
+ Array<
+ PickEnumerable &
+ {
+ [P in ((keyof T) & (keyof ServerGroupByOutputType))]: P extends '_count'
+ ? T[P] extends boolean
+ ? number
+ : GetScalarType
+ : GetScalarType
+ }
+ >
+ >
+
+
+ export type serverSelect = $Extensions.GetSelect<{
+ id?: boolean
+ name?: boolean
+ os?: boolean
+ ip?: boolean
+ url?: boolean
+ }, ExtArgs["result"]["server"]>
+
+ export type serverSelectCreateManyAndReturn = $Extensions.GetSelect<{
+ id?: boolean
+ name?: boolean
+ os?: boolean
+ ip?: boolean
+ url?: boolean
+ }, ExtArgs["result"]["server"]>
+
+ export type serverSelectUpdateManyAndReturn = $Extensions.GetSelect<{
+ id?: boolean
+ name?: boolean
+ os?: boolean
+ ip?: boolean
+ url?: boolean
+ }, ExtArgs["result"]["server"]>
+
+ export type serverSelectScalar = {
+ id?: boolean
+ name?: boolean
+ os?: boolean
+ ip?: boolean
+ url?: boolean
+ }
+
+ export type serverOmit = $Extensions.GetOmit<"id" | "name" | "os" | "ip" | "url", ExtArgs["result"]["server"]>
+
+ export type $serverPayload = {
+ name: "server"
+ objects: {}
+ scalars: $Extensions.GetPayloadResult<{
+ id: number
+ name: string
+ os: string | null
+ ip: string | null
+ url: string | null
+ }, ExtArgs["result"]["server"]>
+ composites: {}
+ }
+
+ type serverGetPayload = $Result.GetResult
+
+ type serverCountArgs =
+ Omit & {
+ select?: ServerCountAggregateInputType | true
+ }
+
+ export interface serverDelegate {
+ [K: symbol]: { types: Prisma.TypeMap['model']['server'], meta: { name: 'server' } }
+ /**
+ * Find zero or one Server that matches the filter.
+ * @param {serverFindUniqueArgs} args - Arguments to find a Server
+ * @example
+ * // Get one Server
+ * const server = await prisma.server.findUnique({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findUnique(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find one Server that matches the filter or throw an error with `error.code='P2025'`
+ * if no matches were found.
+ * @param {serverFindUniqueOrThrowArgs} args - Arguments to find a Server
+ * @example
+ * // Get one Server
+ * const server = await prisma.server.findUniqueOrThrow({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findUniqueOrThrow(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find the first Server that matches the filter.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverFindFirstArgs} args - Arguments to find a Server
+ * @example
+ * // Get one Server
+ * const server = await prisma.server.findFirst({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findFirst(args?: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find the first Server that matches the filter or
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverFindFirstOrThrowArgs} args - Arguments to find a Server
+ * @example
+ * // Get one Server
+ * const server = await prisma.server.findFirstOrThrow({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findFirstOrThrow(args?: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find zero or more Servers that matches the filter.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverFindManyArgs} args - Arguments to filter and select certain fields only.
+ * @example
+ * // Get all Servers
+ * const servers = await prisma.server.findMany()
+ *
+ * // Get first 10 Servers
+ * const servers = await prisma.server.findMany({ take: 10 })
+ *
+ * // Only select the `id`
+ * const serverWithIdOnly = await prisma.server.findMany({ select: { id: true } })
+ *
+ */
+ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>>
+
+ /**
+ * Create a Server.
+ * @param {serverCreateArgs} args - Arguments to create a Server.
+ * @example
+ * // Create one Server
+ * const Server = await prisma.server.create({
+ * data: {
+ * // ... data to create a Server
+ * }
+ * })
+ *
+ */
+ create(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Create many Servers.
+ * @param {serverCreateManyArgs} args - Arguments to create many Servers.
+ * @example
+ * // Create many Servers
+ * const server = await prisma.server.createMany({
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ */
+ createMany(args?: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Create many Servers and returns the data saved in the database.
+ * @param {serverCreateManyAndReturnArgs} args - Arguments to create many Servers.
+ * @example
+ * // Create many Servers
+ * const server = await prisma.server.createManyAndReturn({
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ * // Create many Servers and only return the `id`
+ * const serverWithIdOnly = await prisma.server.createManyAndReturn({
+ * select: { id: true },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ *
+ */
+ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>>
+
+ /**
+ * Delete a Server.
+ * @param {serverDeleteArgs} args - Arguments to delete one Server.
+ * @example
+ * // Delete one Server
+ * const Server = await prisma.server.delete({
+ * where: {
+ * // ... filter to delete one Server
+ * }
+ * })
+ *
+ */
+ delete(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Update one Server.
+ * @param {serverUpdateArgs} args - Arguments to update one Server.
+ * @example
+ * // Update one Server
+ * const server = await prisma.server.update({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: {
+ * // ... provide data here
+ * }
+ * })
+ *
+ */
+ update(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Delete zero or more Servers.
+ * @param {serverDeleteManyArgs} args - Arguments to filter Servers to delete.
+ * @example
+ * // Delete a few Servers
+ * const { count } = await prisma.server.deleteMany({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ *
+ */
+ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Update zero or more Servers.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverUpdateManyArgs} args - Arguments to update one or more rows.
+ * @example
+ * // Update many Servers
+ * const server = await prisma.server.updateMany({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: {
+ * // ... provide data here
+ * }
+ * })
+ *
+ */
+ updateMany(args: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Update zero or more Servers and returns the data updated in the database.
+ * @param {serverUpdateManyAndReturnArgs} args - Arguments to update many Servers.
+ * @example
+ * // Update many Servers
+ * const server = await prisma.server.updateManyAndReturn({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ * // Update zero or more Servers and only return the `id`
+ * const serverWithIdOnly = await prisma.server.updateManyAndReturn({
+ * select: { id: true },
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ *
+ */
+ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>>
+
+ /**
+ * Create or update one Server.
+ * @param {serverUpsertArgs} args - Arguments to update or create a Server.
+ * @example
+ * // Update or create a Server
+ * const server = await prisma.server.upsert({
+ * create: {
+ * // ... data to create a Server
+ * },
+ * update: {
+ * // ... in case it already exists, update
+ * },
+ * where: {
+ * // ... the filter for the Server we want to update
+ * }
+ * })
+ */
+ upsert(args: SelectSubset>): Prisma__serverClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+
+ /**
+ * Count the number of Servers.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverCountArgs} args - Arguments to filter Servers to count.
+ * @example
+ * // Count the number of Servers
+ * const count = await prisma.server.count({
+ * where: {
+ * // ... the filter for the Servers we want to count
+ * }
+ * })
+ **/
+ count(
+ args?: Subset,
+ ): Prisma.PrismaPromise<
+ T extends $Utils.Record<'select', any>
+ ? T['select'] extends true
+ ? number
+ : GetScalarType
+ : number
+ >
+
+ /**
+ * Allows you to perform aggregations operations on a Server.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {ServerAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
+ * @example
+ * // Ordered by age ascending
+ * // Where email contains prisma.io
+ * // Limited to the 10 users
+ * const aggregations = await prisma.user.aggregate({
+ * _avg: {
+ * age: true,
+ * },
+ * where: {
+ * email: {
+ * contains: "prisma.io",
+ * },
+ * },
+ * orderBy: {
+ * age: "asc",
+ * },
+ * take: 10,
+ * })
+ **/
+ aggregate(args: Subset): Prisma.PrismaPromise>
+
+ /**
+ * Group by Server.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {serverGroupByArgs} args - Group by arguments.
+ * @example
+ * // Group by city, order by createdAt, get count
+ * const result = await prisma.user.groupBy({
+ * by: ['city', 'createdAt'],
+ * orderBy: {
+ * createdAt: true
+ * },
+ * _count: {
+ * _all: true
+ * },
+ * })
+ *
+ **/
+ groupBy<
+ T extends serverGroupByArgs,
+ HasSelectOrTake extends Or<
+ Extends<'skip', Keys>,
+ Extends<'take', Keys>
+ >,
+ OrderByArg extends True extends HasSelectOrTake
+ ? { orderBy: serverGroupByArgs['orderBy'] }
+ : { orderBy?: serverGroupByArgs['orderBy'] },
+ OrderFields extends ExcludeUnderscoreKeys>>,
+ ByFields extends MaybeTupleToUnion,
+ ByValid extends Has,
+ HavingFields extends GetHavingFields,
+ HavingValid extends Has,
+ ByEmpty extends T['by'] extends never[] ? True : False,
+ InputErrors extends ByEmpty extends True
+ ? `Error: "by" must not be empty.`
+ : HavingValid extends False
+ ? {
+ [P in HavingFields]: P extends ByFields
+ ? never
+ : P extends string
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
+ : [
+ Error,
+ 'Field ',
+ P,
+ ` in "having" needs to be provided in "by"`,
+ ]
+ }[HavingFields]
+ : 'take' extends Keys
+ ? 'orderBy' extends Keys
+ ? ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
+ : 'skip' extends Keys
+ ? 'orderBy' extends Keys
+ ? ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
+ : ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetServerGroupByPayload : Prisma.PrismaPromise
+ /**
+ * Fields of the server model
+ */
+ readonly fields: serverFieldRefs;
+ }
+
+ /**
+ * The delegate class that acts as a "Promise-like" for server.
+ * Why is this prefixed with `Prisma__`?
+ * Because we want to prevent naming conflicts as mentioned in
+ * https://github.com/prisma/prisma-client-js/issues/707
+ */
+ export interface Prisma__serverClient extends Prisma.PrismaPromise {
+ readonly [Symbol.toStringTag]: "PrismaPromise"
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise
+ /**
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
+ * resolved value cannot be modified from the callback.
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
+ * @returns A Promise for the completion of the callback.
+ */
+ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise
+ }
+
+
+
+
+ /**
+ * Fields of the server model
+ */
+ interface serverFieldRefs {
+ readonly id: FieldRef<"server", 'Int'>
+ readonly name: FieldRef<"server", 'String'>
+ readonly os: FieldRef<"server", 'String'>
+ readonly ip: FieldRef<"server", 'String'>
+ readonly url: FieldRef<"server", 'String'>
+ }
+
+
+ // Custom InputTypes
+ /**
+ * server findUnique
+ */
+ export type serverFindUniqueArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter, which server to fetch.
+ */
+ where: serverWhereUniqueInput
+ }
+
+ /**
+ * server findUniqueOrThrow
+ */
+ export type serverFindUniqueOrThrowArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter, which server to fetch.
+ */
+ where: serverWhereUniqueInput
+ }
+
+ /**
+ * server findFirst
+ */
+ export type serverFindFirstArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter, which server to fetch.
+ */
+ where?: serverWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of servers to fetch.
+ */
+ orderBy?: serverOrderByWithRelationInput | serverOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for searching for servers.
+ */
+ cursor?: serverWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` servers from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` servers.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
+ *
+ * Filter by unique combinations of servers.
+ */
+ distinct?: ServerScalarFieldEnum | ServerScalarFieldEnum[]
+ }
+
+ /**
+ * server findFirstOrThrow
+ */
+ export type serverFindFirstOrThrowArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter, which server to fetch.
+ */
+ where?: serverWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of servers to fetch.
+ */
+ orderBy?: serverOrderByWithRelationInput | serverOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for searching for servers.
+ */
+ cursor?: serverWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` servers from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` servers.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
+ *
+ * Filter by unique combinations of servers.
+ */
+ distinct?: ServerScalarFieldEnum | ServerScalarFieldEnum[]
+ }
+
+ /**
+ * server findMany
+ */
+ export type serverFindManyArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter, which servers to fetch.
+ */
+ where?: serverWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of servers to fetch.
+ */
+ orderBy?: serverOrderByWithRelationInput | serverOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for listing servers.
+ */
+ cursor?: serverWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` servers from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` servers.
+ */
+ skip?: number
+ distinct?: ServerScalarFieldEnum | ServerScalarFieldEnum[]
+ }
+
+ /**
+ * server create
+ */
+ export type serverCreateArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * The data needed to create a server.
+ */
+ data: XOR
+ }
+
+ /**
+ * server createMany
+ */
+ export type serverCreateManyArgs = {
+ /**
+ * The data used to create many servers.
+ */
+ data: serverCreateManyInput | serverCreateManyInput[]
+ skipDuplicates?: boolean
+ }
+
+ /**
+ * server createManyAndReturn
+ */
+ export type serverCreateManyAndReturnArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelectCreateManyAndReturn | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * The data used to create many servers.
+ */
+ data: serverCreateManyInput | serverCreateManyInput[]
+ skipDuplicates?: boolean
+ }
+
+ /**
+ * server update
+ */
+ export type serverUpdateArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * The data needed to update a server.
+ */
+ data: XOR
+ /**
+ * Choose, which server to update.
+ */
+ where: serverWhereUniqueInput
+ }
+
+ /**
+ * server updateMany
+ */
+ export type serverUpdateManyArgs = {
+ /**
+ * The data used to update servers.
+ */
+ data: XOR
+ /**
+ * Filter which servers to update
+ */
+ where?: serverWhereInput
+ /**
+ * Limit how many servers to update.
+ */
+ limit?: number
+ }
+
+ /**
+ * server updateManyAndReturn
+ */
+ export type serverUpdateManyAndReturnArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelectUpdateManyAndReturn | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * The data used to update servers.
+ */
+ data: XOR
+ /**
+ * Filter which servers to update
+ */
+ where?: serverWhereInput
+ /**
+ * Limit how many servers to update.
+ */
+ limit?: number
+ }
+
+ /**
+ * server upsert
+ */
+ export type serverUpsertArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * The filter to search for the server to update in case it exists.
+ */
+ where: serverWhereUniqueInput
+ /**
+ * In case the server found by the `where` argument doesn't exist, create a new server with this data.
+ */
+ create: XOR
+ /**
+ * In case the server was found with the provided `where` argument, update it with this data.
+ */
+ update: XOR
+ }
+
+ /**
+ * server delete
+ */
+ export type serverDeleteArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ /**
+ * Filter which server to delete.
+ */
+ where: serverWhereUniqueInput
+ }
+
+ /**
+ * server deleteMany
+ */
+ export type serverDeleteManyArgs = {
+ /**
+ * Filter which servers to delete
+ */
+ where?: serverWhereInput
+ /**
+ * Limit how many servers to delete.
+ */
+ limit?: number
+ }
+
+ /**
+ * server without action
+ */
+ export type serverDefaultArgs = {
+ /**
+ * Select specific fields to fetch from the server
+ */
+ select?: serverSelect | null
+ /**
+ * Omit specific fields from the server
+ */
+ omit?: serverOmit | null
+ }
+
+
/**
* Enums
*/
@@ -1951,6 +3071,17 @@ export namespace Prisma {
export type ApplicationScalarFieldEnum = (typeof ApplicationScalarFieldEnum)[keyof typeof ApplicationScalarFieldEnum]
+ export const ServerScalarFieldEnum: {
+ id: 'id',
+ name: 'name',
+ os: 'os',
+ ip: 'ip',
+ url: 'url'
+ };
+
+ export type ServerScalarFieldEnum = (typeof ServerScalarFieldEnum)[keyof typeof ServerScalarFieldEnum]
+
+
export const SortOrder: {
asc: 'asc',
desc: 'desc'
@@ -2103,6 +3234,60 @@ export namespace Prisma {
createdAt?: DateTimeWithAggregatesFilter<"application"> | Date | string
}
+ export type serverWhereInput = {
+ AND?: serverWhereInput | serverWhereInput[]
+ OR?: serverWhereInput[]
+ NOT?: serverWhereInput | serverWhereInput[]
+ id?: IntFilter<"server"> | number
+ name?: StringFilter<"server"> | string
+ os?: StringNullableFilter<"server"> | string | null
+ ip?: StringNullableFilter<"server"> | string | null
+ url?: StringNullableFilter<"server"> | string | null
+ }
+
+ export type serverOrderByWithRelationInput = {
+ id?: SortOrder
+ name?: SortOrder
+ os?: SortOrderInput | SortOrder
+ ip?: SortOrderInput | SortOrder
+ url?: SortOrderInput | SortOrder
+ }
+
+ export type serverWhereUniqueInput = Prisma.AtLeast<{
+ id?: number
+ AND?: serverWhereInput | serverWhereInput[]
+ OR?: serverWhereInput[]
+ NOT?: serverWhereInput | serverWhereInput[]
+ name?: StringFilter<"server"> | string
+ os?: StringNullableFilter<"server"> | string | null
+ ip?: StringNullableFilter<"server"> | string | null
+ url?: StringNullableFilter<"server"> | string | null
+ }, "id">
+
+ export type serverOrderByWithAggregationInput = {
+ id?: SortOrder
+ name?: SortOrder
+ os?: SortOrderInput | SortOrder
+ ip?: SortOrderInput | SortOrder
+ url?: SortOrderInput | SortOrder
+ _count?: serverCountOrderByAggregateInput
+ _avg?: serverAvgOrderByAggregateInput
+ _max?: serverMaxOrderByAggregateInput
+ _min?: serverMinOrderByAggregateInput
+ _sum?: serverSumOrderByAggregateInput
+ }
+
+ export type serverScalarWhereWithAggregatesInput = {
+ AND?: serverScalarWhereWithAggregatesInput | serverScalarWhereWithAggregatesInput[]
+ OR?: serverScalarWhereWithAggregatesInput[]
+ NOT?: serverScalarWhereWithAggregatesInput | serverScalarWhereWithAggregatesInput[]
+ id?: IntWithAggregatesFilter<"server"> | number
+ name?: StringWithAggregatesFilter<"server"> | string
+ os?: StringNullableWithAggregatesFilter<"server"> | string | null
+ ip?: StringNullableWithAggregatesFilter<"server"> | string | null
+ url?: StringNullableWithAggregatesFilter<"server"> | string | null
+ }
+
export type applicationCreateInput = {
name: string
description?: string | null
@@ -2170,6 +3355,59 @@ export namespace Prisma {
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
+ export type serverCreateInput = {
+ name: string
+ os?: string | null
+ ip?: string | null
+ url?: string | null
+ }
+
+ export type serverUncheckedCreateInput = {
+ id?: number
+ name: string
+ os?: string | null
+ ip?: string | null
+ url?: string | null
+ }
+
+ export type serverUpdateInput = {
+ name?: StringFieldUpdateOperationsInput | string
+ os?: NullableStringFieldUpdateOperationsInput | string | null
+ ip?: NullableStringFieldUpdateOperationsInput | string | null
+ url?: NullableStringFieldUpdateOperationsInput | string | null
+ }
+
+ export type serverUncheckedUpdateInput = {
+ id?: IntFieldUpdateOperationsInput | number
+ name?: StringFieldUpdateOperationsInput | string
+ os?: NullableStringFieldUpdateOperationsInput | string | null
+ ip?: NullableStringFieldUpdateOperationsInput | string | null
+ url?: NullableStringFieldUpdateOperationsInput | string | null
+ }
+
+ export type serverCreateManyInput = {
+ id?: number
+ name: string
+ os?: string | null
+ ip?: string | null
+ url?: string | null
+ }
+
+ export type serverUpdateManyMutationInput = {
+ name?: StringFieldUpdateOperationsInput | string
+ os?: NullableStringFieldUpdateOperationsInput | string | null
+ ip?: NullableStringFieldUpdateOperationsInput | string | null
+ url?: NullableStringFieldUpdateOperationsInput | string | null
+ }
+
+ export type serverUncheckedUpdateManyInput = {
+ id?: IntFieldUpdateOperationsInput | number
+ name?: StringFieldUpdateOperationsInput | string
+ os?: NullableStringFieldUpdateOperationsInput | string | null
+ ip?: NullableStringFieldUpdateOperationsInput | string | null
+ url?: NullableStringFieldUpdateOperationsInput | string | null
+ }
+
export type IntFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel>
in?: number[] | ListIntFieldRefInput<$PrismaModel>
@@ -2331,6 +3569,38 @@ export namespace Prisma {
_max?: NestedDateTimeFilter<$PrismaModel>
}
+ export type serverCountOrderByAggregateInput = {
+ id?: SortOrder
+ name?: SortOrder
+ os?: SortOrder
+ ip?: SortOrder
+ url?: SortOrder
+ }
+
+ export type serverAvgOrderByAggregateInput = {
+ id?: SortOrder
+ }
+
+ export type serverMaxOrderByAggregateInput = {
+ id?: SortOrder
+ name?: SortOrder
+ os?: SortOrder
+ ip?: SortOrder
+ url?: SortOrder
+ }
+
+ export type serverMinOrderByAggregateInput = {
+ id?: SortOrder
+ name?: SortOrder
+ os?: SortOrder
+ ip?: SortOrder
+ url?: SortOrder
+ }
+
+ export type serverSumOrderByAggregateInput = {
+ id?: SortOrder
+ }
+
export type StringFieldUpdateOperationsInput = {
set?: string
}
diff --git a/lib/generated/prisma/index.js b/lib/generated/prisma/index.js
index 07022cc..6cf6088 100644
--- a/lib/generated/prisma/index.js
+++ b/lib/generated/prisma/index.js
@@ -100,6 +100,14 @@ exports.Prisma.ApplicationScalarFieldEnum = {
createdAt: 'createdAt'
};
+exports.Prisma.ServerScalarFieldEnum = {
+ id: 'id',
+ name: 'name',
+ os: 'os',
+ ip: 'ip',
+ url: 'url'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
@@ -117,7 +125,8 @@ exports.Prisma.NullsOrder = {
exports.Prisma.ModelName = {
- application: 'application'
+ application: 'application',
+ server: 'server'
};
/**
* Create the Client
@@ -166,8 +175,8 @@ const config = {
}
}
},
- "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel application {\n id Int @id @default(autoincrement())\n name String\n description String?\n icon String\n publicURL String\n localURL String?\n createdAt DateTime @default(now())\n}\n",
- "inlineSchemaHash": "a88ccb95a95cecea3377921cba4acd0f6f61b3cb7a62a3305def44cbec42c555",
+ "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel application {\n id Int @id @default(autoincrement())\n name String\n description String?\n icon String\n publicURL String\n localURL String?\n createdAt DateTime @default(now())\n}\n\nmodel server {\n id Int @id @default(autoincrement())\n name String\n os String?\n ip String?\n url String?\n}\n",
+ "inlineSchemaHash": "ddf72260e19ee586841a252bd3c8cf4f117ce15f0dc9aef0f129fd5d226787c0",
"copyEngine": true
}
@@ -188,7 +197,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
config.isBundled = true
}
-config.runtimeDataModel = JSON.parse("{\"models\":{\"application\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"localURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
+config.runtimeDataModel = JSON.parse("{\"models\":{\"application\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"publicURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"localURL\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"server\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"os\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = undefined
config.compilerWasm = undefined
diff --git a/lib/generated/prisma/package.json b/lib/generated/prisma/package.json
index a99953f..1a81daa 100644
--- a/lib/generated/prisma/package.json
+++ b/lib/generated/prisma/package.json
@@ -1,5 +1,5 @@
{
- "name": "prisma-client-f866ab83e1fdba807723a2c13419542ace85abe9dc3c3c95678bc48381e8217e",
+ "name": "prisma-client-07d58c262f4c41e54bcbbc55d879a689e13512206b7e87b3b603872e2010444b",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js",
diff --git a/lib/generated/prisma/query_engine-windows.dll.node.tmp16108 b/lib/generated/prisma/query_engine-windows.dll.node.tmp16108
new file mode 100644
index 0000000..97f9a43
Binary files /dev/null and b/lib/generated/prisma/query_engine-windows.dll.node.tmp16108 differ
diff --git a/lib/generated/prisma/wasm.js b/lib/generated/prisma/wasm.js
index 3969594..da32d38 100644
--- a/lib/generated/prisma/wasm.js
+++ b/lib/generated/prisma/wasm.js
@@ -127,6 +127,14 @@ exports.Prisma.ApplicationScalarFieldEnum = {
createdAt: 'createdAt'
};
+exports.Prisma.ServerScalarFieldEnum = {
+ id: 'id',
+ name: 'name',
+ os: 'os',
+ ip: 'ip',
+ url: 'url'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
@@ -144,7 +152,8 @@ exports.Prisma.NullsOrder = {
exports.Prisma.ModelName = {
- application: 'application'
+ application: 'application',
+ server: 'server'
};
/**
diff --git a/package-lock.json b/package-lock.json
index a9f7be5..f326c3e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,6 +13,7 @@
"@radix-ui/react-alert-dialog": "^1.1.7",
"@radix-ui/react-dialog": "^1.1.7",
"@radix-ui/react-label": "^2.1.3",
+ "@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-separator": "^1.1.3",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-tooltip": "^1.2.0",
@@ -1134,6 +1135,12 @@
"@prisma/debug": "6.6.0"
}
},
+ "node_modules/@radix-ui/number": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz",
+ "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==",
+ "license": "MIT"
+ },
"node_modules/@radix-ui/primitive": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz",
@@ -1191,6 +1198,32 @@
}
}
},
+ "node_modules/@radix-ui/react-collection": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.3.tgz",
+ "integrity": "sha512-mM2pxoQw5HJ49rkzwOs7Y6J4oYH22wS8BfK2/bBxROlI4xuR0c4jEenQP63LlTlDkO6Buj2Vt+QYAYcOgqtrXA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.0.3",
+ "@radix-ui/react-slot": "1.2.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-compose-refs": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
@@ -1257,6 +1290,21 @@
}
}
},
+ "node_modules/@radix-ui/react-direction": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",
+ "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-dismissable-layer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.6.tgz",
@@ -1468,6 +1516,49 @@
}
}
},
+ "node_modules/@radix-ui/react-select": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.7.tgz",
+ "integrity": "sha512-exzGIRtc7S8EIM2KjFg+7lJZsH7O7tpaBaJbBNVDnOZNhtoQ2iV+iSNfi2Wth0m6h3trJkMVvzAehB3c6xj/3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/number": "1.1.1",
+ "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/react-collection": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.6",
+ "@radix-ui/react-focus-guards": "1.1.2",
+ "@radix-ui/react-focus-scope": "1.1.3",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.3",
+ "@radix-ui/react-portal": "1.1.5",
+ "@radix-ui/react-primitive": "2.0.3",
+ "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.1.1",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.1.3",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-separator": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.3.tgz",
@@ -1609,6 +1700,21 @@
}
}
},
+ "node_modules/@radix-ui/react-use-previous": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",
+ "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-use-rect": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz",
diff --git a/package.json b/package.json
index 9e49748..59472ef 100644
--- a/package.json
+++ b/package.json
@@ -14,6 +14,7 @@
"@radix-ui/react-alert-dialog": "^1.1.7",
"@radix-ui/react-dialog": "^1.1.7",
"@radix-ui/react-label": "^2.1.3",
+ "@radix-ui/react-select": "^2.1.7",
"@radix-ui/react-separator": "^1.1.3",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-tooltip": "^1.2.0",
diff --git a/prisma/migrations/20250412100552_server/migration.sql b/prisma/migrations/20250412100552_server/migration.sql
new file mode 100644
index 0000000..cd9ea9a
--- /dev/null
+++ b/prisma/migrations/20250412100552_server/migration.sql
@@ -0,0 +1,10 @@
+-- CreateTable
+CREATE TABLE "server" (
+ "id" SERIAL NOT NULL,
+ "name" TEXT NOT NULL,
+ "os" TEXT,
+ "ip" TEXT,
+ "url" TEXT,
+
+ CONSTRAINT "server_pkey" PRIMARY KEY ("id")
+);
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index b56d099..8516470 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -22,4 +22,12 @@ model application {
publicURL String
localURL String?
createdAt DateTime @default(now())
+}
+
+model server {
+ id Int @id @default(autoincrement())
+ name String
+ os String?
+ ip String?
+ url String?
}
\ No newline at end of file