ShenaniganDApp / shenanigan-monorepo

17 stars 4 forks source link

Comments Schema #314

Open youngkidwarrior opened 3 years ago

youngkidwarrior commented 3 years ago

Create a schema for Comments that follows the CommentModel.ts structure

{
    challenge: {
      type: Schema.Types.ObjectId,
      ref: "Challenge",
      required: true,
    },
    content: {
      type: String,
      required: true,
    },
    visible: {
      type: Boolean,
      default: true,
      required: true,
    },
    challengeSeries: {
      type: Number,
      required: true,
    },
    creator: {
      type: Schema.Types.ObjectId,
      ref: "User",
      required: true,
    },
  },
  { timestamps: true }