{
  "connection": "default",
  "collectionName": "jobs_job",
  "info": {
    "name": "job",
    "description": "Experiment (background job) sent by a user."
  },
  "options": {
    "timestamps": [
      "createdAt",
      "updatedAt"
    ]
  },
  "attributes": {
    "input": {
      "type": "json",
      "required": true,
      "description": "Experiment input"
    },
    "status": {
      "default": "waiting",
      "enum": [
        "waiting",
        "running",
        "done"
      ],
      "type": "enumeration",
      "description": "To know if the job has finished"
    },
    "deleted": {
      "default": false,
      "required": true,
      "type": "boolean",
      "private": true,
      "description": "To mark the ones dropped by the user"
    },
    "ip": {
      "type": "string",
      "private": true,
      "description": "IP address from where the job was sent"
    },
    "startAt": {
      "type": "datetime",
      "description": "Timestamp when the job run started"
    },
    "endAt": {
      "type": "datetime",
      "description": "Timestamp when the job run ended"
    },
    "result": {
      "type": "json",
      "description": "Only present the job finished (status is 'done'), correctly or errored"
    },
    "feedback": {
      "type": "json",
      "description": "User opinion about the result, should be the same size"
    },
    "owner": {
      "model": "user",
      "via": "jobs",
      "plugin": "users-permissions"
    }
  }
}