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

Add DB forum post schema. #34

Merged
merged 6 commits into from
Mar 16, 2022
Merged

Conversation

kimslor
Copy link
Contributor

@kimslor kimslor commented Mar 15, 2022

Description

Added a database schema for a forum post using mongoose.
This should be used when a new forum post is created.

Related Issue

Solves #33

Type of change

  • New feature (enhancement)

How Has This Been Tested?

This schema has not been tested.

Checklist:

  • Does a similar (open or closed) pull request not already exist?
  • Is the pull request head repository a fork repository?
  • Is the pull request compare branch a development branch?
  • Is the code documented, particularly in hard-to-understand areas?
  • Does the code build without new warnings?
  • Has testing been performed that proves changes are effective and work?
  • Has a self- and/or peer-review of the code been performed?
  • Have dependent changes been merged and published in downstream modules?
  • Does all new and existing automated testing pass?
  • Is the person responsible for the repository assigned to the pull request?
  • Is the pull request linked to a project?
  • Is the pull request linked to a milestone?

For more information, refer to the Contributing Guidelines document.

@kimslor kimslor added the enhancement New feature or request label Mar 15, 2022
@kimslor kimslor added this to the Assignment 1 milestone Mar 15, 2022
@kimslor kimslor requested a review from a team as a code owner March 15, 2022 05:01
@kimslor kimslor self-assigned this Mar 15, 2022
Copy link
Contributor

@R055A R055A left a comment

Choose a reason for hiding this comment

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

Looks very good!

Howevr, I don't think the model directory is the correct place for a schema.

Could you move the schema to config and maybe make a new subdirectory for schemas?

You can manually test that it works, and someone should be self- or peer-reviewing the code before the code review.

@kimslor
Copy link
Contributor Author

kimslor commented Mar 15, 2022

@R055A The changes you requested have been made. Could you please re-review it? Thanks.

@R055A R055A self-requested a review March 15, 2022 07:29
@R055A R055A assigned R055A and unassigned kimslor Mar 15, 2022
Copy link
Contributor

@R055A R055A left a comment

Choose a reason for hiding this comment

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

I think it could be a good idea to include date and time. The test passes.

@kimslor
Copy link
Contributor Author

kimslor commented Mar 15, 2022

@R055A timestamps have been added for date-time attributes. It will assign createdAt and updatedAt fields.

@kimslor kimslor changed the title Added forum post schema. Added DB forum post schema. Mar 15, 2022
@kimslor kimslor changed the title Added DB forum post schema. Add DB forum post schema. Mar 15, 2022
@kimslor kimslor requested review from R055A and a team March 15, 2022 22:27
Copy link
Contributor

@R055A R055A left a comment

Choose a reason for hiding this comment

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

LGTM!

@R055A R055A merged commit b2fdc11 into SE701-T5:main Mar 16, 2022
@R055A R055A linked an issue Mar 16, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create DB schema for Forum Posts
2 participants