text: const { Schema, Types } = require('mongoose');
  const dateFormat = require('../utils/dateFormat');
  
  // This will not be a model, but rather will be used as the reaction field's subdocument schema in the Thought model.
  const reactionSchema = new Schema(
      {
          reactionId: {
              type: Schema.Types.ObjectId,
              default: () => new Types.ObjectId()
          },
          reactionBody: {
              type: String,
              required: true,
              trim: true,
              minlength: 1,
              maxlength: 280
          },
          username: {
              type: String,
              required: true,
              trim: true
          },
          createdAt: {
              type: Date,
              default: Date.now,
              get: createdAtVal => dateFormat(createdAtVal)
          }
      },
      {
          toJSON: {
              getters: true
          }
      }
  )
  
  module.exports = reactionSchema;
  