54 lines
No EOL
1.2 KiB
Text
54 lines
No EOL
1.2 KiB
Text
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model DesinationProvider {
|
|
id Int @id @default(autoincrement())
|
|
|
|
name String
|
|
description String?
|
|
backend String
|
|
connectionDetails String
|
|
}
|
|
|
|
model ForwardRule {
|
|
id Int @id @default(autoincrement())
|
|
|
|
name String
|
|
description String?
|
|
protocol String
|
|
sourceIP String
|
|
sourcePort Int
|
|
destPort Int
|
|
destProviderID Int
|
|
enabled Boolean
|
|
}
|
|
|
|
model Permission {
|
|
id Int @id @default(autoincrement())
|
|
|
|
permission String
|
|
has Boolean
|
|
user User @relation(fields: [userID], references: [id])
|
|
userID Int
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
|
|
email String @unique
|
|
username String? // NOT optional in the API, but just for backwards compat
|
|
name String
|
|
password String // Will be hashed using bcrypt
|
|
rootToken String?
|
|
isRootServiceAccount Boolean?
|
|
permissions Permission[]
|
|
} |