How to do this in drizzle schema?

I moved from PrismaORM convert this model schema to drizzleSchema (nested self) How to do that?
model Category {
id Int @id @default(autoincrement())
name String
parentId Int?
parent Category? @relation("ParentChild", fields: [parentId], references: [id])
children Category[] @relation("ParentChild")
Product Product[]
}
model Category {
id Int @id @default(autoincrement())
name String
parentId Int?
parent Category? @relation("ParentChild", fields: [parentId], references: [id])
children Category[] @relation("ParentChild")
Product Product[]
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server