HackGT / checkin2

Simple and robust check in system for hackathons and other events. Integrates with HackGT/registration
https://checkin.hack.gt
MIT License
7 stars 1 forks source link

Add details field with records of check-in and check-out events #51

Closed kexin-zhang closed 6 years ago

kexin-zhang commented 6 years ago

The current tag schema includes fields for checked_in, checked_in_by and checked_in_date. If an attendee is checked in or out multiple times, these fields get overwritten every time.

This PR adds a details field to the tag schema to store all previous checked_in / checked_out events. Before (even if an attendee was checked in/out multiple times):

    "tags" : {
        "hackgt" : {
            "checked_in" : true,
            "checked_in_date" : ISODate("2018-10-09T22:20:51.106Z"),
            "checked_in_by" : "kexin"
        }
    },

With these changes:

    "tags" : {
        "hackgt" : {
            "checked_in" : true,
            "checked_in_date" : ISODate("2018-10-09T22:20:51.106Z"),
            "checked_in_by" : "kexin",
            "details" : [
                {
                    "checked_in" : true,
                    "checked_in_date" : ISODate("2018-10-09T22:20:16.968Z"),
                    "checked_in_by" : "admin"
                },
                {
                    "checked_in" : false,
                    "checked_in_date" : ISODate("2018-10-09T22:20:18.874Z"),
                    "checked_in_by" : "admin"
                },
                {
                    "checked_in" : true,
                    "checked_in_date" : ISODate("2018-10-09T22:20:51.106Z"),
                    "checked_in_by" : "kexin"
                }
            ]
        }
    },