This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.prisma
76 lines (67 loc) · 1.99 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
datasource db {
provider = "sqlite"
url = "file:./dev.db"
}
generator client {
provider = "prisma-client-js"
}
model AmazonProduct {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
asin String @unique
name String
size_length Float?
size_width Float?
size_height Float?
size_units String?
weight Float?
weight_units String?
attributes AmazonProductAttribute[]
bins ProductBin[]
}
model Attribute {
id Int @id @default(autoincrement())
value String @unique
AmazonProducts AmazonProductAttribute[]
}
model AmazonProductAttribute {
AttributeId Int
AmazonProductId Int
attribute Attribute? @relation(fields: [AttributeId], references: [id])
amazonProduct AmazonProduct? @relation(fields: [AmazonProductId], references: [id])
@@id([AttributeId, AmazonProductId])
}
model Pick {
id Int @id @default(autoincrement())
ProductBinId Int
ProductFromBin ProductBin @relation(fields: [ProductBinId], references: [id])
Outcome Boolean?
TimeTakenSec Float?
}
model Bin {
id Int @id @default(autoincrement())
BinId String @unique
BinName String
TableId String
TableName String?
AmazonProducts ProductBin[]
depth Float?
width Float?
height Float?
dimensions_units String?
}
model ProductBin {
id Int @id @default(autoincrement())
AmazonProductId Int
binId String
evalId Int
amazonProduct AmazonProduct? @relation(fields: [AmazonProductId], references: [id])
bin Bin? @relation(fields: [binId], references: [BinId])
evaluation Evaluation? @relation(fields: [evalId], references: [id])
picks Pick[]
}
model Evaluation {
id Int @id @default(autoincrement())
name String @unique
Setup ProductBin[]
}