rsbaher1 / ENSF619.2-RSVP_Module

Course project for ENSF 619.2 F21
MIT License
0 stars 1 forks source link

FEATURE: Adding Guest List to Event #10

Closed rsbaher1 closed 3 years ago

rsbaher1 commented 3 years ago

Feature Goal

A Guest List could be added during the creation of an Event or after an Event is created.

Guest Model

A Guest List is a list of the model Guest:

{
  "invitationID": "<number>",
  "fullname": "<full name>", 
  "email": "<email>",
  "isUnderage": "<0 or 1>",
  "isUnder12": "<0 or 1>",
  "inWeddingParty": "<0 or 1>",
  "weddingPartyPosition": "<one of [0, 1, 2, 3, 4]>",
  "rsvpStatus": "<0 or 1>",
  "rsvpMeal": "meal option"
}

Guest Model Explanation:

  1. invitationID: number assigned to guests to be on the same invitation. (Required)
  2. fullname: How guest is to be addressed on rspv invitation. (Required)
  3. email: required to send RSVP invitation, each invitation requires only 1 guest to provide and email
  4. isUnderage: 0 (default)->above 21, 1->below 21
  5. isUnder12: 0 (default)-> above 12, 1-> below 12
  6. inWeddingParty: 0 (default)->only a guest, 1-> is part of wedding party
  7. weddingPartyPosition:
    • 0 (default) ->only if 'inWeddingParty' is also 0
    • 1->Maid of Honour
    • 2->Best Man
    • 3->Bridesmaid
    • 4->Junior Bridesmaid
    • 5->Ring Bearer
    • 6->Flower Girl
    • 7->Parent
  8. rsvpStatus: 0->not attending, 1->attending, none->No response
  9. rsvpMeal: text of meal option selected if added to the event

Request Format

This Request should be done via an HTTP POST request, with the body as follows:

{
  "eventID": "1",
  "guestList": [
        {
            "invitationID": "1",
            "fullname": "Guest 1", 
            "email": "guest1@test.com",
            "isUnderage": 0,
            "isUnder12": 0,
            "inWeddingParty": 0,
            "weddingPartyPosition": 0,
            "rsvpStatus": "",
            "rsvpMeal": "",
        },
        {
            "invitationID": "1",
            "fullname": "Guest 2", 
            "email": "",
            "isUnderage": 0,
            "isUnder12": 0,
            "inWeddingParty": 0,
            "weddingPartyPosition": 0,
            "rsvpStatus": "",
            "rsvpMeal": "",
        },
        {
            "invitationID": "1",
            "fullname": "Guest 3", 
            "email": "",
            "isUnderage": 1,
            "isUnder12": 1,
            "inWeddingParty": 1,
            "weddingPartyPosition": 4,
            "rsvpStatus": "",
            "rsvpMeal": "",
        },
        {
            "invitationID": "2",
            "fullname": "Guest 4", 
            "email": "guest4@test.com",
            "isUnderage": 0,
            "isUnder12": 0,
            "inWeddingParty": 1,
            "weddingPartyPosition": 1,
            "rsvpStatus": "",
            "rsvpMeal": "",
        },
        {
            "invitationID": "3",
            "fullname": "Guest 5", 
            "email": "guest5@test.com",
            "isUnderage": 0,
            "isUnder12": 0,
            "inWeddingParty": 1,
            "weddingPartyPosition": 2,
            "rsvpStatus": "",
            "rsvpMeal": "",
        },
    ]
}
rsbaher1 commented 3 years ago

incorrect format