# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20260108120839) do

  create_table "access_control_list_layer_nines", force: true do |t|
    t.string   "policy"
    t.string   "protocol"
    t.string   "src_ip"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "acl_group_id"
    t.string   "policy_ly7"
    t.string   "src_domainly7"
    t.string   "src_bitmaskly7"
    t.string   "application"
    t.string   "host_iprange"
    t.string   "port"
    t.string   "application_value"
    t.string   "src_uplink_type"
    t.string   "src_uplink_typely7"
    t.string   "src_iply7"
  end

  create_table "access_control_lists", force: true do |t|
    t.string   "policy"
    t.string   "protocol"
    t.string   "src_ip"
    t.string   "scr_bitmask"
    t.string   "src_port"
    t.integer  "acl_group_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "dst_ip"
    t.string   "dst_bitmask"
    t.string   "dst_port"
    t.string   "src_uplink_type"
    t.string   "dst_uplink_type"
    t.string   "policy_ly7"
    t.string   "application"
    t.string   "host_iprange"
    t.string   "port"
    t.string   "form_type"
    t.string   "application_value"
    t.string   "src_domainly7"
    t.string   "src_bitmaskly7"
    t.string   "form_type2"
    t.boolean  "is_enabled"
    t.boolean  "log"
    t.integer  "priority"
    t.string   "src_mac"
  end

  create_table "acl_groups", force: true do |t|
    t.string   "group_name"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "tagging_lists"
    t.string   "logging"
    t.integer  "clone_id"
  end

  create_table "acl_inventories", force: true do |t|
    t.integer  "acl_group_id"
    t.integer  "router_inventory_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "activities", force: true do |t|
    t.integer  "trackable_id"
    t.string   "trackable_type"
    t.integer  "owner_id"
    t.string   "owner_type"
    t.string   "key"
    t.text     "parameters"
    t.integer  "recipient_id"
    t.string   "recipient_type"
    t.integer  "organisation_id"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "assumed_by"
    t.integer  "router_inventory_id"
  end

  add_index "activities", ["organisation_id", "created_at"], name: "index_activities_on_organisation_id_and_created_at", using: :btree
  add_index "activities", ["owner_id", "owner_type"], name: "index_activities_on_owner_id_and_owner_type", using: :btree
  add_index "activities", ["trackable_id", "trackable_type"], name: "index_activities_on_trackable_id_and_trackable_type", using: :btree

  create_table "air_quality_configs", force: true do |t|
    t.integer  "organisation_id"
    t.boolean  "is_enabled"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "alert_rules", force: true do |t|
    t.string   "alert_on"
    t.string   "condition"
    t.string   "value"
    t.integer  "alert_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "mac_range"
    t.integer  "clone_id"
  end

  add_index "alert_rules", ["alert_id", "alert_on"], name: "index_alert_rules_on_alert_id_and_alert_on", using: :btree

  create_table "alerts", force: true do |t|
    t.string   "name"
    t.text     "message"
    t.string   "category"
    t.string   "severity_color"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "location_network_id"
    t.text     "actions"
    t.string   "subject"
    t.text     "up_message"
    t.string   "up_subject"
    t.integer  "clone_id"
    t.integer  "organisation_id"
  end

  add_index "alerts", ["location_network_id"], name: "index_alerts_on_location_network_id", using: :btree
  add_index "alerts", ["organisation_id"], name: "index_alerts_on_organisation_id", using: :btree

  create_table "alerts_notification_groups", force: true do |t|
    t.integer "alert_id"
    t.integer "notification_group_id"
  end

  add_index "alerts_notification_groups", ["alert_id"], name: "index_alerts_notification_groups_on_alert_id", using: :btree
  add_index "alerts_notification_groups", ["notification_group_id"], name: "index_alerts_notification_groups_on_notification_group_id", using: :btree

  create_table "ap_groups", force: true do |t|
    t.string  "name"
    t.text    "vendor_details"
    t.string  "vendor_id"
    t.integer "location_network_id"
    t.integer "wlan_group_id"
  end

  create_table "ap_metadata", force: true do |t|
    t.string   "project_name"
    t.string   "location_name"
    t.text     "notes"
    t.integer  "router_inventory_id"
    t.string   "latitude"
    t.string   "longitude"
    t.text     "scanned_data"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "approved_firmwares", force: true do |t|
    t.integer  "upgrade_data_id"
    t.string   "version"
    t.string   "approved_hardware_models"
    t.integer  "organisation_id"
    t.integer  "hardware_category_id"
    t.datetime "schedule_time_slot"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "assume_user_details", force: true do |t|
    t.string   "token"
    t.integer  "assume_user_id"
    t.integer  "token_validity"
    t.boolean  "status",         default: true
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "assume_user_details", ["user_id"], name: "index_assume_user_details_on_user_id", using: :btree

  create_table "client_communications", force: true do |t|
    t.string   "source_interface"
    t.string   "destination_interface"
    t.string   "policy"
    t.integer  "firewall_config_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "priority"
    t.integer  "unidir",                default: 0
  end

  create_table "client_host_names", force: true do |t|
    t.string   "host_name"
    t.string   "mac_id"
    t.integer  "organisation_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "client_host_names", ["user_id"], name: "index_client_host_names_on_user_id", using: :btree

  create_table "commands", force: true do |t|
    t.text     "aps"
    t.string   "commands"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "status"
    t.text     "result"
    t.integer  "upgrade_id"
  end

  create_table "commands_router_inventories", id: false, force: true do |t|
    t.integer "command_id"
    t.integer "router_inventory_id"
  end

  add_index "commands_router_inventories", ["command_id"], name: "index_commands_router_inventories_on_command_id", using: :btree
  add_index "commands_router_inventories", ["router_inventory_id"], name: "commands_router_inventories_ri_id", using: :btree

  create_table "config_mappings", force: true do |t|
    t.integer  "configurable_id"
    t.string   "configurable_type"
    t.integer  "resourceable_id"
    t.string   "resourceable_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "config_mappings", ["configurable_id", "configurable_type"], name: "index_config_mappings_on_configurable_id_and_configurable_type", using: :btree
  add_index "config_mappings", ["resourceable_id", "resourceable_type"], name: "index_config_mappings_on_resourceable_id_and_resourceable_type", using: :btree

  create_table "config_push_logs", force: true do |t|
    t.text     "config_params",       limit: 2147483647
    t.integer  "router_inventory_id"
    t.string   "status"
    t.text     "push_response",       limit: 2147483647
    t.boolean  "is_pushed",                              default: false
    t.integer  "location_network_id"
    t.datetime "pushed_at"
    t.datetime "res_received_at"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "customer_credit_cards", force: true do |t|
    t.integer  "card_number"
    t.integer  "exp_date"
    t.integer  "exp_month"
    t.integer  "cvv"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "del_data_fm_monitorings", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "device_configs", force: true do |t|
    t.string   "mac"
    t.string   "consume_id"
    t.integer  "router_inventory_id"
    t.text     "configuration"
    t.string   "status",              default: "inprogress"
    t.datetime "status_update_at"
    t.text     "response"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "firewall_configs", force: true do |t|
    t.string   "name"
    t.string   "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
  end

  add_index "firewall_configs", ["organisation_id"], name: "index_firewall_configs_on_organisation_id", using: :btree

  create_table "firewall_rules", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "gateway_configs", force: true do |t|
    t.integer  "organisation_id"
    t.string   "gateway_type"
    t.string   "gateway"
    t.string   "config_hash"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "is_enabled"
  end

  create_table "hardware_categories", force: true do |t|
    t.string   "name"
    t.string   "label"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "hardware_parts", force: true do |t|
    t.string   "name"
    t.string   "part_number"
    t.string   "internal_name"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "wifi_uplink",                             default: false
    t.boolean  "usb",                                     default: false
    t.integer  "wired_count",                             default: 1
    t.integer  "port_count"
    t.string   "vendor_type"
    t.string   "hardware_category"
    t.integer  "hardware_category_id"
    t.text     "port_position",        limit: 2147483647
  end

  create_table "hotspot20s", force: true do |t|
    t.boolean  "hotspot_2_0",                  default: false
    t.string   "operator_name"
    t.string   "venue_name"
    t.string   "venue_operator_language_code"
    t.text     "venue_type"
    t.string   "network_type"
    t.boolean  "internet",                     default: false
    t.text     "domain_list"
    t.text     "roaming_consortium_oi"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "network_ssid_id"
  end

  create_table "init_templates", force: true do |t|
    t.integer  "organisation_id"
    t.integer  "user_id"
    t.string   "name"
    t.string   "template_type"
    t.text     "details"
    t.string   "ap_mac_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "is_default",      default: false
  end

  create_table "integration_types", force: true do |t|
    t.string   "api_key"
    t.string   "vendor_name"
    t.text     "details",         limit: 2147483647
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "org_id"
    t.integer  "organisation_id"
    t.string   "level"
    t.string   "name"
  end

  create_table "known_client_mac_ouis", force: true do |t|
    t.string   "mac_prefix"
    t.string   "manufacture"
    t.string   "hostname"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "known_client_mac_ouis", ["mac_prefix", "organisation_id"], name: "index_known_client_mac_ouis_on_mac_prefix_and_org_id", using: :btree

  create_table "location_networks", force: true do |t|
    t.string   "network_name"
    t.string   "network_type",                                  default: "piap"
    t.string   "network_configuration"
    t.integer  "cloned_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
    t.string   "timezone"
    t.boolean  "aggregation_flag"
    t.integer  "hb_freq",                                       default: 5
    t.string   "vendor_type"
    t.string   "vendor_network_id"
    t.text     "vendor_details"
    t.boolean  "presence",                                      default: false
    t.text     "presence_url",               limit: 2147483647
    t.integer  "integration_type_id"
    t.boolean  "network_template",                              default: false
    t.string   "heartbeat_url"
    t.boolean  "template_adherence",                            default: true
    t.boolean  "enable_policy"
    t.integer  "router_inventories_count",                      default: 0,      null: false
    t.text     "external_guid"
    t.datetime "deleted_at"
    t.integer  "original_cloned_network_id"
  end

  add_index "location_networks", ["deleted_at"], name: "index_location_networks_on_deleted_at", using: :btree
  add_index "location_networks", ["organisation_id"], name: "index_location_networks_on_organisation_id", using: :btree

  create_table "loggings", force: true do |t|
    t.string   "name"
    t.string   "logging_type"
    t.string   "is_enabled"
    t.string   "upload_type"
    t.integer  "location_network_id"
    t.string   "extra_data"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "clone_id"
    t.integer  "organisation_id"
  end

  add_index "loggings", ["location_network_id"], name: "index_loggings_on_location_network_id", using: :btree
  add_index "loggings", ["organisation_id"], name: "index_loggings_on_organisation_id", using: :btree

  create_table "mac_vlan_groups", force: true do |t|
    t.string   "oui_group_name"
    t.integer  "organisation_id"
    t.integer  "location_network_id"
    t.integer  "hardware_part_id"
    t.string   "switch_model"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "tagging_lists"
  end

  create_table "master_router_inventories", force: true do |t|
    t.string   "mac_id"
    t.integer  "hardware_part_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "wan_mac_address"
    t.string   "serial"
    t.integer  "organisation_id"
    t.integer  "integration_type_id"
  end

  add_index "master_router_inventories", ["hardware_part_id"], name: "index_master_router_inventories_on_hardware_part_id", using: :btree
  add_index "master_router_inventories", ["mac_id"], name: "index_master_router_inventories_on_mac_id", using: :btree
  add_index "master_router_inventories", ["serial"], name: "index_master_router_inventories_on_serial", using: :btree

  create_table "media", force: true do |t|
    t.integer  "attachable_id"
    t.string   "attachable_type"
    t.string   "media_file_name"
    t.string   "media_content_type"
    t.integer  "media_file_size"
    t.datetime "media_updated_at"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "merchant_ap_details", force: true do |t|
    t.string   "merchant_id"
    t.string   "merchant_type"
    t.string   "mac_id"
    t.string   "location_network_id"
    t.string   "extra_data"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "mesh_configs", force: true do |t|
    t.string   "name"
    t.boolean  "enable"
    t.string   "band"
    t.string   "security"
    t.integer  "location_network_id"
    t.integer  "radio_profile_id"
    t.string   "ssid"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "monitoring_data", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "nai_realms", force: true do |t|
    t.string   "realm_name"
    t.string   "realm_format"
    t.string   "authentication"
    t.text     "gpp_plmn_id"
    t.integer  "hotspot20_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "network_ssids", force: true do |t|
    t.string   "ssid_name"
    t.string   "ssid_mode"
    t.string   "nat"
    t.boolean  "is_enabled"
    t.boolean  "is_hidden"
    t.boolean  "is_isolate"
    t.string   "security_mode"
    t.string   "wpa_algorithm"
    t.string   "key_renewal_interval"
    t.string   "wpa_key"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "acl_mac"
    t.string   "mac_filter_policy"
    t.text     "acl_mac_list"
    t.integer  "vlan_id"
    t.string   "captive_portal"
    t.text     "splash_url"
    t.string   "wallgarden"
    t.text     "walled_garden_range"
    t.string   "overwrite_success_url"
    t.text     "success_url"
    t.string   "dhcp_range_start"
    t.string   "dhcp_range_end"
    t.string   "dhcp_relay_server"
    t.string   "dhcp_lease_time"
    t.string   "auth_radius_id"
    t.string   "acc_radius_id"
    t.string   "acc_radius_enabled"
    t.string   "ip_address"
    t.string   "subnet_mask"
    t.string   "ssid_qos"
    t.boolean  "enable_ssid_qos"
    t.string   "per_user_qos"
    t.string   "radio_band",                                      default: "2.4"
    t.integer  "max_association",                                 default: 0
    t.boolean  "wds_enabled",                                     default: false
    t.string   "dns_mode",                                        default: "1"
    t.string   "dns_primary"
    t.string   "dns_secondary"
    t.string   "wna",                                             default: "1"
    t.text     "dhcp_mappings",                limit: 2147483647
    t.string   "default_interim_time",                            default: "300"
    t.string   "default_idle_timeout",                            default: "1800"
    t.string   "uplink_priority",                                 default: "1"
    t.string   "dhcp_ranges"
    t.string   "psk_type"
    t.string   "captive_portal_hardware_type"
    t.string   "user_name"
    t.string   "password"
    t.string   "ip_type"
    t.string   "gateway"
    t.integer  "mac_auth",                                        default: 0
    t.text     "vendor_details"
    t.text     "dhcp_options",                 limit: 2147483647
    t.boolean  "power_save",                                      default: false
    t.string   "roaming_mode",                                    default: "0"
    t.string   "hotspot_mode",                                    default: "0"
    t.boolean  "band_steering",                                   default: false
    t.string   "radio_bands",                                     default: "---\n- '2.4'\n"
    t.boolean  "ssid_802_11_k",                                   default: false
    t.string   "ssid_802_11_w"
    t.string   "multi_psk",                                       default: "local"
    t.text     "multi_psk_options",            limit: 2147483647
    t.boolean  "uam_secret",                                      default: false
    t.string   "uam_secret_key"
    t.boolean  "radius_gw_proxy",                                 default: false
    t.integer  "clone_id"
    t.integer  "organisation_id"
  end

  add_index "network_ssids", ["location_network_id", "vlan_id"], name: "index_network_ssids_on_location_network_id_and_vlan_id", using: :btree
  add_index "network_ssids", ["location_network_id"], name: "index_network_ssids_on_location_network_id", using: :btree
  add_index "network_ssids", ["organisation_id"], name: "index_network_ssids_on_organisation_id", using: :btree

  create_table "network_ssids_wlan_groups", id: false, force: true do |t|
    t.integer "network_ssid_id"
    t.integer "wlan_group_id"
  end

  create_table "notification_groups", force: true do |t|
    t.string   "name"
    t.string   "notification_type"
    t.string   "mobile"
    t.string   "email"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "clone_id"
  end

  create_table "ntp_servers", force: true do |t|
    t.boolean  "is_enabled"
    t.text     "urls"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
  end

  add_index "ntp_servers", ["organisation_id"], name: "index_ntp_servers_on_organisation_id", using: :btree

  create_table "organisations", force: true do |t|
    t.string   "organisation_name"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "no_of_aps",                                         default: 200
    t.text     "sms_config"
    t.string   "organisation_logo_file_name"
    t.string   "organisation_logo_content_type"
    t.integer  "organisation_logo_file_size"
    t.datetime "organisation_logo_updated_at"
    t.string   "organisation_domain"
    t.string   "organisation_support_email"
    t.boolean  "branding",                                          default: false
    t.string   "header_bg_color"
    t.string   "sidebar_bg_color"
    t.string   "footer_bg_color"
    t.string   "live_domain"
    t.string   "footer_font_bg_color"
    t.string   "ap"
    t.text     "organisation_settings",          limit: 2147483647
    t.string   "heartbeat_url"
  end

  create_table "payment_invoices", force: true do |t|
    t.string   "payment_status",      default: "payment processing"
    t.datetime "invoiced_on"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.string   "invoice_number"
    t.string   "stripeToken"
    t.integer  "purchase_order_id"
    t.string   "amount"
    t.string   "transcation_id"
    t.string   "failure_message"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "ordered_by"
    t.string   "customer_id"
    t.string   "customer_email"
  end

  create_table "pf_inventories", force: true do |t|
    t.integer  "portforwarding_group_id"
    t.integer  "router_inventory_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "port_forwardings", force: true do |t|
    t.string   "rule_name"
    t.string   "protocol"
    t.string   "external_port"
    t.string   "ip_address"
    t.string   "internal_port"
    t.integer  "portforwarding_group_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "portforwarding_groups", force: true do |t|
    t.string   "group_name"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "tagging_lists"
  end

  create_table "purchase_order_items", force: true do |t|
    t.integer  "purchase_order_id"
    t.integer  "itemable_id"
    t.string   "itemable_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "purchase_orders", force: true do |t|
    t.string   "payment_status",      default: "incomplete"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.integer  "sim_rate_plan_id"
    t.string   "mac_id"
    t.string   "amount"
    t.string   "imei"
    t.string   "plan_description"
    t.boolean  "auto_recharge"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "ordered_by"
  end

  create_table "radio_managements", force: true do |t|
    t.boolean  "client_steering"
    t.boolean  "assoc_steering"
    t.boolean  "auto_channel_balancing"
    t.integer  "required_probe_snr"
    t.integer  "required_roam_snr"
    t.integer  "load_kick_threshold"
    t.integer  "radio_profile_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "radio_profiles", force: true do |t|
    t.string   "name"
    t.string   "country_code"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "location_network_id"
    t.string   "vendor_network_id"
    t.text     "vendor_details"
    t.integer  "clone_id"
  end

  add_index "radio_profiles", ["location_network_id"], name: "index_radio_profiles_on_location_network_id", using: :btree
  add_index "radio_profiles", ["organisation_id"], name: "index_radio_profiles_on_organisation_id", using: :btree

  create_table "radio_settings", force: true do |t|
    t.string   "band"
    t.integer  "channel"
    t.integer  "power"
    t.integer  "radio_profile_id"
    t.boolean  "is_disable",                              default: false
    t.boolean  "country_ie",                              default: true
    t.string   "require_mode"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "bandwidth"
    t.string   "channel_utlilization"
    t.text     "vendor_details"
    t.integer  "maximum_clients"
    t.string   "multiple_bssid"
    t.string   "beacon_rate"
    t.integer  "beacon_interval"
    t.integer  "dtim_period"
    t.string   "multicast"
    t.string   "ema"
    t.integer  "bss_color"
    t.text     "valid_auto_channel",   limit: 2147483647
    t.boolean  "dfs_channel",                             default: false
  end

  create_table "radius", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "radius_accountings", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "radius_configurations", force: true do |t|
    t.string   "radius_name"
    t.string   "radius_ip"
    t.string   "radius_port"
    t.string   "radius_secret"
    t.string   "type"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "vendor_details"
    t.integer  "clone_id"
  end

  create_table "reports", force: true do |t|
    t.string   "title"
    t.datetime "from_time"
    t.datetime "to_time"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "location_network_id"
    t.integer  "flag"
    t.string   "path"
    t.integer  "scheduled_report_id"
    t.boolean  "is_super_admin",      default: false
    t.integer  "user_id"
    t.string   "download_type"
    t.integer  "organisation_id"
  end

  add_index "reports", ["location_network_id"], name: "index_reports_on_location_network_id", using: :btree
  add_index "reports", ["organisation_id"], name: "index_reports_on_organisation_id", using: :btree

  create_table "roamings", force: true do |t|
    t.string   "message_exchange"
    t.string   "domain_identifier"
    t.string   "pmk_r1_type"
    t.string   "pmk_r0_type"
    t.string   "pmk_r1_key_holder"
    t.boolean  "generate_psk",      default: false
    t.string   "pmk_r0_key_holder"
    t.integer  "network_ssid_id"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "rogue_aps", force: true do |t|
    t.integer  "location_network_id"
    t.boolean  "is_enabled"
    t.integer  "scan_interval"
    t.string   "throughput_signal"
    t.integer  "rouge_timeout"
    t.text     "known_ssids"
    t.text     "known_bssids",        limit: 2147483647
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "roles", force: true do |t|
    t.string   "name"
    t.integer  "resource_id"
    t.string   "resource_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree
  add_index "roles", ["name"], name: "index_roles_on_name", using: :btree

  create_table "router_inventories", force: true do |t|
    t.string   "mac_id"
    t.string   "router_serial_number"
    t.integer  "location_network_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
    t.string   "name"
    t.text     "notes"
    t.text     "address"
    t.string   "gre"
    t.string   "dhcp_relay"
    t.string   "ip_type"
    t.string   "ip"
    t.string   "subnet_mask"
    t.string   "gateway"
    t.string   "primary_dns"
    t.string   "secondary_dns"
    t.string   "channel"
    t.string   "enable_gre_on_lan"
    t.string   "enable_dhcp_on_lan"
    t.integer  "snmp_config_id"
    t.string   "power"
    t.string   "dhcp_start_range"
    t.string   "dhcp_end_range"
    t.string   "city"
    t.string   "country"
    t.string   "zipcode"
    t.string   "latitude"
    t.string   "longitude"
    t.string   "region_name"
    t.boolean  "presence",             default: false
    t.string   "wl_association"
    t.string   "wl_wpa_key"
    t.string   "wl_band"
    t.string   "wl_ssid_name"
    t.boolean  "wds_enabled",          default: false
    t.integer  "hardware_part_id"
    t.string   "uplink_type",          default: "1"
    t.integer  "wl_ssid_uniqe_id"
    t.string   "loc_mac_id"
    t.string   "state"
    t.string   "address2"
    t.string   "mo_service"
    t.string   "mo_apn"
    t.string   "mo_device"
    t.string   "mo_username"
    t.string   "mo_password"
    t.boolean  "enable_lb",            default: false
    t.string   "sim_iccid"
    t.string   "sim_imei"
    t.text     "presence_url"
    t.string   "kernal_version"
    t.boolean  "is_auto_provisioned",  default: false
    t.boolean  "enable_pci",           default: false
    t.string   "inv_type",             default: "piap"
    t.integer  "retry_count",          default: 5
    t.integer  "retry_interval",       default: 10
    t.string   "retry_ip1"
    t.string   "retry_ip2"
    t.string   "vendor_type"
    t.string   "serial"
    t.text     "vendor_details"
    t.string   "model"
    t.string   "ttl",                  default: "0"
    t.string   "operator"
    t.string   "operator_band"
    t.integer  "tenant_org_id"
    t.integer  "ap_group_id"
    t.boolean  "geo_update",           default: false
    t.text     "isp_details"
    t.text     "external_guid"
    t.string   "current_firmware"
    t.string   "previous_firmware"
    t.string   "build_number"
    t.boolean  "firmware_locked"
    t.string   "device_status"
  end

  add_index "router_inventories", ["location_network_id"], name: "index_router_inventories_on_location_network_id", using: :btree
  add_index "router_inventories", ["mac_id"], name: "index_router_inventories_on_mac_id", using: :btree
  add_index "router_inventories", ["organisation_id"], name: "index_router_inventories_on_organisation_id", using: :btree

  create_table "saml_settings", force: true do |t|
    t.string   "idp_entity_id"
    t.text     "idp_cert",           limit: 2147483647
    t.text     "idp_sso_target_url"
    t.integer  "organisation_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "idp_provider"
  end

  create_table "saml_user_roles", force: true do |t|
    t.string   "role_name"
    t.integer  "role_id"
    t.integer  "organisation_id"
    t.string   "network_tags"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "scheduled_reports", force: true do |t|
    t.string   "title"
    t.datetime "from_time"
    t.datetime "to_time"
    t.integer  "location_network_id"
    t.string   "scheduled_on"
    t.datetime "last_generated"
    t.string   "flag"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "scheduled_reports_notification_groups", force: true do |t|
    t.integer "scheduled_report_id"
    t.integer "notification_group_id"
  end

  create_table "sessions", force: true do |t|
    t.string   "email"
    t.datetime "logged_in_time"
    t.datetime "last_active_at"
    t.integer  "assume_user_detail_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "sessions", ["assume_user_detail_id"], name: "index_sessions_on_assume_user_detail_id", using: :btree

  create_table "sim_managements", force: true do |t|
    t.string   "mac_id"
    t.string   "plan_type"
    t.string   "iccid"
    t.string   "imei"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.integer  "rate_plan_id"
    t.integer  "sim_rate_plan_id"
    t.string   "activated_on"
    t.string   "is_active",           default: "false"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "data_limit"
    t.string   "sid"
    t.boolean  "auto_recharge"
    t.string   "current_status"
  end

  create_table "sim_payments", force: true do |t|
    t.string   "stripeToken"
    t.string   "amount"
    t.string   "invoice_number"
    t.integer  "organisation_id"
    t.integer  "sim_management_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "sim_rate_plans", force: true do |t|
    t.string   "plan_description"
    t.string   "amount"
    t.string   "plan_id"
    t.string   "plan_type"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "data_plan"
  end

  create_table "snmp_configs", force: true do |t|
    t.integer  "router_inventory_id"
    t.integer  "location_network_id"
    t.integer  "organisation_id"
    t.string   "server_ip"
    t.string   "server_port"
    t.string   "server_community"
    t.string   "ro_community"
    t.string   "rw_community"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "tagging_lists"
  end

  create_table "sqms", force: true do |t|
    t.boolean  "is_enabled"
    t.string   "uplink"
    t.integer  "download_speed"
    t.integer  "upload_speed"
    t.string   "queuing_disciplines"
    t.string   "queue_setup_script"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
    t.text     "tagging_lists"
  end

  create_table "static_routes", force: true do |t|
    t.string   "routing_name"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.integer  "location_network_id"
    t.string   "tagging_lists"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "static_routes", ["organisation_id"], name: "index_static_routes_on_organisation_id", using: :btree

  create_table "static_routing_lists", force: true do |t|
    t.string   "network"
    t.string   "bitmask"
    t.string   "gateway"
    t.integer  "static_route_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "switch_configurations", force: true do |t|
    t.integer  "organisation_id"
    t.integer  "location_network_id"
    t.string   "switch_model"
    t.integer  "hardware_part_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "sw_mac_oui",          limit: 2147483647
    t.integer  "clone_id"
  end

  add_index "switch_configurations", ["location_network_id"], name: "index_switch_configurations_on_location_network_id", using: :btree
  add_index "switch_configurations", ["organisation_id"], name: "index_switch_configurations_on_organisation_id", using: :btree

  create_table "switch_mac_ouis", force: true do |t|
    t.string   "mac_id"
    t.string   "mask"
    t.integer  "vlan_id"
    t.integer  "priority"
    t.integer  "mac_vlan_group_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "binary_mask"
  end

  create_table "switch_port_configurations", force: true do |t|
    t.integer  "port_number"
    t.string   "name"
    t.boolean  "port_status"
    t.string   "link_negotiation"
    t.integer  "speed"
    t.integer  "power"
    t.boolean  "poe"
    t.string   "vlan"
    t.boolean  "port_isolation"
    t.integer  "switch_configuration_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "native_vlan",             default: 1
    t.boolean  "rstp",                    default: false
    t.string   "port_type"
    t.boolean  "acl_mac",                 default: false
    t.string   "mac_filter_policy"
    t.text     "acl_mac_list"
    t.integer  "clone_id"
  end

  add_index "switch_port_configurations", ["switch_configuration_id"], name: "index_switch_port_configurations_on_switch_configuration_id", using: :btree

  create_table "taggings", force: true do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type"
    t.integer  "tagger_id"
    t.string   "tagger_type"
    t.string   "context",       limit: 128
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
  add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree

  create_table "tags", force: true do |t|
    t.string  "name"
    t.integer "taggings_count", default: 0
  end

  add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree

  create_table "template_policies", force: true do |t|
    t.text     "unlock_controls",         limit: 2147483647
    t.boolean  "disable_unlock_controls",                    default: false
    t.integer  "location_network_id",                                        null: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "test_profiles", force: true do |t|
    t.string   "name"
    t.string   "test_category"
    t.string   "application_interface"
    t.boolean  "alert"
    t.string   "test_initiator"
    t.string   "host_target"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "down_time"
    t.string   "percentage_utilized"
    t.string   "total_response_time"
    t.boolean  "is_enabled",            default: false
    t.boolean  "threshold_alerts",      default: true
    t.boolean  "alerts",                default: true
  end

  add_index "test_profiles", ["location_network_id"], name: "index_test_profiles_on_location_network_id", using: :btree

  create_table "test_properties", force: true do |t|
    t.string   "threshold_error"
    t.string   "threshold_latency"
    t.string   "packet_loss"
    t.integer  "port"
    t.string   "protocol"
    t.string   "load_page"
    t.integer  "test_profile_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "initiator"
    t.string   "destination"
    t.string   "upload_speed"
    t.string   "download_speed"
    t.string   "download_url"
    t.string   "upload_url"
    t.string   "application_interface"
    t.string   "down_time"
    t.string   "percentage_utilized"
    t.string   "total_response_time"
    t.string   "dns_type"
    t.string   "custom_dns"
    t.string   "host_target"
    t.boolean  "alerts",                 default: false
    t.boolean  "threshold_alerts",       default: false
    t.string   "critical_level"
    t.string   "rssi"
    t.string   "bit_rate"
    t.boolean  "rssi_f"
    t.boolean  "bit_rate_f"
    t.string   "band"
    t.boolean  "ssid_restriction"
    t.string   "application_interface1"
    t.string   "available_mode"
    t.string   "service_name"
    t.string   "critical_level1"
    t.string   "test_name"
  end

  add_index "test_properties", ["test_profile_id"], name: "index_test_properties_on_test_profile_id", using: :btree

  create_table "time_policies", force: true do |t|
    t.string   "policy_type"
    t.string   "network_ssid_id"
    t.integer  "organisation_id"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "timepolicy_lists", force: true do |t|
    t.string   "day"
    t.string   "start_time"
    t.string   "end_time"
    t.boolean  "available"
    t.integer  "time_policy_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "tunnels", force: true do |t|
    t.string   "name"
    t.string   "tunnel_type"
    t.string   "end_point"
    t.boolean  "data_fragmentation",                     default: false
    t.string   "gre_mtu"
    t.boolean  "dhcp_healthcheck",                       default: false
    t.string   "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "tunnel_interfaces",   limit: 2147483647
  end

  create_table "unities", force: true do |t|
    t.integer  "role_id"
    t.integer  "user_id"
    t.integer  "location_network_id"
    t.string   "current_network"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "permission"
    t.integer  "saml_user_role_id"
    t.integer  "locatable_id"
    t.string   "locatable_type"
  end

  add_index "unities", ["locatable_id", "locatable_type"], name: "index_unities_on_locatable_id_and_locatable_type", using: :btree
  add_index "unities", ["location_network_id"], name: "index_unities_on_location_network_id", using: :btree
  add_index "unities", ["user_id"], name: "index_unities_on_user_id", using: :btree

  create_table "upgrade_data", force: true do |t|
    t.string   "version"
    t.text     "url",              limit: 2147483647
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "upload_time",      limit: 2147483647
    t.boolean  "is_released",                         default: false
    t.integer  "organisation_id"
    t.string   "upgrade_category"
    t.text     "fw_checksum"
  end

  create_table "upgrades", force: true do |t|
    t.string   "version"
    t.text     "aps"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "organisation_id"
    t.integer  "router_inventory_id"
    t.string   "status"
    t.string   "upgrade_type"
    t.string   "schedule_type"
    t.datetime "schedule_at"
    t.string   "time_zone"
    t.string   "worker_job_id"
    t.boolean  "save_prev_config",    default: true
  end

  add_index "upgrades", ["router_inventory_id"], name: "index_upgrades_on_router_inventory_id", using: :btree

  create_table "uplink_connectivities", force: true do |t|
    t.integer "uid"
    t.string  "connectivity_time"
  end

  create_table "uplinks", force: true do |t|
    t.integer  "router_inventory_id"
    t.string   "wl_association"
    t.boolean  "wds_enabled",             default: false
    t.string   "wl_wpa_key"
    t.string   "wl_band"
    t.string   "wl_ssid_name"
    t.integer  "wl_ssid_uniqe_id"
    t.string   "mo_service"
    t.string   "mo_apn"
    t.string   "mo_device"
    t.string   "mo_username"
    t.string   "mo_password"
    t.string   "ip_type"
    t.string   "ip"
    t.string   "subnet_mask"
    t.string   "gateway"
    t.string   "uplink_type",             default: "1"
    t.string   "primary_dns"
    t.string   "secondary_dns"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "load_balance_percentage", default: 0
    t.boolean  "is_primary",              default: false
    t.string   "uplink_name"
    t.string   "mo_proto_key"
    t.boolean  "mo_is_advanced",          default: false
    t.string   "pppoe_username"
    t.string   "pppoe_password"
    t.string   "dns_mode"
    t.boolean  "is_deleted",              default: false
    t.string   "last_mobile_status"
    t.string   "last_seen_ip"
    t.integer  "hb_type",                 default: 1
    t.integer  "hb_interval",             default: 5
    t.string   "uplink_module",           default: "1"
    t.string   "ttl",                     default: "0"
    t.string   "nt"
    t.string   "mm"
    t.string   "cid"
    t.string   "lac"
    t.string   "operator"
    t.text     "operator_band"
    t.string   "default_lbc"
    t.string   "lat"
    t.string   "lng"
    t.string   "imsi"
    t.string   "eid"
    t.text     "mwan3_cfg"
    t.text     "isp_details"
    t.string   "public_ip"
  end

  add_index "uplinks", ["is_deleted", "router_inventory_id"], name: "index_uplinks_on_is_deleted_and_router_inventory_id", using: :btree

  create_table "users", force: true do |t|
    t.string   "email",                                     default: "",    null: false
    t.string   "encrypted_password",                        default: "",    null: false
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",                             default: 0,     null: false
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "full_name"
    t.string   "phone_number"
    t.string   "company_name"
    t.string   "is_admin"
    t.integer  "organisation_id"
    t.string   "organisation_access"
    t.string   "confirmation_token"
    t.datetime "confirmed_at"
    t.datetime "confirmation_sent_at"
    t.string   "unconfirmed_email"
    t.boolean  "approved",                                  default: false, null: false
    t.integer  "role_id"
    t.boolean  "is_super_admin",                            default: false
    t.string   "access_token"
    t.text     "network_tags"
    t.text     "claimed_devices",        limit: 2147483647
    t.string   "user_type"
  end

  add_index "users", ["approved"], name: "index_users_on_approved", using: :btree
  add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
  add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
  add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree

  create_table "users_notification_groups", force: true do |t|
    t.integer "user_id"
    t.integer "notification_group_id"
  end

  create_table "users_roles", id: false, force: true do |t|
    t.integer "user_id"
    t.integer "role_id"
  end

  add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree

  create_table "v_lans", force: true do |t|
    t.integer  "organisation_id"
    t.integer  "network_ssid_id"
    t.string   "v_lan_id"
    t.string   "ip_type"
    t.string   "ip_address"
    t.string   "net_mask"
    t.string   "dhcp_start_range"
    t.string   "dhcp_end_range"
    t.string   "dns1"
    t.string   "dns2"
    t.string   "gateway"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "enable_gre_on_v_lan"
    t.string   "enable_dhcp_on_v_lan"
    t.string   "name"
    t.integer  "location_network_id"
    t.string   "dns_mode"
    t.string   "dhcp_relay_server"
    t.text     "dhcp_mappings",         limit: 2147483647
    t.text     "dhcp_ranges",           limit: 2147483647
    t.string   "dhcp_lease_time"
    t.string   "nat",                                      default: "1"
    t.string   "wna",                                      default: "1"
    t.string   "captive_portal"
    t.text     "splash_url"
    t.string   "wallgarden"
    t.text     "walled_garden_range"
    t.string   "overwrite_success_url",                    default: "false"
    t.text     "success_url"
    t.string   "auth_radius_id"
    t.string   "acc_radius_id"
    t.string   "acc_radius_enabled"
    t.string   "per_user_qos"
    t.string   "default_interim_time",                     default: "300"
    t.string   "default_idle_timeout",                     default: "1800"
    t.boolean  "active_scan",                              default: false
    t.integer  "mac_auth",                                 default: 0
    t.string   "uplink_priority",                          default: "1"
    t.text     "dhcp_options",          limit: 2147483647
    t.string   "uam_secret_key"
    t.boolean  "uam_secret",                               default: false
    t.string   "qos_bw",                                   default: "0"
    t.boolean  "enable_vlan_qos",                          default: false
    t.string   "vlan_qos"
    t.integer  "clone_id"
  end

  add_index "v_lans", ["location_network_id"], name: "index_v_lans_on_location_network_id", using: :btree
  add_index "v_lans", ["network_ssid_id"], name: "index_v_lans_on_network_ssid_id", using: :btree
  add_index "v_lans", ["organisation_id", "location_network_id"], name: "index_v_lans_on_org_and_location_network", using: :btree

  create_table "vpn_configs", force: true do |t|
    t.string   "name"
    t.string   "ike_time"
    t.string   "l_subnet"
    t.string   "remote_ip"
    t.string   "remote_nw_ip"
    t.string   "remote_nw_subnet"
    t.string   "pre_shared_key"
    t.string   "ike"
    t.string   "esp"
    t.string   "is_enabled"
    t.integer  "location_network_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "is_server",                                   default: true
    t.boolean  "enable_server_client",                        default: false
    t.string   "tunnel_connection"
    t.string   "pass_through"
    t.boolean  "enable_gateway"
    t.string   "gateway_ip"
    t.boolean  "enable_nat"
    t.string   "vpn_name"
    t.string   "protocol"
    t.string   "private_key"
    t.string   "public_key"
    t.string   "address"
    t.string   "dns_servers"
    t.string   "peer_public_key"
    t.string   "peer_pre_shared_key"
    t.string   "end_point"
    t.text     "allowed_ips",              limit: 2147483647
    t.string   "local_ip"
    t.string   "local_port"
    t.string   "wireguard"
    t.string   "listener_port"
    t.string   "mtu"
    t.text     "server_peer",              limit: 2147483647
    t.boolean  "wireguard_enable_gateway"
    t.string   "wireguard_gateway_ip"
    t.boolean  "wireguard_enable_nat"
    t.string   "psk"
    t.string   "end_point_ip"
    t.string   "end_point_port"
    t.string   "wireguard_passthrough"
    t.text     "server_p_allowed_ips",     limit: 2147483647
    t.integer  "fail_over_id"
    t.boolean  "fail_over_enabled"
    t.string   "monitor_ip"
    t.integer  "organisation_id"
  end

  add_index "vpn_configs", ["organisation_id"], name: "index_vpn_configs_on_organisation_id", using: :btree

  create_table "webhook_endpoints", force: true do |t|
    t.string   "url",                                  null: false
    t.datetime "created_at",                           null: false
    t.datetime "updated_at",                           null: false
    t.integer  "notification_group_id"
    t.string   "name"
    t.boolean  "enabled",               default: true
    t.string   "shared_key"
  end

  create_table "webhook_events", force: true do |t|
    t.integer  "webhook_endpoint_id",                                    null: false
    t.string   "event",                                                  null: false
    t.text     "payload",                                                null: false
    t.datetime "created_at",                                             null: false
    t.datetime "updated_at",                                             null: false
    t.text     "response",            limit: 2147483647
    t.integer  "location_network_id"
    t.integer  "organisation_id"
    t.boolean  "is_test",                                default: false
  end

  create_table "wired_configs", force: true do |t|
    t.string   "name"
    t.string   "mode",                                     default: "0"
    t.string   "nat",                                      default: "1"
    t.boolean  "is_enabled",                               default: true
    t.integer  "location_network_id"
    t.string   "acl_mac"
    t.string   "mac_filter_policy"
    t.text     "acl_mac_list"
    t.string   "captive_portal"
    t.text     "splash_url"
    t.string   "wallgarden"
    t.text     "walled_garden_range"
    t.string   "overwrite_success_url",                    default: "false"
    t.text     "success_url"
    t.string   "dhcp_range_start"
    t.string   "dhcp_range_end"
    t.string   "dhcp_relay_server"
    t.string   "dhcp_lease_time"
    t.string   "auth_radius_id"
    t.string   "acc_radius_id"
    t.string   "acc_radius_enabled"
    t.string   "ip_address"
    t.string   "subnet_mask"
    t.string   "ssid_qos"
    t.boolean  "enable_ssid_qos"
    t.string   "per_user_qos"
    t.integer  "max_association",                          default: 0
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "dns_mode",                                 default: "1"
    t.string   "dns_primary"
    t.string   "dns_secondary"
    t.string   "wna",                                      default: "0"
    t.text     "dhcp_mappings",         limit: 2147483647
    t.string   "default_interim_time",                     default: "300"
    t.string   "default_idle_timeout",                     default: "1800"
    t.string   "dhcp_ranges"
    t.text     "port_configs",          limit: 2147483647
    t.string   "custom_port"
    t.string   "enabled",                                  default: "1"
    t.integer  "clone_id"
    t.integer  "organisation_id"
  end

  add_index "wired_configs", ["location_network_id"], name: "index_wired_configs_on_location_network_id", using: :btree
  add_index "wired_configs", ["organisation_id"], name: "index_wired_configs_on_organisation_id", using: :btree

  create_table "wired_configs_v_lans", force: true do |t|
    t.integer "wired_config_id"
    t.integer "v_lan_id"
  end

  add_index "wired_configs_v_lans", ["v_lan_id"], name: "index_wired_configs_v_lans_on_v_lan_id", using: :btree
  add_index "wired_configs_v_lans", ["wired_config_id"], name: "index_wired_configs_v_lans_on_wired_config_id", using: :btree

  create_table "wlan_groups", force: true do |t|
    t.string  "name"
    t.text    "vendor_details"
    t.string  "vendor_id"
    t.integer "location_network_id"
  end

end
