-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.prisma
More file actions
32 lines (29 loc) · 747 Bytes
/
schema.prisma
File metadata and controls
32 lines (29 loc) · 747 Bytes
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
generator client {
provider = "prisma-client-js"
previewFeatures = ["jsonProtocol"]
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL")
}
model Invoice {
id Int @id @default(autoincrement())
invoiceNumber String @unique
clientName String
clientEmail String
clientAddress String
clientPhone String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
dueDate DateTime
totalAmount Float
items String
userId Int
user User @relation(fields: [userId], references: [id])
}
model User {
id Int @id @default(autoincrement())
email String @unique
password String
invoices Invoice[]
}