openstellaris/prisma/schema.prisma

40 lines
667 B
Text
Raw Normal View History

2023-12-08 12:26:08 +00:00
// 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])
}