-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
irynamcb edited this page Mar 3, 2020
·
8 revisions
{
entities: {
posts: {
1: {
id: 1,
body: "Body",
authorId: 1,
createdAt: 01 / 01 / 2020,
parentId: 1,
comments: [1, 2],
likes: [1, 2]
}
},
comments: {
1: {
id: 1,
authorId: 2,
postId: 1,
body: "This is a comment",
createdAt: 01 / 01 / 2020,
comments: [],
likes: [3]
},
2: {
id: 2,
authorId: 3,
postId: 1,
body: "This is another comment",
createdAt: 01 / 02 / 2020,
comments: [],
likes: []
}
},
likes: {
1: {
id: 1,
authorId: 2,
likeableId: 1,
likeableType: 'post',
createdAt: 01 / 01 / 2020,
},
2: {
id: 2,
authorId: 3,
likeableId: 1,
likeableType: 'post',
createdAt: 01 / 02 / 2020,
},
3: {
id: 3,
authorId: 1,
likeableId: 1,
likeableType: 'comment',
createdAt: 01 / 02 / 2020,
}
},
users: {
1: {
id: 1,
firstName: "John",
lastName: "Smith",
email: "john_smith@gmail.com",
createdAt: 01 / 01 / 2020,
updatedAt: 01 / 01 / 2020,
gender: "male",
birthDate: 01 / 01 / 2020,
about: "This is my bio",
education: "",
location: "Seattle",
friends: [2, 3]
},
2: {
id: 2,
firstName: "Jack",
lastName: "Jones",
email: "jack_jones@gmail.com",
createdAt: 01 / 02 / 2020,
updatedAt: 01 / 02 / 2020,
gender: "male",
birthDate: 01 / 02 / 2020,
about: "This is my awesome bio",
education: "",
location: "San Francisco",
friends: [1, 3]
},
3: {
id: 3,
firstName: "Brian",
lastName: "Collins",
email: "brian_collins@gmail.com",
createdAt: 01 / 03 / 2020,
updatedAt: 01 / 03 / 2020,
gender: "male",
birthDate: 01 / 03 / 2020,
about: "This is the best bio",
education: "University of Washington",
location: "Seattle",
friends: [1, 2]
},
4: {
id: 4,
firstName: "Jessica",
lastName: "Brown",
email: "jessica_brown@gmail.com",
createdAt: 01 / 04 / 2020,
updatedAt: 01 / 04 / 2020,
gender: "female",
birthDate: 01 / 04 / 2020,
about: "This is the best bio",
education: "Lake Washington Institute of Technology",
location: "Seattle",
friends: []
}
},
friendships: {
1: {
id: 1,
userId: 1,
friendId: 2
},
2: {
id: 2,
userId: 1,
friendId: 3
},
3: {
id: 3,
userId: 2,
friendId: 3
},
4: {
id: 4,
userId: 2,
friendId: 1
},
5: {
id: 5,
userId: 3,
friendId: 1
},
6: {
id: 6,
userId: 3,
friendId: 2
}
},
friendRequests: {
1: {
id: 1,
userId: 1,
friendId: 4
}
}
},
ui: {
modal: true/false
},
errors: {
login: ["Incorrect username/password"]
},
session: { currentUserId: 1 }
}