REDUX STORE SHAPE - TheBabblingBrin/Chord-Cloud GitHub Wiki

store = {
    session:{},
    Songs: {
        allSongs: {
            [songId]: {
                id,
                userId,
                albumId,
                title,
                description,
                url,
                createdAt,
                updatedAt,
                previewImage,
            },
        },
        currentSong: {
            id,
            userId,
            albumId,
            title,
            description,
            url,
            createdAt,
            updatedAt,
            previewImage,
            Album: {
                id,
                title,
                previewImage
            },
        },
    },

    singleSong: {
        [songId]: {
            id,
            userId,
            albumId,
            title,
            description,
            url,
            createdAt,
            updatedAt,
            previewImage,
            Artist: {
                id,
                username,
                previewImage
            },
            Album: {
                id,
                title,
                previewImage
            },
        },
    },
    Comments: {
        allComments: {
            [commentId]: {
                id,
                songId,
                userId,
                body,
                createdAt,
                updatedAt,
            },

        },
        singleComment: {
            [commentId]: {
                userId,
                songId,
                createdAt,
                updatedAt,
                body,
            },
            User: {
                id,
                username,
            },
        }
    }
}