Skip to content

Payment history model added by Ibrahim#5

Open
ibddon wants to merge 4 commits intomasterfrom
payment_history_model_feature
Open

Payment history model added by Ibrahim#5
ibddon wants to merge 4 commits intomasterfrom
payment_history_model_feature

Conversation

@ibddon
Copy link
Copy Markdown
Collaborator

@ibddon ibddon commented Jun 14, 2018

payment history model

@ibddon ibddon requested a review from wilforlan June 14, 2018 12:06
Copy link
Copy Markdown
Owner

@wilforlan wilforlan left a comment

Choose a reason for hiding this comment

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

Why do you need an id ?
mongo db has _id by default.

If there is any other reason, let me know.

The load_id should be an mongo object id and not a number

http://mongoosejs.com/docs/schematypes.html

Example: _someId: Schema.Types.ObjectId

Why is loan_status an Array ?

Read this very well
https://alexanderzeitler.com/articles/mongoose-referencing-schema-in-properties-and-arrays/

Copy link
Copy Markdown
Owner

@wilforlan wilforlan left a comment

Choose a reason for hiding this comment

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

Can you explain what Enumeration means ? Is this a JS Data Type, Can you provide reference ?

@ibddon
Copy link
Copy Markdown
Collaborator Author

ibddon commented Jun 14, 2018

Enumeration is an error, its should be enum, which i have corrected. Enum defines a set of possible values a given object can have. Example COUNTRY : ["Nigeria", "England", "Madagascar"]

Comment thread models/PaymentHistory.js Outdated


module.exports = mongoose.model('PaymentHistory', PaymentHistorySchema); No newline at end of file
module.exports = mongoose.model('PaymenthHistory', PaymentHistorySchema); No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Typo on PaymenthHistory

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.

2 participants