-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathschema.prisma
53 lines (47 loc) · 1.33 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// 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"
previewFeatures = ["tracing"]
}
datasource db {
provider = "sqlite"
url = "file:./data.db"
}
model Session {
id String @id
shop String
state String
isOnline Boolean @default(false)
scope String?
expires DateTime?
accessToken String
userId BigInt?
firstName String?
lastName String?
email String?
accountOwner Boolean @default(false)
locale String?
collaborator Boolean? @default(false)
emailVerified Boolean? @default(false)
}
model BillingSchedule {
id Int @id @default(autoincrement())
shop String @unique
hour Int @default(10)
timezone String @default("America/Toronto")
active Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model DunningTracker {
id Int @id @default(autoincrement())
shop String
contractId String
billingCycleIndex Int
failureReason String
completedAt DateTime?
completedReason String?
@@unique([shop, contractId, billingCycleIndex, failureReason], name: "uniqueBillingCycleFailure")
@@index([completedAt])
}