Created
June 28, 2020 22:07
-
-
Save kayslay/b1eda03fe3d8e17508becda769cd74cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const Schema = mongoose.Schema; | |
const hotelSchema = new Schema({ | |
hotel_name: {type: String}, | |
location: {type: String}, | |
city: {type: String}, | |
state: {type: String}, | |
present_price: {type: String}, | |
features: {type: [String]}, | |
hotelsNg_link: {type: String}, | |
}); | |
hotelSchema.index({hotel_name: 1, city: 1, state: 1}, {unique: true, dropDups: true}); | |
module.exports = mongoose.model("hotel", hotelSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment