Skip to content

Sample State

John Lockhart edited this page Aug 17, 2018 · 6 revisions
{
  Entities: {
    Events: {
      1: {
        id: 1,
        event_name: "Summer Fan-ceee Fest",
        organizer: "fancy_diner",
        organizer_description: "I throw fancy dinner parties, only fancy people allowed!",
        date: 8/7/2018,
        time: 20:00,
        location_id: 1
        description: "Fancy dinner with a fancy hand fan!",
        price: 159.99,
        capacity: 25,
        category: "Arts",
      },
      2: {
        id: 2,
        event_name: "Solo party",
        organizer_id: 11,
        date: 9/1/2018,
        time: 00:00,
        location_id: 1,
        description: "this is a solo party and you can't come",
        price: 0,
        available: false,
      },
    },
    Tickets: {
      1: {
        id: 1,
        event_id: 2,
        attendee_id: 111
      },
      2: {
        id: 2,
        event_id: 1,
        attendee_id: 111
      }
      3: {
        id: 3,
        event_id: 1,
        attendee_id: 275
      }
    },
    Users: {
      111: {
        id: 111,
        username: "fancy_diner", 
        organizer: true,
      },
      275: {
        id: 275,
        username: "blue_moon",
        organizer: false,
      }
    }
  },
  Ui: {
    loading: true/false
  },
  Errors: {
    login: ["Incorrect username/password combination"],
    eventForm: ["Please fill out all required fields"],
  },
  Session: { currentUserId: 275 }
}
Clone this wiki locally