shahrukh ahmed
04/14/2022, 1:48 PMconst event = await prisma.posts.findUnique({
where: {
id: 1
}
});
alexwasik
04/14/2022, 2:31 PMPosts
shahrukh ahmed
04/14/2022, 2:40 PMmodel User {
id Int @id @default(autoincrement())
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
author User @relation(fields: [authorId], references: [id])
authorId Int
}
shahrukh ahmed
04/14/2022, 2:40 PMalexwasik
04/14/2022, 7:18 PMconst event = await prisma.posts.findUnique({
where: {
id: 1,
authorId: 1
}
});