topcoder-platform / challenge-api

This microservice provides access and interaction with all sorts of Challenge data
16 stars 49 forks source link

Data Model Update #80

Closed rootelement closed 4 years ago

rootelement commented 4 years ago

Updates to the Data Model:


{
    "id": "0624fc78-d985-483b-a1b2-d988ba998221",
    "legacyId": 30061774,
    "typeId": "6950164f-3c5e-4bdc-abc8-22aaf5a1bd49",
    "track": "DEVELOP", //move to legacy object
    "name": "Mjolnir Bug Bash - Round 2 - gauravseta",
    "description": "https://github.com/topcoderinc/mjolnir-app/issues?q=assignee%3AGauravseta+is%3Aclosed+label%3A%22Payment+Required%22<br />\n<br />\n84 pts = $420",
    "reviewType": "INTERNAL", //move to legacy object
    "projectId": 13078,
    "forumId": "39984", //move to legacy object
    "status": "Completed",
    "created": "2018-01-01T09:33:28.000Z",
    "createdBy": "23200120",
    "updated": "2018-01-19T14:08:30.000Z",
    "updateBy": "22841596",
    "timelineTemplateId": "N/A",
    "phases": [
        {
            "id": "9df48e25-6295-4080-9ecf-6a810e6c87bf",
            "duration": 864000000,
            "scheduledStartTime": "2018-01-02T09:00:00.000+0000",
            "isOpen": false
        },
        {
            "id": "b964c6f0-b8d2-46c8-a646-d4122d41a8b8",
            "duration": 863700000,
            "actualStartTime": "2018-01-01T09:35:31.356+0000",
            "scheduledStartTime": "2018-01-01T09:35:31.356+0000",
            "actualEndTime": "2018-01-01T09:35:31.356+0000",
            "isOpen": false
        }
    ],
    "terms": [
        {
            "id": "e3370508-a541-4b9c-b83f-3bad33dcca4c",
            "legacyId": 20704, // remove from this data object
            "title": "Standard Reviewer Terms v1.0", // remove
            "url": "", // remove
            "agreeabilityType": "Electronically-agreeable" // remove
        }
    ],
    "startDate": "2018-01-02T09:00:00.000Z",
    "prizeSets": [
        {
            "type": "Challenge Prize",
            "description": "Challenge Prize",
            "prizes": [
                {
                    "value": 420,
                    "type": "First Placement "
                }
            ]
        }
    ],
   "tags": [
        "Ionic",
        "Mobile"
    ],
    "groups": [],
    "winners": [
        {
            "handle": "gauravseta",
            "placement": 1
        }
    ],
    legacy: { //add this legacy object
      "forumId": 203984, // should be in forums api
      "track": "DEVELOP", //is this used for anything other than direct or OR?
     "reviewType": "INTERNAL", // this should be in the review/scorecard api
    }
    "challengeSettings": [ // rename to metadata
        {
            "type": "allowStockArt", // change from "type" to "name"
            "value": "false"
        },
        {
            "type": "submissionsViewable", // change from "type" to "name"
            "value": "false"
        }
    ],
    "type": "First2Finish"
}```

This will have implications on the api, migration, tests, swagger, postman... 
ThomasKranitsas commented 4 years ago

@rootelement few questions

  1. Will the terms be an array of UUIDs? I don't think it makes sense to have it as an array of objects if we just store the term ID and nothing else.
  2. The type is not saved in the challenge object. It's populated on the fly based on the typeId. Should we still remove that?
rootelement commented 4 years ago
  1. Yes, array of UUIDs is fine
  2. No, sorry, i didn't know that was generated. That's fine as it is then. I thought it was extraneous

On Mon, Apr 20, 2020 at 11:56 AM Thomas Kranitsas notifications@github.com wrote:

@rootelement https://github.com/rootelement few questions

  1. Will the terms be an array of UUIDs? I don't think it makes sense to have it as an array of objects if we just store the term ID and nothing else.
  2. The type is not saved in the challenge object. It's populated on the fly based on the typeId. Should we still remove that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/topcoder-platform/challenge-api/issues/80#issuecomment-616644736, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJGMXACVUS5KX4E2URIW63RNRWBJANCNFSM4MK63G4Q .

--

James Cori Lead Software Engineer jcori@topcoder.com / 413.961.9044 / @jamesmcori https://twitter.com/jamesmcori

cbonner@topcoder.comwww.topcoder.com http://topcoder.com/ / Topcoder Blog: topcoder.com/blog / twitter: @Topcoder https://twitter.com/topcoder201 S Capitol Ave, Indianapolis, IN 46225