Kizspy.me
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, });
account ({
us {type: String, required: true},
pw{type: String, required: true},
},{timestamps: true, });
Task 01 (1.0 mark). Using the Express generator for developing the REST API server, create the related apartments, and
migrate them to a database named SDN302_PE_SU25_StudentCodeDB (MongoDB).
Zoom
+100%
Close