49 lines
1,012 B
Text
49 lines
1,012 B
Text
generator client {
|
|
provider = "prisma-client-js"
|
|
binaryTargets = ["native"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Node {
|
|
id String @id @default(uuid())
|
|
label String?
|
|
implements NodeImplements[]
|
|
|
|
fromNodes Graph[] @relation(name: "fromNode")
|
|
toNodes Graph[] @relation(name: "toNode")
|
|
}
|
|
|
|
model Edge {
|
|
id String @id @default(uuid())
|
|
}
|
|
|
|
model Interface {
|
|
id String @id @default(uuid())
|
|
implementors NodeImplements[]
|
|
}
|
|
|
|
model Graph {
|
|
label String?
|
|
|
|
fromId String
|
|
fromNode Node @relation(name: "fromNode", fields: [fromId], references: [id])
|
|
|
|
toId String
|
|
toNode Node @relation(name: "toNode", fields: [toId], references: [id])
|
|
|
|
@@id([fromId, toId])
|
|
}
|
|
|
|
model NodeImplements {
|
|
nodeId String
|
|
node Node @relation(fields: [nodeId], references: [id])
|
|
|
|
interfaceId String
|
|
interface Interface @relation(fields: [interfaceId], references: [id])
|
|
|
|
@@id([nodeId, interfaceId])
|
|
}
|