-
Notifications
You must be signed in to change notification settings - Fork 6
Sample State
zw301 edited this page Apr 5, 2018
·
16 revisions
Sample State
{
entities: {
users: {
99: {
id: 99,
email: 'psyduck@pokemon.com',
firstName: 'Psyaya',
lastName: 'Duck',
phoneNumber: '',
reservations: [10,88],
favoriteIds: [1,2,3]
reviewIds: [2,5]
}
}
restaurants: {
1: {
id: 1,
ownerId: 1,
name: 'Masa',
address: '10 Columbus Cir',
star: 3,
city: 'New York',
state: 'NY',
zipcode: '10019',
phone_number: '212-823-9800',
openTime: '12:00:00',
closeTime: '22:00:00',
cuisine: 'Japanese',
photoIds:[2,5,6],
reservations: [62,78,99,123]
reviewIds: [34,98,100]
}
// ...more restaurants
}
photos: {
2: {
id: 2,
url: 'https://si.wsj.net/public/resources/images/BN-EF782_mag091_GR_20140822172842.jpg',
restaurantId: 1
}
// ...more photos
}
reservations: {
10: {
id: 10,
userId: 12,
restaurantId: 1,
time: '18:00:00',
date: '02/01/2018'
seats: 2,
}
// ...more reservations
}
favorites: {
12: {
id: 12,
userId: 11,
restaurantId: 1,
}
// ...more favorites
}
reviews: {
20: {
id: 20,
userId: 16,
restaurantId: 2,
rating: 5,
comment: 'OMG!'
}
// ...more reviews
}
},
ui: {
loading: true/false
},
errors: {
login: ["Incorrect username/password combination"],
reservationsForm: ["Invalid reservation"],
},
session: {
currentUser: {
id: 1,
firstName: "Jiro",
lastName: "Ono",
email: "thesushigod@opentable.com",
phoneNumber: ''
}
}
}