Mattias Ottosson
06/18/2021, 8:22 AMmodel Claim {
id Int @id @default(autoincrement())
customerName String
customerId String
contactPerson String
phone String
email String
orderId String
reference String
comment String?
createdAt DateTime @default(now())
status Status @default(NEW)
articles Article[]
}
enum Status {
NEW
PROCESSING
COMPLETED
}
await prisma.claim.findMany({
include: {
articles: true
}
});
{
id: 1,
customerName: 'Name',
customerId: 'Id',
contactPerson: 'Person',
phone: '049010000',
email: '<mailto:email@mail.se|email@mail.se>',
orderId: 'test123',
reference: 'ref123',
comment: 'Not bad',
createdAt: 2021-06-17T18:26:36.529Z,
articles: [ [Object] ]
}
Ryan
06/18/2021, 9:47 AMMattias Ottosson
06/18/2021, 9:52 AMRyan
06/18/2021, 9:57 AMMattias Ottosson
06/18/2021, 9:59 AMRyan
06/18/2021, 10:04 AMMattias Ottosson
06/18/2021, 10:05 AMMattias Ottosson
06/18/2021, 10:05 AMRyan
06/18/2021, 10:07 AMprisma db seed
.Mattias Ottosson
06/18/2021, 10:09 AMMattias Ottosson
06/18/2021, 10:10 AMMattias Ottosson
06/18/2021, 10:10 AMMattias Ottosson
06/18/2021, 10:10 AM