Sample State - fullernle/printsy GitHub Wiki

{
  entities: {
    users: {
      1: {
        id: 1,
        username: "fuller",
        email: "[email protected]"
        reviews: [1, 5]
      }, 
      2: {
        id: 2,
        username: "refugio"
        email: "[email protected]",
        reviews: [2]
      }
    },

    products: {
      1: {
        id: 1, 
        name: "Resin Warhammer Shoulderpads",
        description: "shoulderpads for any faction available upon request!",
        price: 12,
        seller_id: 1,
        category_id: [3, 4],
        reviews: [4, 1, 9]
      },
      2: {
        id: 2, 
        name: "3d printed Baby Yoda!",
        description: "Mandalorian fans rejoice!",
        price: 15,
        seller_id: 2,
        category_id: [3, 1],
        reviews: [2, 3, 6]
      }
    },
   
    carts: {
      1: {
        id: 1, 
        user_id: 1
      }
    },

    cartItems: {
      1: {
        id: 1,
        quantity: 2,
        product_id: 2,
        cart_id: 1
      },
      2: {
        id: 3,
        quantity: 1,
        product_id: 1,
        cart_id: 1
      }
    },

    reviews: {
      1: {
        id: 1,
        rating: 4,
        body: "BABY YODAAAAAAAAAAAAAAAAAAAAAAA. Need I say more?",
        product_id: 2, 
        reviewer_id: 1
      },
      2: {
        id: 2,
        rating: 2,
        body: "shoulderpads came broken, not detailed at all",
        product_id: 1, 
        reviewer_id: 5
      }
    }
  },

  ui: {
    loading: true, 
    modal: false,
  },

  errors: {
    login: ["Incorrect username/password combination"],
    reviewForm: ["Title and rating required"],
  },

  session: {
    currentUserId: 2
  }
}