{
  "key": "candidates",
  "type": "table",
  "name": "Candidates",
  "itemName": "Candidate",
  "summary": { "title": "{{firstName}} {{lastName}}", "subtitle": "{{email}}" },
  "fields": {
    "firstName": {
      "dbName": "text_firstName",
      "type": "text",
      "label": "First Name",
      "required": true,
      "description": "It is the first name of the candidate",
      "readOnly": false
    },
    "middleName": {
      "dbName": "text_middleName",
      "type": "text",
      "label": "Middle Name",
      "readOnly": false
    },
    "lastName": {
      "dbName": "text_lastName",
      "type": "text",
      "label": "Last Name",
      "required": true,
      "readOnly": false
    },
    "email": {
      "dbName": "text_email",
      "type": "text",
      "label": "Short Description",
      "required": true,
      "readOnly": false
    },
    "salary": {
      "dbName": "money_salary",
      "type": "money",
      "label": "Salary",
      "required": false,
      "readOnly": false
    },
    "identificationDocumentType": {
      "dbName": "text_identificationDocumentType",
      "type": "select",
      "label": "Document Type",
      "required": false,
      "readOnly": false,
      "options": {
        "passport": "Passport",
        "driversLicense": "Driver's License",
        "other": "Other"
      }
    },
    "identificationNumber": {
      "dbName": "text_identificationNumber",
      "type": "text",
      "label": "Document Number",
      "required": false,
      "readOnly": false
    },
    "signature": {
      "dbName": "jsonb_signature",
      "type": "signature",
      "label": "Signature",
      "required": false,
      "readOnly": false
    },
    "upload": {
      "dbName": "jsonb_upload",
      "type": "file",
      "label": "Upload",
      "required": false,
      "readOnly": false
    },
    "city": {
      "dbName": "rel_8e9fba3442",
      "type": "relationship",
      "label": "Cities foreign",
      "required": false,
      "readOnly": false,
      "table": "cities",
      "tableFullName": "recruitment.cities"
    },
    "scores": {
      "dbName": "tbl_a3555cc9c3",
      "type": "table",
      "label": "Scores",
      "table": "scoresData",
      "tableFullName": "recruitment.scoresData"
    },
    "address": {
      "dbName": "jsonb_address",
      "label": "Work Address",
      "type": "address"
    },
    "cellphone": {
      "dbName": "jsonb_cellphone",
      "label": "Cell phone number",
      "type": "phone"
    },
    "coordinates": {
      "dbName": "point_coordinates",
      "label": "Coordinates",
      "type": "location"
    },
    "user": {
      "dbName": "user_user",
      "label": "User",
      "type": "user"
    },
    "group": {
      "dbName": "group_group",
      "label": "Group",
      "type": "group"
    }
  },
  "form": {
    "rows": [
      { "_title": "Personal Information" },
      ["firstName", "middleName", "lastName"],
      "email",
      ["identificationDocumentType", "identificationNumber"],
      { "_title": "Other Information" },
      "salary"
    ]
  },
  "stages": {
    "new": { "name": "New", "description": "It is a new candidate, hasn't gone through any tests" },
    "inProcess": { "name": "In Process", "description": "It has entered the process, but no outcome yet defined" },
    "approved": { "name": "Approved", "description": "Candidate has been approved", "done": true, "successful": true },
    "rejected": { "name": "Rejected", "description": "Candidate has been rejected definitively", "done": true, "successful": false },
    "shortTermPool": { "name": "Short Term Pool", "description": "Candidate is not a fit now, but probably in the near future", "parked": true },
    "longTermPool": { "name": "Long Term Pool", "description": "Candidate is not a fit now, and doesn't seem to be a fit in the near future", "parked": true }
  },
  "initialStage": "new",
  "permissions": {
    "recruiter": { "create": true, "delete": { "own": true, "any": false }, "view": true, "edit": ["*", "!jsonb_address"] },
    "employee": {
      "create": false,
      "delete": { "own": true },
      "view": { "own": ["*", "!money_salary"]},
      "edit": { "own": ["text_firstName", "text_lastName", "text_email"] }
    },
    "admin": {
      "create": true,
      "delete": true,
      "edit": true,
      "view": true
    }
  },
  "testData": {
    "2": { "firstName": "Pedro", "lastName": "Perez", "email": "pedroperez@gmail.com" },
    "first": { "firstName": "Juan", "lastName": "Perez", "email": "juanperez@gmail.com", "identificationDocumentType": "cedula", "identificationNumber": 1712345678 }
  },
  "data": { "1": { "firstName": "Juan", "lastName": "Perez", "email": "juanperez@gmail.com", "identificationDocumentType": "cedula", "identificationNumber": 1712345678 } }
}
