Skip to content

Sample State

Anton James edited this page May 23, 2023 · 7 revisions
{
  entities: {
    users: {
      4: {
        id: 4,
        username: "GiggleMachine" 
      },
      5: {
        id: 5,
        username: "SnackAttack"
      } 
    },

    games: {
      8: {
        id: 8,
        title: "Darkest Dungeon II",
        price: 39.99,
        genre: "RPG",
        rating: 5,
        details: "Darkest Dungeon II is a roguelike road trip of the damned. Form a party, equip your stagecoach, and set off across the         
                  decaying landscape on a last gasp quest to avert the apocalypse. The greatest dangers you face, however, may come from 
                  within..."
      },
      9: {
        id: 9,
        title: "ArcheAge",
        price: 0,
        genre: "FreeToPlay",
        rating: 3,
        details: "Play ArcheAge - A vast open-world sandbox MMORPG with everything you can possibly imagine."
      },
      10: {
        id: 9,
        title: "Sekiro: Shadows Die Twice",
        price: 0,
        genre: "FreeToPlay",
        rating: 5,
        details: "Game of the Year - The Game Awards 2019 Best Action Game of 2019 - IGN Carve your own clever path to vengeance in the award 
                  winning adventure from developer FromSoftware, creators of Bloodborne and the Dark Souls series. Take Revenge. Restore Your 
                  Honor. Kill Ingeniously."
      }
    },

    carts: {
      1: {
        userId: 4,
        gameIds: [ 8, 10]
      },
      2: {
        userId: 25,
        gameIds: [ 1, 17]
      }
    },

    reviews: {
      11: {
        userId: 1,
        gameId: 9,
        rating: 3,
        comment: "Best game of all time!"
      },
      12: {
        userId: 25,
        gameId: 9,
        rating: 3,
        comment: "Was a great experience a very long time ago. Been under the managment of some extremely poor marketing, been a dead game 
                 milked to death for the better half of a decade at this point."
      }
    },  

  ui: {
    modal: true/false
  },

  errors: {
    signIn: ["Missing Required Fields", "Username Taken", "Existing Email Address", "Invalid Email Address"],
    login: ["Incorrect username/password combination"]
  },

  session: { currentUserId: 007 }
}

Clone this wiki locally