Skip to content

Sample State

egarrett3 edited this page Jul 27, 2020 · 1 revision
{ 
    entities: {
      users: {
        1: {
            id: 1
            username: "giovanni"
            songsPosted: [2,3,4]
            albumsPosted: [2,4,6]
            subscriptions: [1,2]
           },
        2: {
            id: 2
            username: "don"
            songsPosted: [5,4,6]
            albumsPosted: [7,11]
            subscriptions: [1]
            }
        },
      songs: {
        1: {
            id: 2
            artistId: 3
            genreId: [4]
            title: "the bridges"
            likes: 12
            data: bd34ef5
            length: 60
           }
        },
      albums: {
        1: {
            id: 1
            title: "Time"
            songId: [1,5,8,9]
            genreId: [2,4]
            artistId: 3
            likes: 55
           },
        2: {
            id: 1
            title: "Capitals"
            songId: [1,5,8,9]
            genreId: [2,4]
            artistId: 4
            likes: 8
           }
        },
      merchandise: {
        1: {
            id: 1
            title: "Electric Lizard"
            albumId: [1,2,7,3,9,8]
            inventory: 34
            description: "cassette tape; excellent condition"
           },
        2: {
            id: 3
            title: "Lighting Dods"
            albumId: [152,2,7,3,11,8]
            inventory: 2
            description: "Electric Lizard T-shirts"
           }
        },
      genre: {
        1: {
            id: 1
            title: "Pop"
           },
        2: {
            id: 2
            title: "mustard"
            }
        },
    },  

    ui: {
        loading: true/false
    },

    errors: {
        logIn: ["Password must be 6 characters or longer"],
        SongNameInput: ["Must have a song name"],
        AlbumForm: ['album requires art']
    },

    session: {
        currentUser: user_id
    }
 }

Clone this wiki locally