39 lines
667 B
Text
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])
|
|
}
|