-
Notifications
You must be signed in to change notification settings - Fork 30
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
Aish_Create buildingTools.js #605
Conversation
Created model file for buildingTools.js which consists of schema to hold various attribute information related to tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- schema name should be buildingTool since its a singular item and not plural?
- field
inventoryItemId
can be changed toitemType: { type: mongoose.SchemaTypes.ObjectId, ref: 'buildingInventoryType' }
- the image field should probably not be required for now, as it will be quite difficult to test
- can you explain what the
total
andavailableCount
fields are for? I'm not sure they're needed if the model is used to track a single item, but I might be missing something. - Will the default value of the
condition
field cause an error since it's not in the enum? Should the default instead be 'Good'? See alsopurchaseStatus
, should that even have a default value?
Updated file buildingTool.js for changes requested in PR
@tdkent :
|
Created model file for buildingTools.js which consists of schema to hold various attribute information related to tools.
Description
Created model file for buildingTools.js which consists of schema to hold various attribute information related to tools.
WBS # 4.4.1 from Phase 2 WBS document
Related PRS (if any):
NA
This is a backend PR
Main changes explained:
How to test:
npm install
and...
to run this PR locallyNote:
This is just a draft of the schema. Once the schema is finalized a collection will be made in the MongoDB database.