Skip to content

Instantly share code, notes, and snippets.

@fstoerkle
Created January 23, 2019 10:24
Show Gist options
  • Save fstoerkle/1db8465f308c04a13cd44dec2a945424 to your computer and use it in GitHub Desktop.
Save fstoerkle/1db8465f308c04a13cd44dec2a945424 to your computer and use it in GitHub Desktop.
Dashboard API example
{
"user": {
"name": "pariatur velit con",
"id": "urn:uuid:24bf4cc1-035d-7961-bff0-80047a4c1e91",
"avatar": "http://example.com"
},
"activities": [{
"type": "1-1",
"id": "02d52036-e9ee-e7e8-9a23-5c64ce7b5bf8",
"title": "labore",
"status": "booked",
"draft": false,
"final": false,
"initiated": true,
"options": 3
}, {
"type": "poll",
"id": "1b52a95d-4370-8407-2e26-d060f0760f5a",
"title": "sed nulla",
"draft": false,
"final": true,
"initiated": true,
"options": 10,
"participants": 7,
"invitees": 8
}, {
"type": "poll",
"id": "190f9534-9e31-cb26-925e-0c2fef388a4b",
"title": "ut minim cillum",
"draft": true,
"final": false,
"initiated": false,
"options": 4,
"participants": 0,
"invitees": 0
}]
}
@fstoerkle
Copy link
Author

regarding status of an activity – we see two options at the moment.

  1. Have one status field as enum (e.g. draft, initiated, final, ...)
  2. Have several boolean flag indicating the status (see example), e.g. draft: false, final: true, ...

Going with several boolean flags would make it easier to model activities that have several status...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment