text: const mongoose = require("mongoose");
  
  const cartSchema = new mongoose.Schema({
    movie: {
      type: mongoose.Types.ObjectId,
      ref: "Movie",
      required: [true, "A cart must be linked to a movie"],
    },
    createdBy: {
      type: mongoose.Types.ObjectId,
      ref: "User",
      required: [true, "A cart must be created by a user"],
    },
    createdAt: {
      type: Date,
      default: Date.now,
    },
  });
  
  module.exports = mongoose.model("Cart", cartSchema);
  