import mongoose from "mongoose";

const chatRoomSchema = new mongoose.Schema(
  {
    roomId: { type: String, unique: true },
    senderId: {type: mongoose.Schema.Types.ObjectId, ref: "User", required: true},
    receiverId: {type: mongoose.Schema.Types.ObjectId, ref: "User", required: true},
  },
  { timestamps: true },
);

export default mongoose.model("ChatRoom", chatRoomSchema);
