connection string, port value, and JWT secret key in the .env file. Failure to do so will result in 0
points.
Kizspy.me
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 ({
resident Name: {type: String, required: true, unique: true},
residentDescription: { type: String, required: true},
Zoom
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, });
+ 100%
Close