connection string, port value, and JWT secret key in the .env file. Failure to do so will result in 0
Kizspy.ments.
Implement a part of Residents Management System. The scenario is as follows: An apartment complex has
many residents, and each resident belongs to one apartment.
Your database contains 3 collections with the following schema:
apartment ({
apartmentName: {type: String, required: true, unique: true},
totalOfFloors: {type: Number, required: true},
},{timestamps: true, });
resident ({
residentName: {type: String, required: true, unique: true},
residentDescription: { type: String, required: true},
floor: {type: Number, required: true, min: 1, max: 40},
yOB: {type: Number, required: true, min: 1940, max: 2025},
isOwned: {type: Boolean, default: false},
apartment: {type: mongoose.Schema.Types.ObjectId, ref: "apartment", required: true},
},{timestamps: true, });
Zoom
+ 100%
Close