Skip to content

Commit

Permalink
fix: update eventId to reference Event model in Document schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sab115 committed Feb 4, 2025
1 parent d4358d0 commit 6f07c3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/database/documentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import mongoose, { Schema, Document } from "mongoose";

type IDocument = Document & {
clerkId: string;
eventId: string;
eventId: mongoose.Types.ObjectId;
s3DocId: string;
documentType: string;
createdAt: Date;
Expand All @@ -12,14 +12,14 @@ type IDocument = Document & {

const DocumentSchema = new Schema<IDocument>({
clerkId: { type: String, required: true },
eventId: { type: String, required: true },
eventId: { type: Schema.Types.ObjectId, ref: "Event", required: true },
s3DocId: { type: String, required: true },
documentType: { type: String, required: true },
createdAt: { type: Date, default: Date.now },
status: {
type: String,
enum: ["Completed", "Pending", "Not Submitted"],
default: "Pending",
default: "Not Submitted",
},
checkList: { type: [String], default: [] },
});
Expand Down

0 comments on commit 6f07c3c

Please sign in to comment.