-
-
Save tridungle/bd230f89fb248bea99deab56647c3c2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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