Skip to content

Sample State

grantpaulson6 edited this page Apr 28, 2019 · 7 revisions
{
  entites: {
    users: {
      14: {
        id: 14,
        username: 'San Buena Ventura',
        firstname: 'Junipero',
        lastname: 'Serra',
        email: 'bythebeach@yahoo.com',
        about: 'I would like to host you in my mission'
      }
      126: {
        id: 126,
        username: 'Santa Rosa',
        firstname: 'Ferdinand',
        lastname: 'Magellin',
        email: 'sailsUP@gmail.com',
        about: 'I found this cute bay while I was sailing'
      }
    },
    listings: {
      40: {
        title: 'A mountain retreat',
        price: 25,
        description: 'A cute tent amonst the sequoias',
        owner_id: 14,
        max_guests: 3,
        num_beds: 1,
        num_bathrooms: 0,
        location: 'Yosemite'
      },
      121: {
        title: 'Island Oasis',
        price: 40,
        description: 'Come stay at our lovely shack on the beach of Santa Cruz island',
        owner_id: 126,
        max_guests: 5,
        num_beds: 0,
        num_bathrooms: 1,
        location: 'Channel Islands'
      }
    },
    bookings: {
      2000: {
        id: 2000,
        listing_id: 121,
        nomad_id: 200,
        start_date: 5/31/2019,
        end_date: 6/3/2019
      }
    },
    reviews: {
      1000: {
        id: 1000,
        author_id: 200,
        reviewable: ???,
        score: 4,
        review: 'It was delightful!'
      }
    }
  },
  ui: {
    loading: true / false,
    filters: {
      bounds: {
        northEast: {
          lat: 37.87543,
          lng: 127.874532
        },
        southWest: {
          lat: 37.17543,
          lng: 127.274532
        }
      },
      dates: {
        startDate: 5/31/2019,
        endDate: 6/2/2019
      },
      guests: 3,
      price: 200
    }
  },
  errors: {
    login: ['Username cant be blank']
  },
  session: {
    currentUserId: 14
  }
}

Clone this wiki locally