{

"6.0.0":
{
    "structure":
    {
        "helpdesk":
        {
            "create":
            {
                "id":          "default",
                "owner_id":    {"type": "int", "notNull": "true"},
                "title":       {"type": "varchar", "notNull": "true"},
                "assigned":    {"type": "int"},
                "date":        {"type": "date"},
                "project_id":  {"type": "int", "notNull": "true"},
                "priority":    {"type": "int", "length": "2"},
                "attachments": {"type": "text"},
                "description": {"type": "text"},
                "status":      {"type": "int", "length": "2"},
                "due_date":    {"type": "date"},
                "author":      {"type": "int"},
                "solved_by":   {"type": "int"},
                "solved_date": {"type": "date"},
                "contact_id":  {"type": "int"}
            }
        }
    },

    "initialData":
    {
        "database_manager":
        {
            "insert":
            [
                {
                    "table_name":      "Helpdesk",
                    "table_field":     "title",
                    "form_tab":        "1",
                    "form_label":      "Title",
                    "form_type":       "text",
                    "form_position":   "1",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "1",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "1",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "assigned",
                    "form_tab":        "1",
                    "form_label":      "Assigned",
                    "form_type":       "selectValues",
                    "form_position":   "3",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "User#id#lastname",
                    "default_value":   "NULL",
                    "list_position":   "4",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "date",
                    "form_tab":        "1",
                    "form_label":      "Date",
                    "form_type":       "display",
                    "form_position":   "4",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "2",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "1",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "project_id",
                    "form_tab":        "1",
                    "form_label":      "Project",
                    "form_type":       "selectValues",
                    "form_position":   "6",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "Project#id#title",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "1",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "priority",
                    "form_tab":        "1",
                    "form_label":      "Priority",
                    "form_type":       "rating",
                    "form_position":   "7",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "10",
                    "default_value":   "5",
                    "list_position":   "5",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "attachments",
                    "form_tab":        "1",
                    "form_label":      "Attachments",
                    "form_type":       "upload",
                    "form_position":   "8",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "description",
                    "form_tab":        "1",
                    "form_label":      "Description",
                    "form_type":       "textarea",
                    "form_position":   "11",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "status",
                    "form_tab":        "1",
                    "form_label":      "Status",
                    "form_type":       "selectValues",
                    "form_position":   "12",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "1#Open|2#Assigned|3#Solved|4#Verified|5#Closed",
                    "default_value":   "1",
                    "list_position":   "6",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "1",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "due_date",
                    "form_tab":        "1",
                    "form_label":      "Due date",
                    "form_type":       "date",
                    "form_position":   "5",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "author",
                    "form_tab":        "1",
                    "form_label":      "Author",
                    "form_type":       "display",
                    "form_position":   "2",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "User#id#lastname",
                    "default_value":   "NULL",
                    "list_position":   "3",
                    "list_align":      "center",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "1",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "solved_by",
                    "form_tab":        "1",
                    "form_label":      "Solved by",
                    "form_type":       "display",
                    "form_position":   "9",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "User#id#lastname",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "solved_date",
                    "form_tab":        "1",
                    "form_label":      "Solved date",
                    "form_type":       "display",
                    "form_position":   "10",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "NULL",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "0",
                    "is_required":     "0",
                    "is_unique":       "0"
                },

                {
                    "table_name":      "Helpdesk",
                    "table_field":     "contact_id",
                    "form_tab":        "1",
                    "form_label":      "Contact",
                    "form_type":       "selectValues",
                    "form_position":   "13",
                    "form_columns":    "1",
                    "form_regexp":     "NULL",
                    "form_range":      "Contact#id#name",
                    "default_value":   "NULL",
                    "list_position":   "0",
                    "list_align":      "NULL",
                    "list_use_filter": "1",
                    "alt_position":    "0",
                    "status":          "1",
                    "is_integer":      "1",
                    "is_required":     "0",
                    "is_unique":       "0"
                }
            ]
        },

        "module":
        {
            "insert":
            [
                {
                    "name":      "Helpdesk",
                    "label":     "Helpdesk",
                    "save_type": "0",
                    "active":    "1",
                    "_relations":
                    {
                        "project_module_permissions":
                        {
                            "insert":
                            [
                                {
                                    "module_id":  "##id##",
                                    "project_id": "1"
                                }
                            ]
                        },

                        "role_module_permissions":
                        {
                            "insert":
                            [
                                {
                                    "module_id": "##id##",
                                    "role_id":   "1",
                                    "access":    "139"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    },

    "extraData":
    {
        "role_module_permissions":
        {
            "insert":
            [
                {
                    "module_id": "##Helpdesk_moduleId##",
                    "role_id":   "2,3",
                    "access":    "0"
                },

                {
                    "module_id": "##Helpdesk_moduleId##",
                    "role_id":   "4",
                    "access":    "1"
                }
            ]
        },

        "project_module_permissions":
        {
            "insert":
            [
                {
                    "module_id":  "##Helpdesk_moduleId##",
                    "project_id": "2"
                }
            ]
        }
    }
}

}
