Skip to content

Sample State

Timothy Chang edited this page Feb 3, 2023 · 3 revisions
{ 
  entities: {
    users: {
      1: {
        id: 1, 
        username: "TimC1229",
        name: "Timothy Chang",
        LikedSongs: [15], 
        LikedPlaylists: [6, 7],
        LikedAlbums: [9],
      },
      2: {
        id: 2, 
        username: "TheGoat6",
        name: "Michael Jordan",
        LikedSongs: [15, 16], 
        likedPlaylists: [7],
        LikedAlbums: [9, 20],
      }
    },
    songs: {
      15: {
        id: 15, 
        title: "As It Was",
        ArtistId: 12,
        AlbumId: 9
      },
      16: {
        id: 16, 
        title: "Superhero",
        ArtistId: 16,
        AlbumId: 20
      }
    },
    playlists: {
      6: {
        id: 6, 
        title: "Happy Songs",
        AuthorId: 1,
        public: true,
        songs: [15],
        PlaylistPhotoUrl: (...)
      },
      7: {
        id: 7, 
        title: "Hype Songs",
        AuthorId: 2,
        public: false,
        songs: [16],
        PlaylistPhotoUrl: (...)
      }
    },
    artists: {
      12: {
        id: 12, 
        name: "Harry Styles",
        description: "I was part of One Direction",
        albums: [9]
      },
      16: {
        id: 16, 
        name: "Metro Boomin",
        description: "I make rap music",
        albums: [20]
      }
    },
    albums: {
      9: {
        id: 9, 
        title: "Harry's House",
        ArtistId: 12,
        PublishedDate: "05/20/2022",
        songs: [15],
        AlbumPhotoUrl: (...)
      },
      20: {
        id: 20, 
        title: "Heroes and Villains",
        ArtistId: 16,
        PublishedDate: "12/02/2022",
        songs: [16],
        AlbumPhotoUrl: (...)
      }
    } 
  },
  ui: {
    loading: true/false,
    listening: true/false
  },
  errors: {
    login: ["Username or Password was incorrect, please try again"],
    SearchBar: ["The entity you searched could not be found, please try again"],
  },
  session: { currentUserId: 1 }
  } 

}

Clone this wiki locally