const mongoose = require("mongoose");

const threadSchema = new mongoose.Schema({
  uuid: { type: String },
  user: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "User",
    required: true,
  },
  title: { type: String },
  createdAt: {
    type: Date,
    default: Date.now,
  },
});

module.exports = mongoose.model("Thread", threadSchema);
