n
10/27/2021, 3:44 PMn
10/27/2021, 3:44 PMmodel Address {
id String @id @default(uuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
type AddressType
lineOne String
lineTwo String?
lineThree String?
city String
state String
postalCode String
country String
notes String?
default Boolean @default(false)
userId String?
user User? @relation(fields: [userId], references: [id])
organizationId String?
organization Organization? @relation(fields: [organizationId], references: [id])
@@index([id, userId])
@@index([id, userId, default])
@@index([id, organizationId])
@@index([id, organizationId, default])
}
n
10/27/2021, 3:45 PMn
10/27/2021, 3:45 PMawait this.prisma.address.update({
where: {
userId: createPayload.userId,
default: true
}
})
Austin Zentz
10/27/2021, 3:49 PMAustin Zentz
10/27/2021, 3:50 PMAustin Zentz
10/27/2021, 3:51 PMn
10/27/2021, 3:58 PMn
10/27/2021, 4:00 PMuserId
and the default
status how can i achieve thatAustin Zentz
10/27/2021, 4:01 PMAustin Zentz
10/27/2021, 4:02 PMn
10/27/2021, 4:10 PM