{
    "modelSettings" : {
      "context" : "user",
      "strictModel" : false,
      "modelName" : "Workbook",
      "service" : "tifunde",
      "access_roles" : {"admin": ["READ","WRITE", "ALL"], "owner": ["READ","WRITE"]},
      "controlAccess" : false
    },
  
    "modelData" : {
      "systemManagedEntities" : {
  
        "settings" : {
        }
      },

      "childEntities" : {
        
        "Question" : {
            "createModel" : {
                "section" : "questionDetails",
                "relationship" : [
                    {
                        "key" : "formFieldsEntities->questionDetails->workbook",
                        "localreference" : "id"
                    },

                    {
                        "key" : "formFieldsEntities->questionDetails->subject",
                        "localreference" : "formFieldsEntities->workbookDetails->subject"
                    }
                ]
            }
        },

        "Answer" : {
            "createModel" : {
                "section" : "answerDetails",
                "relationship" : [
                    {
                        "key" : "formFieldsEntities->answerDetails->workbook",
                        "localreference" : "id"
                    }
                ]
            }
        }
      },
  
      "formFieldsEntities" : {
  
        "workbookDetails" : {

            "name": {
                "name": "name",
                "question": "Workbook Name",
                "questionShort": "Workbook Name",
                "answerType": "text",
                "type": "text",
                "tooltip": "Workbook Name.",
                "answerOptions": [],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
            }, 

            "year": {
                "name": "year",
                "question": "Workbook Year",
                "questionShort": "Workbook Year",
                "answerType": "text",
                "type": "number",
                "tooltip": "Workbook Year.",
                "answerOptions": [],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
            },

            "term": {
                "name": "term",
                "question": "Workbook term",
                "questionShort": "Workbook term",
                "answerType": "text",
                "type": "number",
                "tooltip": "Workbook term.",
                "answerOptions": [],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
            },

            "grade": {
                "name": "grade",
                "question": "Grade",
                "questionShort": "Grade Level",
                "answerType": "text",
                "type": "dropdown",
                "tooltip": "Grade Level.",
                "answerOptions": [
                    {
                      "id": "1",
                      "value": "1"
                    },
                    {
                        "id": "2",
                        "value": "2"
                    },
                    {
                        "id": "3",
                        "value": "3"
                    },
                    {
                        "id": "4",
                        "value": "4"
                    },
                    {
                        "id": "5",
                        "value": "5"
                    },
                    {
                        "id": "6",
                        "value": "6"
                    },
                    {
                        "id": "7",
                        "value": "7"
                    },
                    {
                        "id": "8",
                        "value": "8"
                    },
                    {
                        "id": "9",
                        "value": "9"
                    },
                    {
                        "id": "10",
                        "value": "10"
                    },
                    {
                        "id": "11",
                        "value": "11"
                    },
                    {
                        "id": "12",
                        "value": "12"
                    }
                  ],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
              },

            "version": {
                "name": "version",
                "question": "Workbook version",
                "questionShort": "Workbook version",
                "answerType": "text",
                "type": "text",
                "tooltip": "Workbook version.",
                "answerOptions": [],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
            }, 

            "subject": {
                "name": "subject",
                "question": "Workbook subject",
                "questionShort": "Workbook subject",
                "answerType": "text",
                "type": "dropdown",
                "tooltip": "Workbook subject.",
                "answerOptions": [
                    {
                      "id": "maths",
                      "value": "Maths"
                    },
                    {
                        "id": "english",
                        "value": "English"
                    }
                  ],
                "answerOptionsType": null,
                "validations": ["required"],
                "value" : "",
                "answerColumns": []
            }

        }
  
      }
    }
  
  }