Alex Ruheni
3.10.03.10.0typedatasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["mongoDb"]
}
model Product {
  id     String  @id @default(auto()) @map("_id") @db.ObjectId
  name   String
  photos Photo[]
}
type Photo {
  height Int
  width  Int
  url    String
}photos// Create a new product with an embedded list of photos
const product = await prisma.product.create({
  data: {
    name: "Forest Runners",
    price: 59.99,
    // Create an embedded list of photos in the product
    photos: [
      { height: 100, width: 200, url: "1.jpg" },
      { height: 300, width: 400, url: "2.jpg" },
    ],
  },
})3.4.0prisma db pulltype-composite-type-depth=0--composite-type-depth=2@default(dbgenerated())@default(auto())dbgeneratedreferences3.10.0@relationfieldsreferencesfieldsreferencesmodel Post {
  id           String   @id @map("_id") @default(auto()) @db.ObjectId
  category_ids String[] @db.ObjectId
  categories   Category[]      @relation(fields: [category_ids], references: [id])
}
    
model Category {
  id       String   @id @map("_id") @default(auto()) @db.ObjectId
  post_ids String[] @db.ObjectId
  posts    Post[] @relation(fields: [post_ids], references: [id])
}db.Array(ObjectId)@db.ObjectIddbgenerated