```model Category { id Int @id ...
# orm-help
n
Copy code
model Category {
  id           Int        @id @default(autoincrement())
  name         String?    @db.VarChar(255)
  image        String?    @db.VarChar(400)
  displayImage String?    @db.VarChar(400)
  parentId     Int?
  createdAt    DateTime   @default(now()) @db.DateTime(0)
  updatedAt    DateTime   @default(now()) @db.DateTime(0)
  //relationshops
  parent       Category?  @relation(name: "Subcategories", fields: [parentId], references: [id])
  subcats      Category[] @relation(name: "Subcategories")
  shops        Shop[]
  Product      Product[]
}