prisma chobo
05/20/2022, 5:00 PMprisma.item.findFirst({
where: {
id: "....",
deletedAt: null,
}
})
But if I remove deletedAt, I get what I want. Am I approaching in wrong way?
My schema is
model Item {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String
type String?
extendedName String
provider String?
summary String?
destinationCountry Country
description String
remark String?
amount Float
gpoint Float?
gpointAmount Float?
display Boolean
discountRate Int?
notes Note[]
imageUrl String
state State
createdBy String
expiresAt Int
brand String
category String
order Order?
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
deletedAt Int?
@@index([category])
@@index([brand])
@@index([name])
@@index([provider])
}
Nurul
05/24/2022, 1:09 PM