Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create Document Schema #8 #36

Merged
merged 3 commits into from
Feb 5, 2025
Merged

Conversation

sab115
Copy link
Contributor

@sab115 sab115 commented Feb 3, 2025

Developer: Sabrina Huang

Closes #8

Pull Request Summary

create documentSchema

Modifications

src/database/documentSchema.ts:

  • created a new file for the Document schema.
  • defined IDocument type
  • Added fields: clerkId, eventId, s3DocId, documentType, createdAt, status, and checkList.
  • Set default values and enum validation for status ("Completed", "Pending", "Not Submitted").
  • Defined createdAt to default to the current date.
  • Ensured the checkList field is an array with a default of an empty array.

Testing Considerations

check type definitions and default values.

Pull Request Checklist

  • Code is neat, readable, and works
  • Comments are appropriate
  • The commit messages follows our guidelines
  • The developer name is specified
  • The summary is completed
  • Assign reviewers

@sab115 sab115 requested review from aarav27 and ktaschek February 3, 2025 02:08
Copy link
Collaborator

@ktaschek ktaschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
The only fix needed is to change the type of EventId to Schema.Types,ObjectId with ref to "Event" since it's referencing another mongo document.

@sab115 sab115 requested a review from ktaschek February 4, 2025 23:22
Copy link
Collaborator

@ktaschek ktaschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@ktaschek ktaschek merged commit 44e1b2c into develop Feb 5, 2025
4 checks passed
@ktaschek ktaschek deleted the 8-createDocumentSchema branch February 5, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Document Schema
2 participants