cpsc455-bugstorm / TravelersTea

A Trip Planning App that tailors travel itineraries based on user preferences and providing detailed information about destinations; making travel planning less daunting and more enjoyable.
https://travelerstea-906d.onrender.com
MIT License
6 stars 2 forks source link

Create Trip Endpoint #45

Closed L0Lmaker closed 11 months ago

L0Lmaker commented 11 months ago

The Create Trip Endpoint should accept a basic list of constraints:

For now it can respond with hardcoded data.

Work with the frontend folks to design a response structure that works for both frontend and backend.

Currently @L0Lmaker is working with the following structure:

const mongoose = require('mongoose')

const itineraryStageSchema = new mongoose.Schema({
  stage: Number,
  place: String,
  description: String,
  address: String,
  cost: Number,
})

const itinerarySchema = new mongoose.Schema({
  destination: String,
  budget: Number,
  days: Number,
  stages: Number,
  preferences: [String],
  plan: [itineraryStageSchema],
})

const Itinerary = mongoose.model('Itinerary', itinerarySchema)

module.exports = Itinerary

But it is open to changes if there needs to be any.

NLmeng commented 11 months ago

94

NLmeng commented 11 months ago

94