feat: Prisma instead of drizzle

This commit is contained in:
2024-10-01 19:10:05 +07:00
parent 7921bdf97f
commit 62a1da5e4b
8 changed files with 58 additions and 36 deletions

View File

@@ -0,0 +1,38 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
enum ServerType {
STATEFUL
STATELESS
REVERSE_PROXY
}
model Server {
id String @id @default(cuid())
name String @unique
address String
port Int
type ServerType
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model User {
id String @id @default(cuid())
username String @unique
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}