-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
35 lines (30 loc) · 1.07 KB
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
generator client {
provider = "prisma-client-js"
previewFeatures = ["extendedWhereUnique"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(dbgenerated("gen_random_uuid()")) @map("user_id") @db.Uuid
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
email String @unique
passwordSalt String @map("password_seed")
hashedPassword String @map("hashed_password")
todo Todo[]
@@map("users")
}
model Todo {
id String @id @default(dbgenerated("gen_random_uuid()")) @map("todo_id") @db.Uuid
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
title String
description String?
completed Boolean @default(false) @map("completed")
deletedAt DateTime? @map("deleted_at")
userId String @map("user_id") @db.Uuid
user User @relation(fields: [userId], references: [id])
@@map("todos")
}