openstellaris/prisma/schema.prisma
2023-12-08 06:26:08 -06:00

39 lines
667 B
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 Universe {
id String @id @default(uuid())
config Json
users User[]
}
model User {
id String @id @default(uuid())
name String
universeId String
universe Universe @relation(fields: [universeId], references: [id])
empire Empire?
}
model Empire {
id String @id @default(uuid())
name String
color String
userId String? @unique
user User? @relation(fields: [userId], references: [id])
}