mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 02:23:21 +03:00
39 lines
738 B
Plaintext
39 lines
738 B
Plaintext
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model Thought {
|
|
id Int @id @default(autoincrement())
|
|
textMarkdown String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
tags Tag[]
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
userId Int
|
|
}
|
|
|
|
model Tag {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
createdAt DateTime @default(now())
|
|
thoughts Thought[]
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
userId Int
|
|
|
|
@@unique([name, userId])
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
|
|
thoughts Thought[]
|
|
tags Tag[]
|
|
}
|