#
# Netdot Metadata. 
#
# Metadata is kept as a Perl hash and contains information necessary to generate the 
# DB schema, to generate Class::DBI classes, and to help in 
# minimizing user interface code.
# 
# $meta = {
#'tables' => {
#  Table1 => {
#    columns => {
#      column1 => {  # DB name of this column
#        default => 'Default Value for this column',
#        description => 'Column1 blah blah blah',
#        length => 'SQL length of the column',
#
#        # Include this if this column is a foreign key:
#        linksto => { 
#          Behavior to take when the object pointed to by this column is deleted
#          cascade => 'Delete|Fail|Nullify',
#
#          Specify a column to order when calling the has_many method
#          order_by => 'column [DESC]'
# 
#          Name of this relationship from the perspective of the object pointed to
#          by this column.  Class::DBI creates a method with this name to retrieve
#          the 'has_many' objects
#          method => 'Method Name',
#          table => 'Foreign Table Name'
#        },
#
#        nullable => 0,   # can this column be set to null?
#        tag => undef,    # a user friendly name that is displayed in the UI
#        type => '[bool|date|integer|blob|numeric|varchar]' 
#	          The SQL data type of this column
#      },
#    description => 'Table1 blah blah blah', # Description for this table
#    has_history => 0,  # Should a history table (a clone of this one) be inserted as well?
#    index => [],       # Columns that should be indexed by the DBMS
#    isjoin => '0',     # Is this table a join table?
#
#    One or more columns to be used as a short identifier 
#    for each instance of this table:
#    label => [ 'column1', 'column2'  ],
#    primary_key => 'id',
#
#    Array of arrays of columns that should be marked as unique in the DB.
#    unique => [ [ 'column1' ] ],
#
#    Views contain subsets of columns to be displayed
#    For example, different views might be chosen depending on the type or object
#    views => {
#      all => [ 'column1', 'column2' ], 
#      brief => [ 'column1' ]
#    }
#  },
#
#
# 
#
# 
#
#

$meta = {
'tables' => {
  AccessRight => {
    table_db_name => 'accessright',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      access => {
        default => '',
        description => 'Type of access granted for the given object or class (view|edit|delete)',
        length => '128',
        nullable => 0,
        tag => 'Access',
        type => 'varchar'
      },
      object_class => {
        default => '',
        description => 'The class of object for which access is granted',
        length => '128',
        nullable => 0,
        tag => 'Object Class',
        type => 'varchar'
      },
      object_id => {
        default => '',
        description => 'Object ID for which access right applies',
        length => '',
        nullable => 0,
        tag => 'Object ID',
        type => 'integer'
      },
    },
    description => 'Acess rights for Netdot authorization.  Rights are tied to individual users (Person objects) or groups (Contact List objects)',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [ 'access', 'object_class', 'object_id' ],
    primary_key => 'id',
    unique => [ [ ] ],
    views => {
      all => [
        'access',
        'object_class',
        'object_id'
      ],
      brief => [
        'access',
        'object_class',
        'object_id'
      ]
    }
  },
  ArpCache => {
    table_db_name => 'arpcache',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      device => {
        default => '',
        description => 'Device where this Arp Cache was found',
        length => '',
        linksto => {
          cascade => 'Delete',
	  order_by => 'tstamp DESC',
          method => 'arp_caches',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      tstamp => {
        default => '1970-01-02 00:00:01',
        description => 'When this Cache was collected',
        length => '',
        nullable => 0,
        tag => 'Timestamp',
        type => 'timestamp'
      }
    },
    description => 'Device ARP Cache',
    has_history => 0,
    index => [ ['device'], ['tstamp'] ],
    isjoin => '0',
    label => [
      'tstamp',
      'device'
    ],
    primary_key => 'id',
    unique => [ ['device', 'tstamp'] ],
    views => {
      all => [
        'tstamp',
        'device'
      ],
      brief => [
        'tstamp',
        'device'
      ]
    }
  },
  ArpCacheEntry => {
    table_db_name => 'arpcacheentry',
    columns => {
      arpcache => {
        default => '',
        description => 'ARP Cache where this entry belongs',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'entries',
          table => 'ArpCache',
        },
        nullable => 0,
        tag => 'ARP Cache',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      interface => {
        default => '',
        description => 'Interface',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'arp_entries',
          table => 'Interface'
        },
        nullable => 0,
        tag => 'Interface',
        type => 'integer'
      },
      ipaddr => {
        default => '',
        description => 'IP address',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'arp_entries',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'IP',
        type => 'integer'
      },
      physaddr => {
        default => '',
        description => 'Physical Address (MAC)',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'arp_entries',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Physical Address',
        type => 'integer'
      }
    },
    description => 'ARP Cache Entry',
    has_history => 0,
    index => [ ['arpcache'], ['interface'], ['physaddr'], ['ipaddr'] ],
    isjoin => '0',
    label => [
      'ipaddr',
      'physaddr'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
	'interface',
        'ipaddr',
        'physaddr',
        'arpcache'
      ],
      brief => [
        'ipaddr',
        'physaddr',
      ]
    }
  },
  Availability => {
    table_db_name => 'availability',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => 'NULL',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Time period brief description. e.g. "24x7"',
        length => '128',
        nullable => 0,
        tag => 'Time Period',
        type => 'varchar'
      }
    },
    description => 'A Time Period',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  BGPPeering => {
    table_db_name => 'bgppeering',
    columns => {
      bgppeeraddr => {
        default => '',
        description => 'BGP Peer Address',
        length => '64',
        nullable => 1,
        tag => 'Peer Adress',
        type => 'varchar'
      },
      bgppeerid => {
        default => '',
        description => 'BGP Peer ID',
        length => '64',
        nullable => 1,
        tag => 'Peer ID',
        type => 'varchar'
      },
      device => {
        default => '',
        description => 'Device where BGP peering exists (the local device, that is)',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'bgppeers',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      entity => {
        default => '',
        description => 'Entity with which Peering Exists',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'bgppeers',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Entity',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      monitored => {
        default => '',
        description => 'Flag that specifies if this peering should be monitored',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'bool'
      },
      monitorstatus => {
        default => '',
        description => 'Monitoring Status of this Peering',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'bgppeers',
          table => 'MonitorStatus'
        },
        nullable => 0,
        tag => 'Monitored Status',
        type => 'integer'
      }
    },
    description => 'A BGP Peering',
    has_history => 0,
    index => [
      [
        'bgppeerid'
      ]
    ],
    isjoin => '0',
    label => [
      'device',
      'entity'
    ],
    primary_key => 'id',
    unique => [
      [
        'device',
        'bgppeeraddr'
      ]
    ],
    views => {
      all => [
        'device',
        'entity',
        'bgppeerid',
        'bgppeeraddr',
        'monitored',
        'monitorstatus'
      ],
      brief => [
        'device',
        'entity',
        'bgppeeraddr'
      ]
    }
  },
  BackboneCable => {
    table_db_name => 'backbonecable',
    columns => {
      end_closet => {
        default => '',
        description => 'Closet where this cable terminates',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'backbones_end',
          table => 'Closet'
        },
        nullable => 0,
        tag => 'Destination Closet',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      installdate => {
        default => '',
        description => 'Date when this Cable was first installed (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Installed on',
        type => 'date'
      },
      length => {
        default => '',
        description => 'The physical length of this cable (ft)',
        length => '32',
        nullable => 1,
        tag => 'Length (ft)',
        type => 'varchar'
      },
      name => {
        default => '',
        description => 'A name given to this cable.',
        length => '64',
        nullable => 0,
        tag => 'Cable ID',
        type => 'varchar'
      },
      owner => {
        default => '',
        description => 'Entity that owns this cable',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'cables',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Owned by',
        type => 'integer'
      },
      start_closet => {
        default => '',
        description => 'Closet where this cable originates',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'backbones_start',
          table => 'Closet'
        },
        nullable => 0,
        tag => 'Origin Closet',
        type => 'integer'
      },
      type => {
        default => '',
        description => 'The type of cable',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'backbonecables',
          table => 'CableType'
        },
        nullable => 0,
        tag => 'Cable Type',
        type => 'integer'
      }
    },
    description => 'A Backbone cable that interconnects two sites.  Backbone cables can have multiple strands.',
    has_history => 1,
    index => [
      [
        'name'
      ],
      [
        'start_closet'
      ],
      [
        'end_closet'
      ]
    ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'type',
        'owner',
        'installdate',
        'start_closet',
        'end_closet',
        'length',
        'info'
      ],
      brief => [
        'name',
        'start_closet',
        'end_closet'
      ]
    }
  },
  CableStrand => {
    table_db_name => 'cablestrand',
    columns => {
      cable => {
        default => '',
        description => 'Cable to which this strand belongs',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'strands',
          table => 'BackboneCable'
        },
        nullable => 0,
        tag => 'Cable ID',
        type => 'integer'
      },
      circuit_id => {
        default => '',
        description => 'ID of the circuit which this strand is a part of',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'strands',
          table => 'Circuit'
        },
        nullable => 0,
        tag => 'Circuit',
        type => 'integer'
      },
      description => {
        default => '',
        description => 'A text description of this strand',
        length => '128',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      fiber_type => {
        default => '',
        description => 'The type of fiber that this strand is made of',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'strands',
          table => 'FiberType'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'A name for this strand',
        length => '64',
        nullable => 0,
        tag => 'Strand ID',
        type => 'varchar'
      },
      number => {
        default => '',
        description => 'The numeric order of this strand',
        length => '',
        nullable => 0,
        tag => 'Number',
        type => 'integer'
      },
      status => {
        default => '',
        description => 'Status of this strand',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'strands',
          table => 'StrandStatus'
        },
        nullable => 0,
        tag => 'Status',
        type => 'integer'
      }
    },
    description => 'A single cable strand/pair',
    has_history => 1,
    index => [
      [
        'cable'
      ],
      [
        'name'
      ],
      [
        'number'
      ],
      [
        'circuit_id'
      ]
    ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'cable',
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'number',
        'cable',
        'status',
        'fiber_type',
        'circuit_id',
        'description',
        'info'
      ],
      brief => [
        'name',
        'cable',
        'status'
      ]
    }
  },
  CableType => {
    table_db_name => 'cabletype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'The name of this cable type',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Types of Cables',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Circuit => {
    table_db_name => 'circuit',
    columns => {
      cid => {
        default => '',
        description => 'ID of this circuit.',
        length => '128',
        nullable => 0,
        tag => 'Circuit ID',
        type => 'varchar'
      },
      linkid => {
        default => '',
        description => 'Site Link to which this circuit belongs',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'circuits',
          table => 'SiteLink'
        },
        nullable => 0,
        tag => 'Site Link',
        type => 'integer'
      },
      datetested => {
        default => '',
        description => 'Date that this circuit was last tested (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Date Tested',
        type => 'date'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      installdate => {
        default => '',
        description => 'Date when this circuit was installed (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Installed on',
        type => 'date'
      },
      loss => {
        default => '',
        description => 'Tested loss (dbm)',
        length => '32',
        nullable => 1,
        tag => 'Loss',
        type => 'varchar'
      },
      speed => {
        default => '',
        description => 'The speed of this circuit (Mbps)',
        length => '32',
        nullable => 1,
        tag => 'Speed',
        type => 'varchar'
      },
      status => {
        default => '',
        description => 'Status of this circuit',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'circuits',
          table => 'CircuitStatus'
        },
        nullable => 0,
        tag => 'Status',
        type => 'integer'
      },
      type => {
        default => '',
        description => 'The type of this circuit',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'circuits',
          table => 'CircuitType'
        },
        nullable => 0,
        tag => 'Type',
        type => 'integer'
      },
      vendor => {
        default => '',
        description => 'Who provides this circuit, if it is not internal',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'circuits',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Provider',
        type => 'integer'
      }
    },
    description => 'A circuit can either be a WAN link provided by an external entity, or a set of [spliced] backbone cable strands terminated into two device interfaces',
    has_history => 1,
    index => [
      [
        'linkid'
      ]
    ],
    isjoin => '0',
    label => [
      'cid'
    ],
    primary_key => 'id',
    unique => [
      [
        'vendor',
        'cid'
      ]
    ],
    views => {
      all => [
        'cid',
        'linkid',
        'status',
        'type',
        'speed',
        'installdate',
        'datetested',
        'loss',
        'vendor',
        'info'
      ],
      brief => [
        'cid',
        'linkid',
        'type',
        'vendor',
        'status'
      ]
    }
  },
  CircuitStatus => {
    table_db_name => 'circuitstatus',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Circuit Status',
        length => '128',
        nullable => 0,
        tag => 'Status',
        type => 'varchar'
      }
    },
    description => 'Circuit status',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  CircuitType => {
    table_db_name => 'circuittype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Circuit Type',
        length => '128',
        nullable => 0,
        tag => 'Type',
        type => 'varchar'
      }
    },
    description => 'Circuit Type',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Closet => {
    table_db_name => 'closet',
    columns => {
      ot_blocks => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => '110 Blocks',
        type => 'varchar'
      },
      ss_blocks => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => '66 Blocks',
        type => 'varchar'
      },
      access_key_type => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Access Key Type',
        type => 'varchar'
      },
      asbestos_tiles => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Asbestos Tiles',
        type => 'bool'
      },
      catv_taps => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'CableTV Taps',
        type => 'varchar'
      },
      converted_patch_panels => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Converted Patch Panels',
        type => 'bool'
      },
      dimensions => {
        default => '',
        description => '',
        length => '64',
        nullable => 1,
        tag => 'Dimensions (")',
        type => 'varchar'
      },
      ground_buss => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Ground Buss',
        type => 'bool'
      },
      hvac_type => {
        default => '',
        description => '',
        length => '255',
        nullable => 1,
        tag => 'HVAC Type',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'An identifier for this Closet within a Site',
        length => '32',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      room => {
        default => '',
        description => 'The Room number for a closet(Closet is encoded as part of Room)',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'closets',
          table => 'Room'
        },
        nullable => 0,
        tag => 'Room',
        type => 'integer'
      },
      outlets => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Outlets',
        type => 'varchar'
      },
      pair_count => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Pair Count',
        type => 'varchar'
      },
      patch_panels => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Patch Panels',
        type => 'varchar'
      },
      rack_type => {
        default => '',
        description => '',
        length => '255',
        nullable => 1,
        tag => 'Rack Type',
        type => 'varchar'
      },
      racks => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Racks',
        type => 'varchar'
      },
      ru_avail => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Rack Units Available',
        type => 'varchar'
      },
      shared_with => {
        default => '',
        description => '',
        length => '255',
        nullable => 1,
        tag => 'Shared With',
        type => 'varchar'
      },
      work_needed => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Work Needed',
        type => 'varchar'
      }
    },
    description => 'A Communications Closet.  A Closet is different from a normal Room in two ways: a) Backbone Cables (inter and intra building) terminate in Closets.  b) Horizontal Cables _start_ in Closets and _end_ in Rooms',
    has_history => 0,
    index => [ [ 'room' ] ],
    isjoin => '0',
    label => [ 'name', 'room' ],
    primary_key => 'id',
    unique => [ ['name', 'room'] ],
    views => {
      all => [
        'name',
        'room',
        'dimensions',
        'racks',
        'outlets',
        'ru_avail',
        'patch_panels',
        'ot_blocks',
        'ss_blocks',
        'catv_taps',
        'access_key_type',
        'work_needed',
        'shared_with',
        'hvac_type',
        'ground_buss',
        'asbestos_tiles',
        'rack_type',
        'pair_count',
        'converted_patch_panels',
        'info'
      ],
      brief => [
        'name',
        'room',
      ]
    }
  },
  SiteLink => {
    table_db_name => 'sitelink',
    columns => {
      entity => {
        default => '',
        description => 'External Entity which we connect to',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'links',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Entity',
        type => 'integer'
      },
      farend => {
        default => '',
        description => 'The remote Site for this Link',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'farlinks',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Destination (Site)',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'A name for this Link',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      nearend => {
        default => '',
        description => 'The local Site for this Link',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'nearlinks',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Origin (Site)',
        type => 'integer'
      }
    },
    description => 'A Link between two Sites.  A Site Link can consist of one or more circuits',
    has_history => 1,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'entity',
        'nearend',
        'farend',
        'info'
      ],
      brief => [
        'name',
        'entity',
        'nearend',
        'farend'
      ]
    }
  },
  Contact => {
    table_db_name => 'contact',
    columns => {
      contactlist => {
        default => '',
        description => 'The list or group of Contacts to which this Contact belongs',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'contacts',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      contacttype => {
        default => '',
        description => 'The type of this Contact',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'contacts',
          table => 'ContactType'
        },
        nullable => 0,
        tag => 'Type of Contact',
        type => 'integer'
      },
      escalation_level => {
        default => '',
        description => 'This level defines when this contact will be notified when monitoring devices or services.  Notifications usually escalate to a different set of contacts when the problem is not resolved in a certain amount of time.  This logic is implemented by the chosen external monitoring tool, not Netdot.',
        length => '',
        nullable => 0,
        tag => 'Escalation Level',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      notify_email => {
        default => '',
        description => 'Set this field to the desired Time Period to receive e-mail notifications when monitoring devices or services',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'page_notifications',
          table => 'Availability'
        },
        nullable => 0,
        tag => 'Email Notifications',
        type => 'integer'
      },
      notify_pager => {
        default => '',
        description => 'Set this field to the desired Time Period to receive pager notifications when monitoring devices or services',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'page_notifications',
          table => 'Availability'
        },
        nullable => 0,
        tag => 'Pager Notifications',
        type => 'integer'
      },
      notify_voice => {
        default => '',
        description => 'Set this field to the desired Time Period to receive voice notifications when monitoring devices or services',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'page_notifications',
          table => 'Availability'
        },
        nullable => 0,
        tag => 'Voice Notifications',
        type => 'integer'
      },
      person => {
        default => '',
        description => 'The actual Person that this contact refers to.  The Person table holds the actual contact information',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'roles',
          table => 'Person'
        },
        nullable => 0,
        tag => 'Person',
        type => 'integer'
      }
    },
    description => 'A Contact object is basically a Role of a certain Person.  People can be associated with one or more resources (devices, services, etc) for which they could be contacted.  Each Contact object represents one of these roles.',
    has_history => 1,
    index => [
      [
        'contactlist'
      ],
      [
        'contacttype'
      ]
    ],
    isjoin => '0',
    label => [
      'person',
      'contacttype'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
        'person',
        'contacttype',
        'contactlist',
        'notify_email',
        'notify_pager',
        'notify_voice',
        'escalation_level',
        'info'
      ],
      brief => [
        'person',
        'contacttype',
        'contactlist'
      ]
    }
  },
  ContactList => {
    table_db_name => 'contactlist',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Name for this group',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'A list of contacts',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name',
        'info'
      ]
    }
  },
  ContactType => {
    table_db_name => 'contacttype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'The name for this Contact Type',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Type of contact',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Device => {
    table_db_name => 'device',
    columns => {
      aliases => {
        default => '',
        description => 'Other names by which this Device is known',
        length => '255',
        nullable => 1,
        tag => 'Aliases',
        type => 'varchar'
      },
      auto_dns => {
        default => '',
        description => 'Whether a DNS name should be auto generated for each IP address in this device',
        length => '',
        nullable => 0,
        tag => 'Auto DNS?',
        type => 'bool'
      },
      bgpid => {
        default => '',
        description => 'Border Gateway Protocol ID.  This usually has the form of an IP address',
        length => '64',
        nullable => 1,
        tag => 'BGP ID',
        type => 'varchar'
      },
      bgplocalas => {
        default => '',
        description => 'Border Gateway Protocol Local Autonomous System number',
        length => '',
        nullable => 1,
        tag => 'BGP Local AS',
        type => 'integer'
      },
      canautoupdate => {
        default => '',
        description => 'If SNMP updates are automated, this value determines whether this Device should be included',
        length => '',
        nullable => 0,
        tag => 'Auto Update?',
        type => 'bool'
      },
      collect_arp => {
        default => '',
        description => 'Whether Netdot should collect ARP cache data from this Device.  Notice that this is mostly intended for Routers, though not necessarily',
        length => '',
        nullable => 0,
        tag => 'Collect ARP?',
        type => 'bool'
      },
      collect_fwt => {
        default => '',
        description => 'Whether Netdot should collect bridge Forwarding Table (FWT) data from this Device',
        length => '',
        nullable => 0,
        tag => 'Collect FWT?',
        type => 'bool'
      },
      collect_stp => {
        default => '',
        description => 'Enable or Disable querying device for Spanning Tree information',
        length => '',
        nullable => 0,
        tag => 'Collect STP Info?',
        type => 'bool'
      },
      community => {
        default => '',
        description => 'SNMP community',
        length => '64',
        nullable => 1,
        tag => 'SNMP Community',
        type => 'varchar'
      },
      customer_managed => {
        default => '',
        description => 'Does the operation of this Device fall into the responsibility of the customer (or "user" Entity)?',
        length => '',
        nullable => 0,
        tag => 'Managed by Customer?',
        type => 'bool'
      },
      custom_serial => {
        default => '',
        description => 'Custom (human-set) serial number of the Device',
        length => '64',
        nullable => 1,
        tag => 'Custom S/N',
        type => 'varchar'
      },
      date_installed => {
        default => '1970-01-02 00:00:01',
        description => 'Date that this Device was installed, or first seen in the network',
        length => '',
        nullable => 1,
        tag => 'First Discovered',
        type => 'timestamp'
      },
      down_from => {
        default => '',
        description => 'Device in down time from this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Down From',
        type => 'date'
      },
      down_until => {
        default => '',
        description => 'Device in down time until this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Down Until',
        type => 'date'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      inventorynumber => {
        default => '',
        description => 'A number given to this Device by the organization for accounting/inventory purposes',
        length => '64',
        nullable => 1,
        tag => 'Inventory',
        type => 'varchar'
      },
      ipforwarding => {
        default => '',
        description => 'Whether this device has IP forwarding enabled (IP-MIB::ipForwarding.0)',
        length => '',
        nullable => 0,
        tag => 'IP Forward?',
        type => 'bool'
      },
      layers => {
        default => '',
        description => 'Each digit represents a layer of the OSI model served by the device',
        length => '8',
        nullable => 1,
        tag => 'OSI Layers',
        type => 'varchar'
      },
      last_arp => {
        default => '1970-01-02 00:00:01',
        description => 'Last time ARP cache data was collected from this Device',
        length => '',
        nullable => 1,
        tag => 'Last ARP',
        type => 'timestamp'
      },
      last_fwt => {
        default => '1970-01-02 00:00:01',
        description => 'Last time Forwarding Tables (FWT) were collected from this Device',
        length => '',
        nullable => 1,
        tag => 'Last FWT',
        type => 'timestamp'
      },
      last_updated => {
        default => '1970-01-02 00:00:01',
        description => 'Date that this Device was last updated',
        length => '',
        nullable => 1,
        tag => 'Last Updated',
        type => 'timestamp'
      },
      maint_contract => {
        default => '',
        description => 'Reference to a maintenance or support contract with hardware vendor or third party.',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'devices',
          table => 'MaintContract'
        },
        nullable => 0,
        tag => 'Maint Contract',
        type => 'integer'
      },
      maint_from => {
        default => '',
        description => 'Device covered in maintenance from this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Maint Start',
        type => 'date'
      },
      maint_until => {
        default => '',
        description => 'Device covered in maintenance until this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Maint End',
        type => 'date'
      },
      monitor_config => {
        default => '',
        description => 'Indicates whether this Device should be included in configuration management tools (i.e. RANCID)',
        length => '',
        nullable => 0,
        tag => 'Monitor Config?',
        type => 'bool'
      },
      monitor_config_group => {
        default => '',
        description => 'Configuration Management group (i.e. RANCID group)',
        length => '64',
        nullable => 1,
        tag => 'Config Group?',
        type => 'varchar'
      },
      monitored => {
        default => '',
        description => 'Determines if this Device should be included in the configurations for monitoring software',
        length => '',
        nullable => 0,
        tag => 'Monitored?',
        type => 'bool'
      },
      monitoring_path_cost => {
        default => '',
        description => 'Netdot uses a variant of the Dijkstra algorithm to determine monitoring dependencies. Results can be affected adversely, for instance, by passive devices with connections that are not actually passing traffic.  This value allows the administrator to set a higher cost for those devices, for the purpose of influencing the determination of monitoring paths.',
        length => '',
        nullable => 1,
        tag => 'Path Cost',
        type => 'integer'
      },
      monitorstatus => {
        default => '',
        description => 'The monitoring status of this Device.  This values is supposed to be fed back into Netdot by an external process',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'devices',
          table => 'MonitorStatus'
        },
        nullable => 0,
        tag => 'Monitored Status',
        type => 'integer'
      },
      name => {
        default => '',
        description => 'The Device name is a reference to a DNS Resource Record (RR)',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'devices',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      oobname => {
        default => '',
        description => 'A name or command used to connect to this Device via an Out of Band connection, such as a Console Server',
        length => '255',
        nullable => 1,
        tag => 'Out-of-Band Hostname',
        type => 'varchar'
      },
      oobnumber => {
        default => '',
        description => 'A phone number used to connect to this Device via an Out of Band modem',
        length => '32',
        nullable => 1,
        tag => 'Out-of-Band Tel Number',
        type => 'varchar'
      },
      owner => {
        default => '',
        description => 'Entity that owns this Device',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'owned_devices',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Owner',
        type => 'integer'
      },
      os => {
        default => '',
        description => 'Operating System name and version',
        length => '128',
        nullable => 1,
        tag => 'OS',
        type => 'varchar'
      },
      physaddr => {
        default => '',
        description => 'The base MAC address of this Device.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'devices',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Base MAC',
        type => 'integer'
      },
      product => {
        default => '',
        description => 'Reference to a Product record.  Products are usually determined via SNMP',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'devices',
          table => 'Product'
        },
        nullable => 0,
        tag => 'Product Name',
        type => 'integer'
      },
      rack => {
        default => '',
        description => 'Rack ID where this Device is physically installed',
        length => '32',
        nullable => 1,
        tag => 'Rack',
        type => 'varchar'
      },
      room => {
        default => '',
        description => 'Room where this Device is installed',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'devices',
          table => 'Room'
        },
        nullable => 0,
        tag => 'Room',
        type => 'integer'
      },
      serialnumber => {
        default => '',
        description => 'Serial Number of the Device',
        length => '64',
        nullable => 1,
        tag => 'S/N',
        type => 'varchar'
      },
      site => {
        default => '',
        description => 'Site or Building where this Device is located.  This is set manually.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'devices',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      },
      snmp_authkey => {
        default => '',
        description => 'SNMPv3 Authentication Key',
        length => '255',
        nullable => 1,
        tag => 'AuthKey',
        type => 'varchar'
      },
      snmp_authprotocol => {
        default => '',
        description => 'SNMPv3 Authentication Protocol (MD5|SHA)',
        length => '32',
        nullable => 1,
        tag => 'AuthProtocol',
        type => 'varchar'
      },
      snmp_bulk => {
        default => '',
        description => 'Enable or Disable SNMP BULK operations for this device',
        length => '',
        nullable => 0,
        tag => 'SNMP Bulk?',
        type => 'bool'
      },
      snmp_managed => {
        default => '',
        description => 'Enable or Disable SNMP operations on this device',
        length => '',
        nullable => 0,
        tag => 'SNMP Managed?',
        type => 'bool'
      },
      snmp_polling => {
        default => '',
        description => 'Enable or Disable SNMP polling from management tools which get their configurations from Netdot',
        length => '',
        nullable => 0,
        tag => 'SNMP Polling?',
        type => 'bool'
      },
      snmp_privkey => {
        default => '',
        description => 'SNMPv3 Privacy Key',
        length => '255',
        nullable => 1,
        tag => 'PrivKey',
        type => 'varchar'
      },
      snmp_privprotocol => {
        default => '',
        description => 'SNMPv3 Privacy Protocol (AES|DES)',
        length => '32',
        nullable => 1,
        tag => 'PrivProtocol',
        type => 'varchar'
      },
      snmp_securitylevel => {
        default => '',
        description => 'SNMPv3 Security Level (noAuthNoPriv|authNoPriv|authPriv)',
        length => '32',
        nullable => 1,
        tag => 'SecLevel',
        type => 'varchar'
      },
      snmp_securityname => {
        default => '',
        description => 'SNMPv3 user name',
        length => '255',
        nullable => 1,
        tag => 'SecName',
        type => 'varchar'
      },
      snmp_target => {
        default => '',
        description => 'SNMP target IP address.  Netdot will try to always use this IP address when snmp-querying the device',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'snmp_devices',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'SNMP Target Address',
        type => 'integer'
      },
      snmp_version => {
        default => '',
        description => 'Simple Network Management Protocol Version (1|2|3)',
        length => '',
        nullable => 1,
        tag => 'SNMP Version',
        type => 'integer'
      },
      stp_enabled => {
        default => '',
        description => 'Whether some version of the Spanning Tree Protocol is enabled on this switch',
        length => '',
        nullable => 0,
        tag => 'STP Enabled?',
        type => 'bool'
      },
      stp_mst_digest => {
        default => '',
        description => 'Multiple Spanning Tree (MST) Configuration Digest',
        length => '255',
        nullable => 1,
        tag => 'MST Config Digest',
        type => 'varchar'
      },
      stp_mst_region => {
        default => '',
        description => 'Multiple Spanning Tree (MST) region name',
        length => '128',
        nullable => 1,
        tag => 'MST Region',
        type => 'varchar'
      },
      stp_mst_rev => {
        default => '',
        description => 'Multiple Spanning Tree (MST) revision',
        length => '',
        nullable => 1,
        tag => 'MST Revision',
        type => 'integer'
      },
      stp_type => {
        default => '',
        description => 'Spanning Tree Protocol Type (802.1d, MST, PVST, etc)',
        length => '128',
        nullable => 1,
        tag => 'STP Type',
        type => 'varchar'
      },
      sysdescription => {
        default => '',
        description => 'System Description.  Meant to be populated by SNMP',
        length => '255',
        nullable => 1,
        tag => 'System Description',
        type => 'varchar'
      },
      syslocation => {
        default => '',
        description => 'System Location.  Meant to be populated by SNMP.',
        length => '255',
        nullable => 1,
        tag => 'System Location',
        type => 'varchar'
      },
      sysname => {
        default => '',
        description => 'System Name.  Meant to be populated by SNMP.',
        length => '255',
        nullable => 1,
        tag => 'System Name',
        type => 'varchar'
      },
      used_by => {
        default => '',
        description => 'Entity that uses this Device',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'used_devices',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Used by',
        type => 'integer'
      }
    },
    description => 'A network device.  Particularly, Devices in Netdot are network infrastructure devices that network administrators care about for inventory, monitoring and management purposes.  Not to be confused with end nodes',
    has_history => 1,
    index => [ ['physaddr'],  ['product'], ['used_by'],  ['inventorynumber'], ['owner'], ['os'], ['sysname'], ['down_from'], ['down_until'], ['serialnumber'], ['snmp_target'] ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'aliases',
        'snmp_target',
        'sysname',
        'sysdescription',
        'syslocation',
        'ipforwarding',
        'layers',
        'os',
        'physaddr',
        'bgplocalas',
	'auto_dns',
        'bgpid',
        'oobname',
        'oobnumber',
        'owner',
        'used_by',
        'monitored',
        'monitoring_path_cost',
        'monitorstatus',
        'customer_managed',
        'community',
        'serialnumber',
        'custom_serial',
        'product',
        'inventorynumber',
        'maint_contract',
        'maint_from',
        'maint_until',
        'canautoupdate',
        'site',
        'monitor_config',
        'monitor_config_group',
        'snmp_managed',
        'snmp_polling',
	'collect_arp',
	'last_arp',
	'collect_fwt',
        'collect_stp',
	'last_fwt',
        'snmp_bulk',
        'snmp_version',
        'snmp_securityname',
        'snmp_authkey',
        'snmp_authprotocol',
        'snmp_privkey',
        'snmp_privprotocol',
        'snmp_securitylevel',
	'stp_enabled',
        'stp_type',
        'stp_mst_region',
        'stp_mst_rev',
	'stp_mst_digest',
        'room',
        'rack',
        'last_updated',
        'date_installed',
	'down_from',
        'down_until',
        'info'
      ],
      brief => ['name', 'product', 'site', 'serialnumber', 'inventorynumber', 'snmp_target' ]
    }
  },
  DeviceAttr => {
    table_db_name => 'deviceattr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of this attribute',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'DeviceAttrName'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      device => {
        default => '',
        description => 'Device to which this attribute is assigned',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      value => {
        default => '',
        description => 'Value for this attribute',
        length => '255',
        nullable => 0,
        tag => 'Value',
        type => 'varchar'
      }
    },
    description => 'A Device Attribute',
    has_history => 0,
    index => [
      [
        'device'
      ],
    ],
    isjoin => '0',
    label => [
      'name',
      'value',
      'device',
    ],
    primary_key => 'id',
    unique => [ ['name', 'device'] ],
    views => {
      all => [
        'name',
        'value',
        'device'
      ],
      brief => [
        'name',
        'value',
        'device'
      ]
    }
  },
  DeviceAttrName => {
    table_db_name => 'deviceattrname',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'A Device Attributes Name',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  DeviceModule => {
    table_db_name => 'devicemodule',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      class => {
        default => '',
        description => 'Module Class',
        length => '128',
        nullable => 1,
        tag => 'Class',
        type => 'varchar'
      },
      date_installed => {
        default => '1970-01-02 00:00:01',
        description => 'Date when this module was installed/discovered',
        length => '',
        nullable => 0,
        tag => 'First Discovered',
        type => 'timestamp'
      },
      description => {
        default => '',
        description => 'A textual description of physical entity',
        length => '255',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      device => {
        default => '',
        description => 'Device where this Module belongs',
        length => '',
        linksto => {
          cascade => 'Delete',
	  order_by => 'contained_in,pos,number',
          method => 'modules',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      fw_rev => {
        default => '',
        description => 'The vendor-specific firmware revision string for the physical entity',
        length => '128',
        nullable => 1,
        tag => 'Firmware Revision',
        type => 'varchar'
      },
      fru => {
        default => '',
        description => 'Whether or not this physical entity is considered a "Field Replaceable Unit" by the vendor.',
        length => '',
        nullable => 0,
        tag => 'FRU?',
        type => 'bool'
      },
      hw_rev => {
        default => '',
        description => 'The vendor-specific hardware revision string for the physical entity',
        length => '128',
        nullable => 1,
        tag => 'Hardware Revision',
        type => 'varchar'
      },
      name => {
        default => '',
        description => 'The textual name of the physical entity',
        length => '128',
        nullable => 1,
        tag => 'Name',
        type => 'varchar'
      },
      number => {
        default => '',
        description => 'Module index number',
        length => '',
        nullable => 0,
        tag => 'Number',
        type => 'integer'
      },
      model => {
        default => '',
        description => 'The vendor-specific model name identifier string associated with this physical component',
        length => '128',
        nullable => 1,
        tag => 'Model',
        type => 'varchar'
      },
      contained_in => {
        default => '',
        description => 'The number for the physical entity which "contains" this physical entity',
        length => '',
        nullable => 1,
        tag => 'Contained In',
        type => 'integer'
      },
      pos => {
        default => '',
        description => 'An indication of the relative position of this child component among all its sibling components',
        length => '',
        nullable => 1,
        tag => 'Position',
        type => 'integer'
      },
      serialnumber => {
        default => '',
        description => 'The vendor-specific serial number string for the physical entity',
        length => '128',
        nullable => 1,
        tag => 'S/N',
        type => 'varchar'
      },
      inventorynumber => {
        default => '',
        description => 'A number given to this Module by the organization for accounting/inventory purposes',
        length => '64',
        nullable => 1,
        tag => 'Inventory',
        type => 'varchar'
      },
      maint_contract => {
        default => '',
        description => 'Reference to a maintenance or support contract with hardware vendor or third party.',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'modules',
          table => 'MaintContract'
        },
        nullable => 0,
        tag => 'Maint Contract',
        type => 'integer'
      },
      maint_from => {
        default => '',
        description => 'Module covered in maintenance from this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Maint Start',
        type => 'date'
      },
      maint_until => {
        default => '',
        description => 'Module covered in maintenance until this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Maint End',
        type => 'date'
      },
      sw_rev => {
        default => '',
        description => 'The vendor-specific software revision string for the physical entity',
        length => '128',
        nullable => 1,
        tag => 'Software Revision',
        type => 'varchar'
      },
      type => {
        default => '',
        description => 'An indication of the vendor-specific hardware type of the physical entity',
        length => '128',
        nullable => 1,
        tag => 'Type',
        type => 'varchar'
      },
      last_updated => {
        default => '1970-01-02 00:00:01',
        description => 'Date when this module was installed/discovered',
        length => '',
        nullable => 0,
        tag => 'Last Updated',
        type => 'timestamp'
      }
    },
    description => 'A Device Physical Entity',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
	'name', 'model', 'device'
    ],
    primary_key => 'id',
    unique => [
      [
        'device',
        'number'
      ]
    ],
    views => {
      all => [
      'device',
      'contained_in',
      'number',
      'pos',
      'name',
      'type',
      'class',
      'description',
      'model',
      'hw_rev',
      'fw_rev',
      'sw_rev',
      'fru',
      'serialnumber',
      'inventorynumber',
      'maint_contract',
      'maint_from',
      'maint_until',
      'date_installed',
      'last_updated',
      ],
      brief => [
	'number',
        'name',
        'class',
        'model',
        'description',
        'serialnumber',
        'inventorynumber',
      ]
    }
  },
  DeviceContacts => {
    table_db_name => 'devicecontacts',
    columns => {
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'devices',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      device => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'contacts',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      }
    },
    description => 'Device to Contactlist join table',
    has_history => 0,
    index => [],
    isjoin => '1',
    label => [
      'contactlist'
    ],
    primary_key => 'id',
    unique => [
      [
        'device',
        'contactlist'
      ]
    ],
    views => {
      all => [
        'device',
        'contactlist'
      ],
      brief => [
        'device',
        'contactlist'
      ]
    }
  },
  DhcpAttr => {
    table_db_name => 'dhcpattr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of this attribute',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'attributes',
          table => 'DhcpAttrName'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      scope => {
        default => '',
        description => 'DHCP scope where this attribute will be applied',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'DhcpScope'
        },
        nullable => 0,
        tag => 'Scope',
        type => 'integer'
      },
      value => {
        default => '',
        description => 'Value for this attribute',
        length => '255',
        nullable => 0,
        tag => 'Value',
        type => 'varchar'
      }
    },
    description => 'A DHCP Attribute or Parameter',
    has_history => 0,
    index => [
      [
        'scope'
      ],
    ],
    isjoin => '0',
    label => [
      'name',
      'value'
    ],
    primary_key => 'id',
    unique => [ ['name', 'scope'] ],
    views => {
      all => [
        'name',
        'value',
        'scope'
      ],
      brief => [
        'name',
        'value',
        'scope'
      ]
    }
  },
  DhcpAttrName => {
    table_db_name => 'dhcpattrname',
    columns => {
      code => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Code',
        type => 'integer'
      },
      format => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Format',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'A DHCP Attributes Name',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'code',
        'format',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  DhcpScope => {
    table_db_name => 'dhcpscope',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      enable_failover => {
        default => '',
        description => 'Enable Failover for this Subnet scope or by default for all Subnet scopes within this Global scope.',
        length => '',
        nullable => 0,
        tag => 'Enable Failover?',
        type => 'bool'
      },
      export_file => {
        default => '',
        description => 'Path and file name to export config to.',
        length => '255',
        nullable => 0,
        tag => 'Export File',
        type => 'varchar'
      },
      failover_peer => {
        default => '',
        description => 'Name of failover peer to assign to pools by default.  Valid in Subnet and Global scopes.  Subnet scope value takes precedence.',
        length => '128',
        nullable => 0,
        tag => 'Failover Peer',
        type => 'varchar'
      },
      text => {
        default => '',
        description => 'The contents of this field will be included in the configuration file.',
        length => '',
        nullable => 1,
        tag => 'Include Text',
        type => 'blob'
      },
      ipblock => {
        default => '',
        description => 'Reference to an IPblock object.  This only applies to host and subnet scopes.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'dhcp_scopes',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'IP block',
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of the Scope.  For example, a host name is the name of a scope of type "host".',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      container => {
        default => '',
        description => 'Reference to the container (parent) scope in the hierarchy.  Global scopes are at the top.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'contained_scopes',
          table => 'DhcpScope'
        },
        nullable => 0,
        tag => 'Container Scope',
        type => 'integer'
      },
      physaddr => {
        default => '',
        description => 'Reference to a MAC object.  Only useful within host scopes.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'dhcp_hosts',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Ethernet',
        type => 'integer'
      },
      type => {
        default => '',
        description => 'Type of this scope.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'scopes',
          table => 'DhcpScopeType'
        },
        nullable => 0,
        tag => 'Type',
        type => 'integer'
      }
    },
    description => 'A DHCP Scope',
    has_history => 0,
    index => [ ['ipblock'], ['type' ], ['physaddr'] ],
    isjoin => '0',
    label => [
      'type',
      'name'
    ],
    primary_key => 'id',
    unique => [ ['name'] ],
    views => {
      all => [
        'name',
        'type',
        'container',
        'ipblock',
        'physaddr',
        'text',
        'enable_failover',
        'failover_peer',
        'export_file',
      ],
      class => [
        'name',
        'type',
        'container',
        'text'
      ],
      global => [
        'name',
        'type',
        'container',
        'text'
      ],
      group => [
        'name',
        'type',
        'container',
        'text'
      ],
      host => [
        'name',
        'type',
        'container',
        'ipblock',
        'physaddr',
        'text'
      ],
      pool => [
        'name',
        'type',
        'container',
        'text'
      ],
      'shared-network' => [
        'name',
        'type',
        'container',
        'text'
      ],
      subclass => [
        'name',
        'type',
        'container',
        'text'
      ],
      subnet => [
        'name',
        'type',
        'ipblock',
        'container',
        'info'
      ],
      brief => [
        'name',
        'type',
      ]
    }
  },
  DhcpScopeUse => {
    table_db_name => 'dhcpscopeuse',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      scope => {
        default => '',
        description => 'DHCP scope where template will be used',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'templates',
          table => 'DhcpScope'
        },
        nullable => 0,
        tag => 'Scope',
        type => 'integer'
      },
      template => {
        default => '',
        description => 'DHCP template scope',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'derived_scopes',
          table => 'DhcpScope'
        },
        nullable => 0,
        tag => 'Template',
        type => 'integer'
      },
    },
    description => 'Relationship between a scopes and scope templates',
    has_history => 0,
    index => [ ['template'] ],
    isjoin => '1',
    label => [ 'scope', 'template' ],
    primary_key => 'id',
    unique => [ ['scope', 'template'] ],
    views => {
      all => ['scope', 'template' ],
      brief => ['scope', 'template']
    }
  },
  DhcpScopeType => {
    table_db_name => 'dhcpscopetype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'The name of this Scope type.',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'A DHCP Scope Type',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Entity => {
    table_db_name => 'entity',
    columns => {
      acctnumber => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Account Number',
        type => 'varchar'
      },
      aliases => {
        default => '',
        description => 'Other names by which this Entity is known',
        length => '255',
        nullable => 1,
        tag => 'Aliases',
        type => 'varchar'
      },
      asname => {
        default => '',
        description => 'The Autonomous System Name of this Peer Entity',
        length => '32',
        nullable => 1,
        tag => 'AS Name',
        type => 'varchar'
      },
      asnumber => {
        default => '',
        description => 'The Autonomous System Number of this Peer Entity',
        length => '',
        nullable => 1,
        tag => 'AS Number',
        type => 'integer'
      },
      availability => {
        default => '',
        description => 'Time Period at which this Entity is available',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'entities',
          table => 'Availability'
        },
        nullable => 0,
        tag => 'Availability',
        type => 'integer'
      },
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'entities',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      maint_contract => {
        default => '',
        description => '',
        length => '128',
        nullable => 1,
        tag => 'Maintenance Contract',
        type => 'varchar'
      },
      name => {
        default => '',
        description => 'Name of this Entity',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      oid => {
        default => '',
        description => 'The Enterprise Object ID is a unique value assigned to an Entity to use in their SNMP agents',
        length => '32',
        nullable => 1,
        tag => 'Enterprise OID',
        type => 'varchar'
      },
      short_name => {
        default => '',
        description => 'A short name for this Entity',
        length => '64',
        nullable => 1,
        tag => 'Short Name',
        type => 'varchar'
      },
    },
    description => 'An organization related to the network in some way',
    has_history => 1,
    index => [
      [
        'oid'
      ],
      [
        'asname'
      ],
      [
        'asnumber'
      ],
    ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'aliases',
        'short_name',
        'availability',
        'contactlist',
        'acctnumber',
        'maint_contract',
        'asname',
        'asnumber',
        'oid',
        'info'
      ],
      brief => [
        'name',
        'short_name',
      ],
      manufacturer => [
        'name',
        'aliases',
        'short_name',
        'type',
        'contactlist',
        'oid',
        'info'
      ],
      peer => [
        'name',
        'aliases',
        'short_name',
        'type',
        'availability',
        'contactlist',
        'asname',
        'asnumber',
        'info'
      ],
      provider => [
        'name',
        'aliases',
        'short_name',
        'type',
        'availability',
        'contactlist',
        'asname',
        'asnumber',
        'info'
      ],
    }
  },
  EntityRole => {
    table_db_name => 'entityrole',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      entity => {
        default => '',
        description => 'The Entity that performs this role.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'roles',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Entity',
        type => 'integer'
      },
      type => {
        default => '',
        description => 'A type of Entity.',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'roles',
          table => 'EntityType'
        },
        nullable => 0,
        tag => 'Type',
        type => 'integer'
      },
    },
    description => 'An Entity might play different roles.  For example, the same Entity can be both a Customer and a Peer.',
    has_history => 0,
    index => [ ],
    isjoin => '1',
    label => [
      'entity', 'type'
    ],
    primary_key => 'id',
    unique => [
      [
        'entity', 'type'
      ]
    ],
    views => {
      all => [
        'entity',
        'type',
      ],
      brief => [
        'entity',
        'type',
      ],
    },
  },
  EntitySite => {
    table_db_name => 'entitysite',
    columns => {
      entity => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'sites',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Entity',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      site => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'entities',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      }
    },
    description => 'Entity to Site join table',
    has_history => 0,
    index => [],
    isjoin => '1',
    label => [
      'entity',
      'site'
    ],
    primary_key => 'id',
    unique => [
      [
        'entity',
        'site'
      ]
    ],
    views => {
      all => [
        'entity',
        'site'
      ],
      brief => [
        'entity',
        'site'
      ]
    }
  },
  EntityType => {
    table_db_name => 'entitytype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Types of Entities',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  FWTable => {
    table_db_name => 'fwtable',
    columns => {
      device => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          order_by => 'tstamp DESC',
          method => 'forwarding_tables',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      tstamp => {
        default => '1970-01-02 00:00:01',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Timestamp',
        type => 'timestamp'
      }
    },
    description => 'Bridge Forwarding Table.  One of these is created every time a Device is queried.  Entries in these tables contain physical addresses and the ports where they have been seen.',
    has_history => 0,
    index => [ ['device'], ['tstamp'] ],
    isjoin => '0',
    label => [
      'tstamp',
      'device'
    ],
    primary_key => 'id',
    unique => [ ['device','tstamp'] ],
    views => {
      all => [
        'tstamp',
        'device'
      ],
      brief => [
        'tstamp',
        'device'
      ]
    }
  },
  FWTableEntry => {
    table_db_name => 'fwtableentry',
    columns => {
      fwtable => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'entries',
          table => 'FWTable'
        },
        nullable => 0,
        tag => 'Table',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      interface => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'fwt_entries',
          table => 'Interface'
        },
        nullable => 0,
        tag => 'Interface',
        type => 'integer'
      },
      physaddr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'fwt_entries',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Physical Address',
        type => 'integer'
      }
    },
    description => 'Bridge Forwarding Table entry',
    has_history => 0,
    index => [ ['fwtable'], ['interface'], ['physaddr'] ],
    isjoin => '0',
    label => [
      'interface',
      'physaddr'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
        'interface',
        'physaddr',
        'fwtable',
      ],
      brief => [
        'interface',
        'physaddr'
      ]
    }
  },
  FiberType => {
    table_db_name => 'fibertype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'A name for this Fiber Type',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Types of Fiber',
    has_history => 0,
    index => [
      [
        'name'
      ]
    ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Floor => {
    table_db_name => 'floor',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      level => {
        default => '',
        description => '',
        length => '32',
        nullable => 0,
        tag => 'Level',
        type => 'varchar'
      },
      site => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'floors',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      }
    },
    description => 'Floor Table',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'level',
      'site'
    ],
    primary_key => 'id',
    unique => [
      [
        'level',
        'site'
      ]
    ],
    views => {
      all => [
        'level',
        'site',
        'info'
      ],
      brief => [
        'level',
        'site'
      ]
    }
  },
  GroupRight => {
    table_db_name => 'groupright',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'access_rights',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      accessright => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'group_rights',
          table => 'AccessRight'
        },
        nullable => 0,
        tag => 'Access Right',
        type => 'integer'
      }
    },
    description => 'Join between a ContactList and its Access Rights',
    has_history => 0,
    index => [ ['accessright'] ],
    isjoin => '1',
    label => [
      'contactlist',
      'accessright'
    ],
    primary_key => 'id',
    unique => [
      [
        'contactlist',
        'accessright'
      ]
    ],
    views => {
      all => [
        'contactlist',
        'accessright'
      ],
      brief => [
        'contactlist',
        'accessright'
      ]
    }
  },
  HorizontalCable => {
    table_db_name => 'horizontalcable',
    columns => {
      account => {
        default => '',
        description => 'An internal account number to which the installation of this cable should be billed to',
        length => '32',
        nullable => 1,
        tag => 'Account',
        type => 'varchar'
      },
      closet => {
        default => '',
        description => 'The communications closet where this cable originates',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'horizontalcables',
          table => 'Closet'
        },
        nullable => 0,
        tag => 'Closet',
        type => 'integer'
      },
      contactlist => {
        default => '',
        description => 'A group of people that manages this cable',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'outlets',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      datetested => {
        default => '',
        description => 'Date this cable was last tested (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Date Tested',
        type => 'date'
      },
      faceplateid => {
        default => '',
        description => 'ID of the faceplate where this cable is terminated',
        length => '64',
        nullable => 0,
        tag => 'Faceplate ID',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      installdate => {
        default => '',
        description => 'Date this cable was installed (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Date Installed',
        type => 'date'
      },
      jackid => {
        default => '',
        description => 'ID of the Jack where this cable is terminated',
        length => '64',
        nullable => 0,
        tag => 'Jack ID',
        type => 'varchar'
      },
      length => {
        default => '',
        description => 'Length of this cable',
        length => '32',
        nullable => 1,
        tag => 'Length',
        type => 'varchar'
      },
      room => {
        default => '',
        description => 'Room where this cable terminates',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'jacks',
          table => 'Room'
        },
        nullable => 0,
        tag => 'Room',
        type => 'integer'
      },
      testpassed => {
        default => '',
        description => 'Cable test result (pass/fail)',
        length => '',
        nullable => 0,
        tag => 'Passed Test?',
        type => 'bool'
      },
      type => {
        default => '',
        description => 'Type of this cable',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'horizontalcables',
          table => 'CableType'
        },
        nullable => 0,
        tag => 'Type',
        type => 'integer'
      }
    },
    description => 'Horizontal Cable',
    has_history => 0,
    index => [
      [
        'account'
      ]
    ],
    isjoin => '0',
    label => [
      'jackid'
    ],
    primary_key => 'id',
    unique => [
      [
        'jackid',
        'faceplateid',
        'closet',
        'room'
      ]
    ],
    views => {
      all => [
        'jackid',
        'faceplateid',
        'type',
        'datetested',
        'testpassed',
        'installdate',
        'length',
        'closet',
        'room',
        'account',
        'contactlist',
        'info'
      ],
      brief => [
        'jackid',
        'closet',
        'room'
      ]
    }
  },
  Interface => {
    table_db_name => 'interface',
    columns => {
      admin_duplex => {
        default => '',
        description => 'Administrative status of the Duplex setting on this Interface',
        length => '16',
        nullable => 1,
        tag => 'Admin Duplex',
        type => 'varchar'
      },
      admin_status => {
        default => '',
        description => 'Administrative status of this Interface',
        length => '16',
        nullable => 1,
        tag => 'Admin Status',
        type => 'varchar'
      },
      auto_dns => {
        default => '',
        description => 'Whether a DNS name should be auto generated for each IP address in this interface',
        length => '',
        nullable => 0,
        tag => 'Auto DNS?',
        type => 'bool'
      },
      bpdu_filter_enabled => {
        default => '',
        description => 'Whether BPDU filter is enabled on this port',
        length => '',
        nullable => 0,
        tag => 'BPDU Filter?',
        type => 'bool'
      },
      bpdu_guard_enabled => {
        default => '',
        description => 'Whether BPDU Guard is enabled on this port',
        length => '',
        nullable => 0,
        tag => 'BPDU Guard?',
        type => 'bool'
      },
      circuit => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'interfaces',
          table => 'Circuit'
        },
        nullable => 0,
        tag => 'Circuit',
        type => 'integer'
      },
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'interfaces',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      description => {
        default => '',
        description => 'A short description for this Interface.',
        length => '128',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      device => {
        default => '',
        description => 'Device to which this Interface belongs to',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'interfaces',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      dlci => {
        default => '',
        description => 'Data Link Connection Identifier',
        length => '64',
        nullable => 1,
        tag => 'DLCI',
        type => 'varchar'
      },
      doc_status => {
        default => '',
        description => 'The documentation status of this interface.  Values: snmp => Discovered by SNMP, manual => Added manually, removed => Was SNMP but it is no longer seen.',
        length => '32',
        nullable => 1,
        tag => 'Doc Status',
        type => 'varchar'
      },
      dp_remote_id => {
        default => '',
        description => 'Discovery Protocol Remote Device ID.',
        length => '128',
        nullable => 1,
        tag => 'DP Remote ID',
        type => 'varchar'
      },
      dp_remote_ip => {
        default => '',
        description => 'Discovery Protocol Remote Device IP address.',
        length => '128',
        nullable => 1,
        tag => 'DP Remote IP',
        type => 'varchar'
      },
      dp_remote_port => {
        default => '',
        description => 'Discovery Protocol Remote Device Port.',
        length => '128',
        nullable => 1,
        tag => 'DP Remote Port',
        type => 'varchar'
      },
      dp_remote_type => {
        default => '',
        description => 'Discovery Protocol Remote Device Type.',
        length => '255',
        nullable => 1,
        tag => 'DP Remote Type',
        type => 'varchar'
      },
      down_from => {
        default => '',
        description => 'Interface in down time from this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Down From',
        type => 'date'
      },
      down_until => {
        default => '',
        description => 'Interface in down time until this date (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Down Until',
        type => 'date'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      ignore_ip => {
        default => '',
        description => 'Ignore IP address information. Netdot will not insert IP addresses or subnets based on information fro this interface.',
        length => '',
        nullable => 0,
        tag => 'Ignore IP?',
        type => 'bool'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      jack => {
        default => '',
        description => 'Reference to a Jack or Cable where this Interface is connected',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'interfaces',
          table => 'HorizontalCable'
        },
        nullable => 0,
        tag => 'Jack',
        type => 'integer'
      },
      jack_char => {
        default => '',
        description => 'The ID of the Jack where this Interface is connected',
        length => '32',
        nullable => 1,
        tag => 'Jack(char)',
        type => 'varchar'
      },
      loop_guard_enabled => {
        default => '',
        description => 'Whether Loop guard is enabled on this port',
        length => '',
        nullable => 0,
        tag => 'Loop Guard?',
        type => 'bool'
      },
      monitored => {
        default => '',
        description => 'Determine whether this Interface should be included in the configuration of an external monitoring software',
        length => '',
        nullable => 0,
        tag => 'Monitored?',
        type => 'bool'
      },
      monitorstatus => {
        default => '',
        description => 'The status of this Interface given by an external monitoring process',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'interfaces',
          table => 'MonitorStatus'
        },
        nullable => 0,
        tag => 'Monitored Status',
        type => 'integer'
      },
      name => {
        default => '',
        description => 'The name of this Interface',
        length => '64',
        nullable => 1,
        tag => 'Name',
        type => 'varchar'
      },
      neighbor => {
        default => '',
        description => 'Another Interface to which this one is physically connected',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'neighbors',
          table => 'Interface'
        },
        nullable => 0,
        tag => 'Neighbor',
        type => 'integer'
      },
      neighbor_fixed => {
        default => 0,
        description => 'Determines whether this link can be modified by automatic topology discovery mechanisms.',
        length => '',
        nullable => 0,
        tag => 'Neighbor Fixed?',
        type => 'bool'
      },
      neighbor_missed => {
        default => 0,
        description => 'Number of times neighbor has not been seen by topology discovery process.  Once MAX_NEIGHBOR_MISSED_TIMES has been reached, the neighbor relationship is removed.',
        length => '',
        nullable => 0,
        tag => 'Neighbor Missed',
        type => 'integer'
      },
      number => {
        default => '',
        description => 'The number of this Interface (usually corresponds to SNMP ifIndex).  In some cases, this value can be a alphanumeric string.',
        length => '64',
        nullable => 0,
        tag => 'Number',
        type => 'varchar'
      },
      oper_duplex => {
        default => '',
        description => 'Operational Duplex setting',
        length => '16',
        nullable => 1,
        tag => 'Oper Duplex',
        type => 'varchar'
      },
      oper_status => {
        default => '',
        description => 'Operational Status of this Interface',
        length => '16',
        nullable => 1,
        tag => 'Oper Status',
        type => 'varchar'
      },
      overwrite_descr => {
        default => '',
        description => 'Determines whether the description for this Interface should be overwritten via SNMP updates',
        length => '',
        nullable => 0,
        tag => 'Overwrite Description?',
        type => 'bool'
      },
      physaddr => {
        default => '',
        description => 'MAC address of this Interface',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'interfaces',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Physical (MAC) Address',
        type => 'integer'
      },
      room_char => {
        default => '',
        description => 'Room number where this Interface is connected',
        length => '32',
        nullable => 1,
        tag => 'Room(char)',
        type => 'varchar'
      },
      root_guard_enabled => {
        default => '',
        description => 'Whether Root guard is enabled on this port',
        length => '',
        nullable => 0,
        tag => 'Root Guard?',
        type => 'bool'
      },
      snmp_managed => {
        default => '',
        description => 'Determines whether this Interface should be included in the collection of SNMP statistics',
        length => '',
        nullable => 0,
        tag => 'SNMP-Managed?',
        type => 'bool'
      },
      speed => {
        default => '',
        description => 'Bits Per Second (bps) speed of which this Interface is capable of',
        length => '',
        nullable => 1,
        tag => 'Speed',
        type => 'integer'
      },
     stp_id => {
        default => '',
        description => 'The ID of this port in the Spanning Tree Protocol (dot1dStpPort)',
        length => '32',
        nullable => 1,
        tag => 'STP Port ID',
        type => 'varchar'
      },
      type => {
        default => '',
        description => 'Type of Interface',
        length => '32',
        nullable => 1,
        tag => 'Type',
        type => 'varchar'
      }
    },
    description => 'An interface associated with a device',
    has_history => 1,
    index => [ ['description'], ['stp_id'], ['physaddr'], ['jack'], ['neighbor'], ['oper_duplex'], ['oper_status'], ['speed'], ['circuit'] ],
    isjoin => '0',
    label => [
      'name',
      'device'
    ],
    primary_key => 'id',
    unique => [ [ 'device', 'number', 'name' ] ],
    views => {
      all => [
        'number',
        'name',
        'device',
        'doc_status',
        'jack',
        'jack_char',
        'room_char',
        'circuit',
        'dlci',
        'description',
        'overwrite_descr',
        'type',
        'speed',
        'admin_duplex',
        'oper_duplex',
        'admin_status',
        'auto_dns',
        'oper_status',
        'monitored',
        'monitorstatus',
        'snmp_managed',
        'physaddr',
	'neighbor',
        'neighbor_fixed',
        'neighbor_missed',
	'stp_id',
	'bpdu_filter_enabled',
	'bpdu_guard_enabled',
	'loop_guard_enabled',
	'root_guard_enabled',
	'ignore_ip',
        'dp_remote_id',
        'dp_remote_ip',
        'dp_remote_port',
        'dp_remote_type',
	'down_from',
        'down_until',
        'contactlist',
        'info'
      ],
      brief => [
        'number',
        'name',
        'device',
        'jack',
        'description',
        'neighbor',
      ]
    }
  },
  InterfaceVlan => {
    table_db_name => 'interfacevlan',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      interface => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'vlans',
          table => 'Interface'
        },
        nullable => 0,
        tag => 'Interface',
        type => 'integer'
      },
     stp_instance => {
        default => '',
        description => 'The Spanning Tree Protocol instance that this port belongs to, for this VLAN',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'stp_ports',
          table => 'STPInstance'
        },
        nullable => 0,
        tag => 'STP Instance',
        type => 'integer'
      },
      stp_des_bridge => {
        default => '',
        description => 'The Bridge ID of the bridge that this port considers to be the Designated Bridge for this segment (dot1dStpPortDesignatedBridge)',
        length => '32',
        nullable => 1,
        tag => 'STP Des. Bridge',
        type => 'varchar'
      },
     stp_des_port => {
        default => '',
        description => 'The Port ID of the port on the Designated Bridge for this segment (dot1dStpPortDesignatedPort)',
        length => '32',
        nullable => 1,
        tag => 'STP Des. Port',
        type => 'varchar'
      },
      stp_state => {
        default => '',
        description => 'The current Spanning Tree State of this port (dot1dStpPortState). It can be one of: 1 - disabled, 2 - blocking, 3 - listening, 4 - learning, 5 - forwarding, 6 - broken',
        length => '32',
        nullable => 1,
        tag => 'STP State',
        type => 'varchar'
      },
      vlan => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'interfaces',
          table => 'Vlan'
        },
        nullable => 0,
        tag => 'Vlan',
        type => 'integer'
      }
    },
    description => 'Interface to VLAN join table',
    has_history => 0,
    index => [ ['stp_instance'],  ['stp_des_bridge'], ['stp_des_port'], ['vlan'] ],
    isjoin => '0',
    label => [
      'interface',
      'vlan'
    ],
    primary_key => 'id',
    unique => [ ['interface', 'vlan' ] ],
    views => {
      all => [
        'interface',
        'vlan',
        'stp_instance',
	'stp_des_bridge',
	'stp_des_port',
	'stp_state',
      ],
      brief => [
        'interface',
        'vlan',
        'stp_instance',
	'stp_des_bridge',
	'stp_des_port',
	'stp_state',
      ]
    }
  },
  IpService => {
    table_db_name => 'ipservice',
    columns => {
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'services',
          table => 'ContactList'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      ip => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'services',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      monitored => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'bool'
      },
      monitorstatus => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'ipservices',
          table => 'MonitorStatus'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      service => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'Ips',
          table => 'Service'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      }
    },
    description => 'A relationship between an IP address and a running Internet service',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'ip',
      'service'
    ],
    primary_key => 'id',
    unique => [
      [
        'ip',
        'service'
      ]
    ],
    views => {
      all => [
        'ip',
        'service',
        'monitored',
        'monitorstatus',
        'contactlist'
      ],
      brief => [
        'ip',
        'service'
      ]
    }
  },
  Ipblock => {
    table_db_name => 'ipblock',
    columns => {
      address => {
        default => '',
        description => 'IP Address.  This value is stored as an integer in the database',
        length => '40,0',
        nullable => 0,
        tag => 'Address',
        type => 'numeric'
      },
      description => {
        default => '',
        description => 'A short description for this IP address or block',
        length => '128',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      first_seen => {
        default => '1970-01-02 00:00:01',
        description => 'Date that this address or block was first seen',
        length => '',
        nullable => 0,
        tag => 'First Seen',
        type => 'timestamp'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Info',
        type => 'blob'
      },
      interface => {
        default => '',
        description => 'Device interface where this address is configured',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'ips',
          table => 'Interface'
        },
        nullable => 0,
        tag => 'Interface',
        type => 'integer'
      },
      last_seen => {
        default => '1970-01-02 00:00:01',
        description => 'Last time when this address or block was seen',
        length => '',
        nullable => 0,
        tag => 'Last Seen',
        type => 'timestamp'
      },
      owner => {
        default => '',
        description => 'Entity that owns this block',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'owned_blocks',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Owner',
        type => 'integer'
      },
      parent => {
        default => '',
        description => 'Smallest IP block that contains this address or block.',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'children',
          order_by => 'address',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'Parent',
        type => 'integer'
      },
      prefix => {
        default => '',
        description => 'Prefix length of this IP block',
        length => '',
        nullable => 0,
        tag => 'Prefix Length',
        type => 'integer'
      },
      status => {
        default => '',
        description => 'Status of this IP block',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'ipblocks',
          table => 'IpblockStatus'
        },
        nullable => 0,
        tag => 'Status',
        type => 'integer'
      },
      used_by => {
        default => '',
        description => 'Entity that uses this block',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'used_blocks',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Used by',
        type => 'integer'
      },
      version => {
        default => '',
        description => 'IP version (4 or 6)',
        length => '',
        nullable => 0,
        tag => 'Version(4/6)',
        type => 'integer'
      },
      vlan => {
        default => '',
        description => 'VLAN to which this subnet is associated',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'subnets',
          table => 'Vlan'
        },
        nullable => 0,
        tag => 'Vlan',
        type => 'integer'
      },
    },
    description => 'An IP (v4 or v6) CIDR block, which can represent both individual addresses and blocks of addresses (subnets, etc).',
    has_history => 0,
    index => [ ['parent'], ['status'], ['first_seen'], ['last_seen'], ['interface'], ['vlan'], ['version'] ],
    isjoin => '0',
    label => [
      'address',
      'prefix'
    ],
    primary_key => 'id',
    unique => [
      [
        'address',
        'prefix'
      ]
    ],
    views => {
      all => [
        'address',
        'prefix',
        'version',
        'parent',
        'interface',
        'vlan',
        'status',
        'owner',
        'used_by',
        'description',
        'first_seen',
        'last_seen',
        'info'
      ],
      brief => [
        'address',
        'prefix',
        'status',
        'used_by',
        'description',
        'last_seen',
      ]
    }
  },
  IpblockAttr => {
    table_db_name => 'ipblockattr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of this attribute',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'IpblockAttrName'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      ipblock => {
        default => '',
        description => 'Ipblock to which this attribute is assigned',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'Ipblock',
        type => 'integer'
      },
      value => {
        default => '',
        description => 'Value for this attribute',
        length => '255',
        nullable => 0,
        tag => 'Value',
        type => 'varchar'
      }
    },
    description => 'An Ipblock Attribute',
    has_history => 0,
    index => [
      [
        'ipblock'
      ],
    ],
    isjoin => '0',
    label => [
      'name',
      'value',
      'ipblock',
    ],
    primary_key => 'id',
    unique => [ ['name', 'ipblock'] ],
    views => {
      all => [
        'name',
        'value',
        'ipblock'
      ],
      brief => [
        'name',
        'value',
        'ipblock'
      ]
    }
  },
  IpblockAttrName => {
    table_db_name => 'ipblockattrname',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'An Ipblock Attributes Name',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  IpblockStatus => {
    table_db_name => 'ipblockstatus',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => undef,
        type => 'varchar'
      }
    },
    description => 'IP block status',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name'
      ],
      brief => [
        'name'
      ]
    }
  },
  MaintContract => {
    table_db_name => 'maintcontract',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      provider => {
        default => '',
        description => 'Maintenace Contract Provider',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'maintenance_contracts',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Provider',
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      number => {
        default => '',
        description => '',
        length => '255',
        nullable => 0,
        tag => 'Number',
        type => 'varchar'
      }
    },
    description => 'Device Maintenance Contract',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => ['provider','number'],
    primary_key => 'id',
    unique => [ ['number'] ],
    views => {
      all => ['number','provider','info'],
      brief => ['number']
    }
  },
  MonitorStatus => {
    table_db_name => 'monitorstatus',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => 'Status',
        type => 'varchar'
      }
    },
    description => 'Status information for what is monitored',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  OUI => {
    table_db_name => 'oui',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      oui => {
        default => '',
        description => 'Organizationally Unique Identifier.  Assigned by the IEEE to Ethernet hardware manufacturers.',
        length => '6',
        nullable => 0,
        tag => 'OUI',
        type => 'varchar'
      },
      vendor => {
        default => '',
        description => 'Manufacturer of Ethernet hardware',
        length => '128',
        nullable => 0,
        tag => 'Vendor',
        type => 'varchar'
      }
    },
    description => 'Organizationally Unique Identifier',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'oui', 'vendor'
    ],
    primary_key => 'id',
    unique => [
      [
        'oui'
      ]
    ],
    views => {
      all => [
        'oui',
        'vendor'
      ],
      brief => [
        'oui' , 'vendor'
      ]
    }
  },
  Person => {
    table_db_name => 'person',
    columns => {
      aliases => {
        default => '',
        description => 'Other names by which this Person is known',
        length => '255',
        nullable => 1,
        tag => 'Aliases',
        type => 'varchar'
      },
      cell => {
        default => '',
        description => 'Cellular Phone number',
        length => '32',
        nullable => 1,
        tag => 'Cell Phone',
        type => 'varchar'
      },
      email => {
        default => '',
        description => 'E-mail address',
        length => '255',
        nullable => 1,
        tag => 'Email',
        type => 'varchar'
      },
      emailpager => {
        default => '',
        description => 'Email address used for paging (via a pager gateway)',
        length => '255',
        nullable => 1,
        tag => 'Pager Email',
        type => 'varchar'
      },
      entity => {
        default => '',
        description => 'The entity that this person works for',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'employees',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Employer',
        type => 'integer'
      },
      extension => {
        default => '',
        description => 'Work Telephone number extension',
        length => '',
        nullable => 1,
        tag => 'Work Phone Extension',
        type => 'integer'
      },
      fax => {
        default => '',
        description => 'Fax number',
        length => '32',
        nullable => 1,
        tag => 'Fax',
        type => 'varchar'
      },
      firstname => {
        default => '',
        description => 'First Name',
        length => '64',
        nullable => 1,
        tag => 'First Name',
        type => 'varchar'
      },
      home => {
        default => '',
        description => 'Home Telephone Number',
        length => '32',
        nullable => 1,
        tag => 'Home Phone',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      lastname => {
        default => '',
        description => 'Last Name',
        length => '64',
        nullable => 0,
        tag => 'Last Name',
        type => 'varchar'
      },
      location => {
        default => '',
        description => 'Site where this Person is located.  The Site is used instead of an Address',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'people',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      },
      office => {
        default => '',
        description => 'Office or Work telephone number',
        length => '32',
        nullable => 1,
        tag => 'Work Phone',
        type => 'varchar'
      },
      password => {
        default => '',
        description => 'User Password.  Not necessary if this person is not a Netdot user.',
        length => '255',
        nullable => 1,
        tag => 'Password',
        type => 'varchar'
      },
      pager => {
        default => '',
        description => 'Pager number',
        length => '32',
        nullable => 1,
        tag => 'Pager',
        type => 'varchar'
      },
      position => {
        default => '',
        description => 'Position within the organization',
        length => '64',
        nullable => 1,
        tag => 'Position',
        type => 'varchar'
      },
      room => {
        default => '',
        description => 'Room where person is located, if available',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'people',
          table => 'Room'
        },
        nullable => 0,
        tag => 'Room',
        type => 'integer'
      },
      user_type => {
        default => '',
        description => 'User type',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'people',
          table => 'UserType'
        },
        nullable => 1,
        tag => 'User Type',
        type => 'integer'
      },
      username => {
        default => '',
        description => 'User name.  Only necessary if this person needs access to Netdot.',
        length => '128',
        nullable => 1,
        tag => 'Username',
        type => 'varchar'
      },
    },
    description => 'Information about an individual',
    has_history => 1,
    index => [
      [
        'email'
      ]
    ],
    isjoin => '0',
    label => [
      'lastname',
      'firstname'
    ],
    primary_key => 'id',
    unique => [[ 'firstname', 'lastname', 'entity'], [ 'username' ]],
    views => {
      all => [
        'lastname',
        'firstname',
        'aliases',
	'username',
	'password',
        'user_type',
        'position',
        'entity',
        'location',
        'room',
        'email',
        'office',
        'extension',
        'cell',
        'home',
        'pager',
        'emailpager',
        'fax',
        'info'
      ],
      brief => [
        'lastname',
        'firstname',
        'office',
        'entity'
      ]
    }
  },
  PhysAddr => {
    table_db_name => 'physaddr',
    columns => {
      address => {
        default => '',
        description => 'A 48 bit MAC address in Hexadecimal digits (with no delimiters)',
        length => '128',
        nullable => 0,
        tag => 'Address',
        type => 'varchar'
      },
      first_seen => {
        default => '1970-01-02 00:00:01',
        description => 'Time when this address was first seen in the network',
        length => '',
        nullable => 0,
        tag => 'First Seen',
        type => 'timestamp'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      last_seen => {
        default => '1970-01-02 00:00:01',
        description => 'Time when this address was last seen in the network',
        length => '',
        nullable => 0,
        tag => 'Last Seen',
        type => 'timestamp'
      },
      static => {
        default => '',
        description => 'If this value is set, the address is considered permanent and should not be removed, even if it has not been seen in the network for a given amount of time',
        length => '',
        nullable => 0,
        tag => 'Static?',
        type => 'bool'
      }
    },
    description => 'A physical or MAC address',
    has_history => 0,
    index => [ ['first_seen' ], ['last_seen'] ],
    isjoin => '0',
    label => [
      'address'
    ],
    primary_key => 'id',
    unique => [
      [
        'address'
      ]
    ],
    views => {
      all => [
        'address',
        'static',
        'first_seen',
        'last_seen'
      ],
      brief => [
        'address',
        'static',
        'first_seen',
        'last_seen'
      ]
    }
  },
  PhysAddrAttr => {
    table_db_name => 'physaddrattr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of this attribute',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'PhysAddrAttrName'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      physaddr => {
        default => '',
        description => 'Physiscal Address to which this attribute is assigned',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'attributes',
          table => 'PhysAddr'
        },
        nullable => 0,
        tag => 'Physical Address',
        type => 'integer'
      },
      value => {
        default => '',
        description => 'Value for this attribute',
        length => '255',
        nullable => 0,
        tag => 'Value',
        type => 'varchar'
      }
    },
    description => 'Custom attributes can be assigned to physical (MAC) addresses',
    has_history => 0,
    index => [
      [
        'physaddr'
      ],
    ],
    isjoin => '0',
    label => [
      'name',
      'value',
      'physaddr',
    ],
    primary_key => 'id',
    unique => [ ['name', 'physaddr'] ],
    views => {
      all => [
        'name',
        'value',
        'physaddr'
      ],
      brief => [
        'name',
        'value',
        'physaddr'
      ]
    }
  },
  PhysAddrAttrName => {
    table_db_name => 'physaddrattrname',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Custom attribute name for physical (MAC) addresses',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Product => {
    table_db_name => 'product',
    columns => {
      description => {
        default => '',
        description => 'A short description for this Product',
        length => '128',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      latest_os => {
        default => '',
        description => 'Recommended OS version',
        length => '128',
        nullable => 1,
        tag => 'Recommended OS',
        type => 'varchar'
      },
      manufacturer => {
        default => '',
        description => 'Reference to an Entity which manufactures this product',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'products',
          table => 'Entity'
        },
        nullable => 0,
        tag => 'Manufacturer',
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Product Name',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      sysobjectid => {
        default => '',
        description => 'SNMP Object ID given to this product by its manufacturer',
        length => '128',
        nullable => 1,
        tag => 'System ID',
        type => 'varchar'
      },
      type => {
        default => '',
        description => 'Product Type. Types of network products include routers, switches, hubs, etc.',
        length => '',
        linksto => {
          cascade => 'Fail',
          method => 'products',
          table => 'ProductType'
        },
        nullable => 0,
        tag => 'Type',
        type => 'integer'
      }
    },
    description => 'Product Names',
    has_history => 1,
    index => [
      [
        'sysobjectid'
      ],
      [
        'type'
      ],
      [
        'latest_os'
      ],
    ],
    isjoin => '0',
    label => ['manufacturer','name'],
    primary_key => 'id',
    unique => [
      [
        'name',
        'manufacturer'
      ]
    ],
    views => {
      all => [
        'name',
        'type',
        'description',
        'sysobjectid',
        'manufacturer',
        'latest_os',
        'info'
      ],
      brief => [
        'name',
        'type',
        'description',
        'manufacturer'
      ]
    }
  },
  ProductType => {
    table_db_name => 'producttype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Types of network devices',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  RR => {
    table_db_name => 'rr',
    columns => {
      active => {
        default => '',
        description => 'Should this record be included in the Zone files generated by Netdot?',
        length => '',
        nullable => 0,
        tag => 'Active?',
        type => 'bool'
      },
      auto_update => {
        default => '',
        description => 'Determines whether this record can be updated by an automated process.  For example, if a Device Interface changes its name and the change is picked up by an SNMP update',
        length => '',
        nullable => 0,
        tag => 'Auto Update?',
        type => 'bool'
      },
      expiration => {
        default => '',
        description => 'Expiration Date for this Record (YYYY-MM-DD)',
        length => '',
        nullable => 1,
        tag => 'Expiration Date',
        type => 'date'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'The identifier for this Record',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      zone => {
        default => '',
        description => 'Zone or Domain to which this record belongs',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'records',
          table => 'Zone'
        },
        nullable => 0,
        tag => 'Zone',
        type => 'integer'
      }
    },
    description => 'DNS Resource Record. Also known as the "owner", this object in Netdot groups all the records with the same name.',
    has_history => 0,
    index => [ ['name'], ['expiration'] ],
    isjoin => '0',
    label => [
      'name',
      'zone',
    ],
    primary_key => 'id',
    unique => [ ['zone', 'name'] ],
    views => {
      all => [
        'name',
        'zone',
        'active',
        'auto_update',
        'expiration',
        'info',
      ],
      brief => [
        'name',
        'zone',
      ]
    }
  },
  RRADDR => {
    table_db_name => 'rraddr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      ipblock => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'arecords',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'Ipblock',
        type => 'integer'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'arecords',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'A DNS "A" record makes a connection between a domain name and an IPv4 address.  A "AAAA" record does the same thing, but with IPv6 addresses. A "dual-stack" host can have both an A record and a AAAA record at the same time.',
    has_history => 0,
    index => [ ['ipblock'] ],
    isjoin => '0',
    label => [
      'ipblock',
      'rr'
    ],
    primary_key => 'id',
    unique => [ [ 'rr', 'ipblock' ] ],
    views => {
      all => [
        'ipblock',
        'rr',
        'ttl'
      ],
      brief => [
        'rr',
        'ipblock',
      ]
    }
  },
  RRCNAME => {
    table_db_name => 'rrcname',
    columns => {
      rr => {
        default => '',
        description => 'Alias Name',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'cnames',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Alias',
        type => 'integer'
      },
      cname => {
        default => '',
        description => 'A domain-name which specifies the canonical or primary name for the owner.',
        length => '128',
        nullable => 0,
        tag => 'CNAME',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'DNS CNAME records map an alias or nickname to the real or Canonical name which may lie outside the current zone. Canonical means expected or real name.',
    has_history => 0,
    index => [ ['cname'] ],
    isjoin => '0',
    label => [
      'rr',
      'cname'
    ],
    primary_key => 'id',
    unique => [ [ 'rr' ] ],
    views => {
      all => [
        'rr',
        'cname',
        'ttl'
      ],
      brief => [
        'rr',
        'cname'
      ]
    }
  },
  RRDS => {
    table_db_name => 'rrds',
    columns => {
      algorithm => {
        default => '',
        description => 'The Algorithm field lists the algorithm number of the DNSKEY RR referred to by the DS record. The algorithm number used by the DS RR is identical to the algorithm number used by RRSIG and DNSKEY RRs.',
        length => '',
        nullable => 0,
        tag => 'Algorithm',
        type => 'integer'
      },
      digest => {
        default => 'The digest is calculated by concatenating the canonical form of the fully qualified owner name of the DNSKEY RR with the DNSKEY RDATA, and then applying the digest algorithm.',
        description => 'Digest',
        length => '255',
        nullable => 0,
        tag => 'Digest',
        type => 'varchar'
      },
      digest_type => {
        default => '',
        description => 'The DS RR refers to a DNSKEY RR by including a digest of that DNSKEY RR.  The Digest Type field identifies the algorithm used to construct the digest.',
        length => '',
        nullable => 0,
        tag => 'Digest Type',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      key_tag => {
        default => '',
        description => 'The Key Tag field lists the key tag of the DNSKEY RR referred to by the DS record, in network byte order.',
        length => '',
        nullable => 0,
        tag => 'Key Tag',
        type => 'integer'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'ds_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
      default => '',
      description => 'Record TTL',
      length => '32',
      nullable => 1,
      tag => 'TTL',
      type => 'varchar'
      }
  },
    description => 'The DS Resource Record refers to a DNSKEY RR and is used in the DNS DNSKEY authentication process.  A DS RR refers to a DNSKEY RR by storing the key tag, algorithm number, and a digest of the DNSKEY RR.',
    has_history => 0,
    index => [ ['key_tag'] ],
    isjoin => '0',
    label => [
      'rr',
      'key_tag',
    ],
    primary_key => 'id',
    unique => [
      [
        'rr',
        'key_tag'
      ]
    ],
    views => {
      all => [
        'rr',
        'ttl',
        'key_tag',
        'algorithm',
        'digest_type',
        'digest',
      ],
      brief => [
        'rr',
        'ttl',
        'key_tag',
        'algorithm',
        'digest_type',
        'digest',
      ]
    }
  },
  RRHINFO => {
    table_db_name => 'rrhinfo',
    columns => {
      cpu => {
        default => '',
        description => 'Central Processing Unit',
        length => '32',
        nullable => 0,
        tag => 'CPU',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      os => {
        default => '',
        description => 'Operating System',
        length => '32',
        nullable => 0,
        tag => 'OS',
        type => 'varchar'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'hinfo_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'DNS HINFO records are used to acquire general information about a host.  The main use is for protocols such as FTP that can use special procedures when talking between machines or operating systems of the same type.  These may also be useful just for inventory purposes.  Publishing HINFO records may pose a security risk, thus Netdot administrators may choose not to include these records when exporting zone data',
    has_history => 0,
    index => [
      [
        'rr'
      ]
    ],
    isjoin => '0',
    label => [
      'cpu',
      'os',
      'rr'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
        'cpu',
        'os',
        'rr',
        'ttl'
      ],
      brief => [
        'cpu',
        'os',
        'rr'
      ]
    }
  },
  RRLOC => {
    table_db_name => 'rrloc',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'loc_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      },
      size => {
        default => '',
        description => 'The diameter of a sphere enclosing the described entity.',
        length => '32',
        nullable => 1,
        tag => 'Size',
        type => 'varchar'
      },
      horiz_pre => {
        default => '',
        description => 'The horizontal precision of the data, in centimeters, expressed using the same representation as SIZE',
        length => '32',
        nullable => 1,
        tag => 'Horizontal Precision',
        type => 'varchar'
      },
      vert_pre => {
        default => '',
        description => 'The vertical precision of the data, in centimeters, expressed using the same representation as SIZE',
        length => '32',
        nullable => 1,
        tag => 'Vertical Precision',
        type => 'varchar'
      },
      latitude => {
        default => '',
        description => 'The latitude of the center of the sphere described by SIZE, in thousandths of a second of arc. 2**31 represents the equator; numbers above that are north latitude.',
        length => '',
        nullable => 0,
        tag => 'Latitude',
        type => 'integer unsigned'
      },
      longitude => {
        default => '',
        description => 'The longitude of the center of the sphere described by SIZE, in thousandths of a second of arc. 2**31 represents the prime meridian; numbers above that are east longitude.',
        length => '',
        nullable => 0,
        tag => 'Longitude',
        type => 'integer unsigned'
      },
      altitude => {
        default => '',
        description => 'The altitude of the center of the sphere described by SIZE, in centimeters, from a base of 100,000m below the WGS 84 reference spheroid used by GPS.',
        length => '',
        nullable => 0,
        tag => 'Altitude',
        type => 'integer unsigned'
      },
    },
    description => 'Location Information. See RFC1876',
    has_history => 0,
    index => [[]],
    isjoin => '0',
    label => [
      'rr'
    ],
    primary_key => 'id',
    unique => [['rr']],
    views => {
      all => [
        'rr',
        'size',
        'horiz_pre',
        'vert_pre',
        'latitude',
        'longitude',
        'altitude',
      ],
      brief => [
        'rr',
        'latitude',
        'longitude',
        'altitude',
      ]
    }
  },
  RRMX => {
    table_db_name => 'rrmx',
    columns => {
      exchange => {
        default => '',
        description => 'A domain-name which specifies a host willing to act as a mail exchange for the owner name. The host name must map directly to one or more address records (A, or AAAA) in the DNS, and must not point to any CNAME records.',
        nullable => 0,
        tag => 'Exchange',
        type => 'varchar',
        length => '255',
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      preference => {
        default => 0,
        description => 'A 16 bit integer which specifies the preference given to this RR among others at the same owner.  Lower values are preferred.',
        length => '',
        nullable => 0,
        tag => 'Preference',
        type => 'integer'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'mx_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'A mail exchanger record (MX record) is a type of resource record in the Domain Name System that specifies a mail server responsible for accepting email messages on behalf of a recipient\'s domain and a preference value used to prioritize mail delivery if multiple mail servers are available. The set of MX records of a domain name specifies how email should be routed with the Simple Mail Transfer Protocol.',
    has_history => 0,
    index => [ ['exchange'] ],
    isjoin => '0',
    label => [
      'preference',
      'exchange',
      'rr'
    ],
    primary_key => 'id',
    unique => [
      [
        'rr',
        'exchange'
      ]
    ],
    views => {
      all => [
        'preference',
        'exchange',
        'rr',
        'ttl'
      ],
      brief => [
        'preference',
        'exchange',
        'rr'
      ]
    }
  },
  RRNAPTR => {
    table_db_name => 'rrnaptr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      flags => {
        default => '',
        description => 'A <character-string> containing flags to control aspects of the rewriting and interpretation of the fields in the record.  Flags are single characters from the set A-Z and 0-9.  The case of the alphabetic characters is not significant.  The field can be empty.',
        length => '1',
        nullable => 1,
        tag => 'Flags',
        type => 'varchar'
      },
      order_field => {
        default => 0,
        description => 'A 16-bit unsigned integer specifying the order in which the NAPTR records MUST be processed in order to accurately represent the ordered list of Rules.  The ordering is from lowest to highest.',
        length => '',
        nullable => 0,
        tag => 'Order',
        type => 'integer'
      },
      preference => {
        default => 0,
        description => 'A 16-bit unsigned integer that specifies the order in which NAPTR records with equal Order values SHOULD be processed, low numbers being processed before high numbers',
        length => '',
        nullable => 0,
        tag => 'Preference',
        type => 'integer'
      },
      regexpr => {
        default => '',
        description => 'A <character-string> containing a substitution expression that is applied to the original string held by the client in order to construct the next domain name to lookup.  See the DDDS Algorithm specification for the syntax of this field',
        length => '255',
        nullable => 0,
        tag => 'Regexp',
        type => 'varchar'
      },
      replacement => {
        default => '',
        description => 'A <domain-name> which is the next domain-name to query for depending on the potential values found in the flags field.  This field is used when the regular expression is a simple replacement operation.  Any value in this field MUST be a fully qualified domain-name',
        length => '255',
        nullable => 0,
        tag => 'Replacement',
        type => 'varchar'
      },
      services => {
        default => '',
        description => 'A <character-string> that specifies the Service Parameters applicable to this this delegation path.  It is up to the Application Specification to specify the values found in this field.',
        length => '255',
        nullable => 0,
        tag => 'Services',
        type => 'varchar'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'naptr_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'Naming Authority Pointer (NAPTR) Resource Record (RFC3403)',
    has_history => 0,
    index => [ ['rr'], ['services'] ],
    isjoin => '0',
    label => [
      'rr',
      'services',
      'regexpr',
      'replacement',
    ],
    primary_key => 'id',
    unique => [[ ]],
    views => {
      all => [
        'order_field',
        'preference',
        'flags',
        'services',
        'regexpr',
        'replacement',
        'rr',
        'ttl'
      ],
      brief => [
      'rr',
      'services',
      'regexpr',
      'replacement',
      ]
    }
  },
  RRNS => {
    table_db_name => 'rrns',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      nsdname => {
        default => '',
        description => 'A domain-name which specifies a host which should be authoritative for the specified class and domain.',
        length => '255',
        nullable => 0,
        tag => 'Name Server',
        type => 'varchar'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'ns_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'DNS NS Record',
    has_history => 0,
    index => [ ['nsdname'] ],
    isjoin => '0',
    label => [
      'nsdname',
      'rr'
    ],
    primary_key => 'id',
    unique => [
      [
        'rr',
        'nsdname'
      ]
    ],
    views => {
      all => [
        'nsdname',
        'rr',
        'ttl'
      ],
      brief => [
        'nsdname',
        'rr'
      ]
    }
  },
  RRPTR => {
    table_db_name => 'rrptr',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      ipblock => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'ptr_records',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'IP',
        type => 'integer'
      },
      ptrdname => {
        default => '',
        description => 'A domain-name which points to some location in the domain name space.',
        length => '255',
        nullable => 0,
        tag => 'Domain Name',
        type => 'varchar'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'ptr_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      }
    },
    description => 'A PTR record is the reverse of an A record. That is, it maps an IP address to a hostname, rather than vice versa.',
    has_history => 0,
    index => [ ['ipblock'], ['rr'], ],
    isjoin => '0',
    label => [
      'rr',
      'ipblock',
      'ptrdname'
    ],
    primary_key => 'id',
    unique => [
      [
        'ptrdname',
        'ipblock'
      ]
    ],
    views => {
      all => [
        'rr',
        'ipblock',
        'ptrdname',
        'ttl'
      ],
      brief => [
        'rr',
        'ipblock',
        'ptrdname'
      ]
    }
  },
  RRSRV => {
    table_db_name => 'rrsrv',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      rr => {
        default => '',
        description => 'The domain this SRV record refers to.',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'srv_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Name',
        type => 'integer'
      },
      port => {
        default => '',
        description => 'The port on this target host of this service.  The range is 0-65535',
        length => '',
        nullable => 0,
        tag => 'Port',
        type => 'integer'
      },
      priority => {
        default => '0',
        description => 'The priority of this target host.  A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; target hosts with the same priority SHOULD be tried in an order defined by the weight field.  The range is 0-65535',
        length => '',
        nullable => 0,
        tag => 'Priority',
        type => 'integer'
      },
      target => {
        default => '',
        description => 'The domain name of the target host.  There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181)',
        length => '255',
        nullable => 0,
        tag => 'Target',
        type => 'varchar'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      },
      weight => {
        default => '0',
        description => 'A server selection mechanism.  The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected. The range of this number is 0-65535',
        length => '',
        nullable => 0,
        tag => 'Weight',
        type => 'integer'
      }
    },
    description => 'DNS SRV Record (RFC 2782)',
    has_history => 0,
    index => [ ['target'] ],
    isjoin => '0',
    label => [
      'rr',
      'target',
    ],
    primary_key => 'id',
    unique => [ ['rr', 'port', 'target'] ],
    views => {
      all => [
        'rr',
        'ttl',
        'priority',
        'weight',
        'port',
        'target'
      ],
      brief => [
        'rr',
        'priority',
        'weight',
        'port',
        'target'
      ]
    }
  },
  RRTXT => {
    table_db_name => 'rrtxt',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      rr => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'txt_records',
          table => 'RR'
        },
        nullable => 0,
        tag => 'Resource Record',
        type => 'integer'
      },
      ttl => {
        default => '',
        description => 'Record TTL',
        length => '32',
        nullable => 1,
        tag => 'TTL',
        type => 'varchar'
      },
      txtdata => {
        default => '',
        description => 'One or more character-strings',
        length => '255',
        nullable => 1,
        tag => 'Text',
        type => 'varchar'
      }
    },
    description => 'DNS TXT records are used to hold descriptive text.  The semantics of the text depends on the domain where it is found.',
    has_history => 0,
    index => [[ 'rr' ], ['txtdata']],
    isjoin => '0',
    label => [
      'txtdata',
      'rr'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
        'txtdata',
        'rr',
        'ttl'
      ],
      brief => [
        'txtdata',
        'rr'
      ]
    }
  },
  Room => {
    table_db_name => 'room',
    columns => {
      floor => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'rooms',
          table => 'Floor'
        },
        nullable => 0,
        tag => 'Floor',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'Number',
        type => 'varchar'
      }
    },
    description => 'Room',
    has_history => 0,
    index => [
      [
        'name'
      ],
      [
        'floor'
      ]
    ],
    isjoin => '0',
    label => [
      'floor', 'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name',
        'floor'
      ]
    ],
    views => {
      all => [
        'name',
        'floor'
      ],
      brief => [
        'name',
        'floor'
      ]
    }
  },
  Service => {
    table_db_name => 'service',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'An Internet service',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  Site => {
    table_db_name => 'site',
    columns => {
      aliases => {
        default => '',
        description => 'Alternative names for this site',
        length => '255',
        nullable => 1,
        tag => 'Aliases',
        type => 'varchar'
      },
      availability => {
        default => '',
        description => 'Time Period during which people at this Site will be available',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'sites',
          table => 'Availability'
        },
        nullable => 0,
        tag => 'Availability',
        type => 'integer'
      },
      city => {
        default => '',
        description => 'City where this Site is located',
        length => '64',
        nullable => 1,
        tag => 'City',
        type => 'varchar'
      },
      contactlist => {
        default => '',
        description => 'List of contacts for this Site',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'sites',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      country => {
        default => '',
        description => 'Country where this Site is located',
        length => '64',
        nullable => 1,
        tag => 'Country',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'User Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Name given to this site',
        length => '64',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      number => {
        default => '',
        description => 'A unique identifier for this Site within the organization',
        length => '64',
        nullable => 1,
        tag => 'Site ID',
        type => 'varchar'
      },
      pobox => {
        default => '',
        description => 'Post Office Box',
        length => '32',
        nullable => 1,
        tag => 'P.O. Box',
        type => 'varchar'
      },
      state => {
        default => '',
        description => 'State where this Site is located',
        length => '32',
        nullable => 1,
        tag => 'State',
        type => 'varchar'
      },
      street1 => {
        default => '',
        description => 'Street 1st line',
        length => '128',
        nullable => 1,
        tag => 'Street (1)',
        type => 'varchar'
      },
      street2 => {
        default => '',
        description => 'Street 2nd line',
        length => '128',
        nullable => 1,
        tag => 'Street (2)',
        type => 'varchar'
      },
      zip => {
        default => '',
        description => 'ZIP/Postal Code',
        length => '16',
        nullable => 1,
        tag => 'Zip/Postal Code',
        type => 'varchar'
      }
    },
    description => 'A physical location such as a building or data center.',
    has_history => 1,
    index => [
      [
        'street1'
      ],
      [
        'name'
      ],
      [
        'number'
      ]
    ],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ],
    ],
    views => {
      all => [
        'name',
        'number',
        'aliases',
        'street1',
        'street2',
        'pobox',
        'city',
        'state',
        'zip',
        'country',
        'availability',
        'contactlist',
        'info'
      ],
      brief => [
        'name',
        'number',
        'street1',
        'city'
      ]
    }
  },
  SiteSubnet => {
    table_db_name => 'sitesubnet',
    columns => {
      site => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'subnets',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      subnet => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'sites',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'Subnet',
        type => 'integer'
      }
    },
    description => 'Site to Subnet join table',
    has_history => 0,
    index => [],
    isjoin => '1',
    label => [
      'subnet',
      'site'
    ],
    primary_key => 'id',
    unique => [
      [
        'subnet',
        'site'
      ]
    ],
    views => {
      all => [
        'subnet',
        'site'
      ],
      brief => [
        'subnet',
        'site'
      ]
    }
  },
  STPInstance => {
    table_db_name => 'stpinstance',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      number => {
        default => '',
        description => 'STP Instance number',
        length => '',
        nullable => 1,
        tag => 'Number',
        type => 'integer'
      },
      device => {
        default => '',
        description => 'Device where this STP instance exists',
        length => '',
        linksto => {
          cascade => 'Delete',
          order_by => 'number',
          method => 'stp_instances',
          table => 'Device'
        },
        nullable => 0,
        tag => 'Device',
        type => 'integer'
      },
      root_bridge => {
        default => '',
        description => 'Root bridge MAC Address',
        length => '12',
        nullable => 1,
        tag => 'Root Bridge',
        type => 'varchar'
      },
      bridge_priority => {
        default => '',
        description => 'Bridge priority',
        length => '',
        nullable => 1,
        tag => 'Bridge Priority',
        type => 'integer'
      },
      root_port => {
        default => '',
        description => 'Root port (ifIndex) for this STP instance',
        length => '',
        nullable => 0,
        tag => 'Root Port',
        type => 'integer'
      },
    },
    description => 'Spanning Tree Protocol Instance',
    has_history => 0,
    index => [
      [
        'root_bridge'
      ],
    ],
    isjoin => '0',
    label => [
      'number',
      'device'
    ],
    primary_key => 'id',
    unique => [
      [
        'device',
        'number'
      ]
    ],
    views => {
      all => [
        'number',
        'device',
        'root_port',
        'root_bridge',
        'bridge_priority',
      ],
      brief => [
        'number',
        'device',
        'root_port',
        'root_bridge',
        'bridge_priority',
      ]
    }
  },
  ClosetPicture => {
    table_db_name => 'closetpicture',
    columns => {
      bindata => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Picture',
        type => 'longblob'
      },
      closet => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'pictures',
          table => 'Closet'
        },
        nullable => 0,
        tag => 'Closet',
        type => 'integer'
      },
      filename => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Name',
        type => 'varchar'
      },
      filesize => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Size',
        type => 'varchar'
      },
      filetype => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Type',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
    },
    description => 'A Closet Picture.  Pictures are stored in the database in binary format.',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'filename'
    ],
    primary_key => 'id',
    unique => [
      [
        'filename', 'closet'
      ]
    ],
    views => {
      all => [
        'filename',
        'filesize',
        'filetype',
        'bindata',
        'closet',
        'info',
      ],
      brief => [
        'filename',
        'filetype',
        'info',
      ]
    }
  },
  FloorPicture => {
    table_db_name => 'floorpicture',
    columns => {
      bindata => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Picture',
        type => 'longblob'
      },
      floor => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'pictures',
          table => 'Floor'
        },
        nullable => 0,
        tag => 'Floor',
        type => 'integer'
      },
      filename => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Name',
        type => 'varchar'
      },
      filesize => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Size',
        type => 'varchar'
      },
      filetype => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Type',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
    },
    description => 'A Floor Picture.  Pictures are stored in the database in binary format.',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'filename'
    ],
    primary_key => 'id',
    unique => [
      [
        'filename', 'floor'
      ]
    ],
    views => {
      all => [
        'filename',
        'filesize',
        'filetype',
        'bindata',
        'floor',
        'info',
      ],
      brief => [
        'filename',
        'filetype',
        'info',
      ]
    }
  },
  SitePicture => {
    table_db_name => 'sitepicture',
    columns => {
      bindata => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'Picture',
        type => 'longblob'
      },
      site => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'pictures',
          table => 'Site'
        },
        nullable => 0,
        tag => 'Site',
        type => 'integer'
      },
      filename => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Name',
        type => 'varchar'
      },
      filesize => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Size',
        type => 'varchar'
      },
      filetype => {
        default => '',
        description => '',
        length => '64',
        nullable => 0,
        tag => 'File Type',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => 'Comments',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
    },
    description => 'A Site Picture.  Pictures are stored in the database in binary format.',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'filename'
    ],
    primary_key => 'id',
    unique => [
      [
        'filename', 'site'
      ]
    ],
    views => {
      all => [
        'filename',
        'filesize',
        'filetype',
        'bindata',
        'site',
        'info',
      ],
      brief => [
        'filename',
        'filetype',
        'info',
      ]
    }
  },
  Splice => {
    table_db_name => 'splice',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => undef,
        type => 'blob'
      },
      strand1 => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'splices',
          table => 'CableStrand'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      strand2 => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'splices2',
          table => 'CableStrand'
        },
        nullable => 0,
        tag => undef,
        type => 'integer'
      }
    },
    description => 'Cable Splices',
    has_history => 0,
    index => [
      [
        'strand1'
      ],
      [
        'strand2'
      ]
    ],
    isjoin => '0',
    label => [
      'strand1',
      'strand2'
    ],
    primary_key => 'id',
    unique => [],
    views => {
      all => [
        'strand1',
        'strand2'
      ],
      brief => [
        'strand1',
        'strand2'
      ]
    }
  },
  StrandStatus => {
    table_db_name => 'strandstatus',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => undef,
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => undef,
        type => 'varchar'
      }
    },
    description => 'Cable strand/pair status',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name'
      ],
      brief => [
        'name'
      ]
    }
  },
  SubnetZone => {
    table_db_name => 'subnetzone',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      subnet => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'zones',
          table => 'Ipblock'
        },
        nullable => 0,
        tag => 'Subnet',
        type => 'integer'
      },
      zone => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'subnets',
          table => 'Zone'
        },
        nullable => 0,
        tag => 'Zone',
        type => 'integer'
      }
    },
    description => 'IP Subnet to DNS Zone join table',
    has_history => 0,
    index => [],
    isjoin => '1',
    label => [
      'subnet',
      'zone'
    ],
    primary_key => 'id',
    unique => [
      [
        'subnet',
        'zone'
      ]
    ],
    views => {
      all => [
        'subnet',
        'zone'
      ],
      brief => [
        'subnet',
        'zone'
      ]
    }
  },
  UserType => {
    table_db_name => 'usertype',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => '',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      }
    },
    description => 'Types of Netdot users',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'info'
      ],
      brief => [
        'name'
      ]
    }
  },
  UserRight => {
    table_db_name => 'userright',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      person => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'access_rights',
          table => 'Person'
        },
        nullable => 0,
        tag => 'User',
        type => 'integer'
      },
      accessright => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'user_rights',
          table => 'AccessRight'
        },
        nullable => 0,
        tag => 'Access Right',
        type => 'integer'
      }
    },
    description => 'Join between a Person and his/her Access Rights',
    has_history => 0,
    index => [ ['accessright'] ],
    isjoin => '1',
    label => [
      'person',
      'accessright'
    ],
    primary_key => 'id',
    unique => [
      [
        'person',
        'accessright'
      ]
    ],
    views => {
      all => [
        'person',
        'accessright'
      ],
      brief => [
        'person',
        'accessright'
      ]
    }
  },
  Vlan => {
    table_db_name => 'vlan',
    columns => {
      description => {
        default => '',
        description => '',
        length => '255',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      vlangroup => {
        default => '',
        description => 'VLAN group to which this VLAN belongs',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'vlans',
          table => 'VlanGroup'
        },
        nullable => 0,
        tag => 'Group',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'Human-defined Name for this VLAN',
        length => '255',
        nullable => 1,
        tag => 'Name',
        type => 'varchar'
      },
      vid => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => 'VLAN ID',
        type => 'integer'
      }
    },
    description => 'A Virtual LAN',
    has_history => 0,
    index => [
      [ 'vlangroup' ],
    ],
    isjoin => '0',
    label => [
      'vid', 
    ],
    primary_key => 'id',
    unique => [
      [
        'vid',
      ]
    ],
    views => {
      all => [
        'vid',
        'name',
        'vlangroup',
        'description',
        'info'
      ],
      brief => [
        'vid',
        'name',
        'description'
      ]
    }
  },
  VlanGroup => {
    table_db_name => 'vlangroup',
    columns => {
      description => {
        default => '',
        description => 'A short description for this VlanGroup',
        length => '255',
        nullable => 1,
        tag => 'Description',
        type => 'varchar'
      },
      end_vid => {
        default => '',
        description => 'Last VLAN number',
        length => '',
        nullable => 0,
        tag => 'End',
        type => 'integer'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'A name identifying this VLAN group',
        length => '128',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      start_vid => {
        default => '',
        description => 'First VLAN number',
        length => '',
        nullable => 0,
        tag => 'Start',
        type => 'integer'
      },
    },
    description => 'A Virtual LAN Group',
    has_history => 1,
    index => [],
    isjoin => '0',
    label => [
      'name', 
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'start_vid',
        'end_vid',
        'description',
        'info'
      ],
      brief => [
        'name',
        'description',
        'start_vid',
        'end_vid',
      ]
    }
  },
  ZoneAlias => {
    table_db_name => 'zonealias',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      name => {
        default => '',
        description => 'The zone or domain name',
        length => '128',
        nullable => 0,
        tag => 'Domain Name',
        type => 'varchar'
      },
      zone => {
        default => '',
        description => 'Zone',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'aliases',
          table => 'Zone'
        },
        nullable => 0,
        tag => 'Zone',
        type => 'integer'
      },
    },
    description => 'An alias of an existing zone',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'zone',
        'info'
      ],
      brief => [
        'name',
        'zone',
      ]
    }
  },
  Zone => {
    table_db_name => 'zone',
    columns => {
      active => {
        default => '',
        description => 'Whether a DNS zone file should be generated for this Zone',
        length => '',
        nullable => 0,
        tag => 'Active?',
        type => 'bool'
      },
      contactlist => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Nullify',
          method => 'zones',
          table => 'ContactList'
        },
        nullable => 0,
        tag => 'Contact List',
        type => 'integer'
      },
      default_ttl => {
        default => '',
        description => 'Default TTL to apply to records when exporting the zone file',
        length => '',
        nullable => 0,
        tag => 'Default TTL',
        type => 'integer'
      },
      expire => {
        default => '',
        description => 'A 32 bit time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative.',
        length => '',
        nullable => 0,
        tag => 'Expire',
        type => 'integer'
      },
      export_file => {
        default => '',
        description => 'Path and file name to export records to.',
        length => '255',
        nullable => 0,
        tag => 'Export File',
        type => 'varchar'
      },
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      info => {
        default => '',
        description => '',
        length => '',
        nullable => 1,
        tag => 'Comments',
        type => 'blob'
      },
      minimum => {
        default => '',
        description => 'The unsigned 32 bit minimum TTL field that should be exported with any RR from this zone.',
        length => '',
        nullable => 0,
        tag => 'Minimum',
        type => 'integer unsigned'
      },
      mname => {
        default => '',
        description => 'The domain-name of the name server that was the original or primary source of data for this zone',
        length => '128',
        nullable => 0,
        tag => 'Server Name',
        type => 'varchar'
      },
      name => {
        default => '',
        description => 'The zone or domain name',
        length => '128',
        nullable => 0,
        tag => 'Domain Name',
        type => 'varchar'
      },
      refresh => {
        default => '',
        description => 'A 32 bit time interval before the zone should be refreshed.',
        length => '',
        nullable => 0,
        tag => 'Refresh',
        type => 'integer'
      },
      retry => {
        default => '',
        description => 'A 32 bit time interval that should elapse before a failed refresh should be retried.',
        length => '',
        nullable => 0,
        tag => 'Retry',
        type => 'integer'
      },
      rname => {
        default => '',
        description => 'A <domain-name> which specifies the mailbox of the person responsible for this zone.',
        length => '128',
        nullable => 0,
        tag => 'Mail Box',
        type => 'varchar'
      },
      serial => {
        default => '',
        description => 'The unsigned 32 bit version number of the original copy of the zone.  Zone transfers preserve this value.  This value wraps and should be compared using sequence space arithmetic.',
        length => '',
        nullable => 0,
        tag => 'Serial',
        type => 'integer unsigned'
      }
    },
    description => 'A DNS Zone',
    has_history => 0,
    index => [],
    isjoin => '0',
    label => [
      'name'
    ],
    primary_key => 'id',
    unique => [
      [
        'name'
      ]
    ],
    views => {
      all => [
        'name',
        'mname',
        'rname',
        'serial',
        'refresh',
        'retry',
        'expire',
        'minimum',
        'contactlist',
        'active',
        'export_file',
        'default_ttl',
        'info'
      ],
      brief => [
        'name',
      ]
    }
  },
  HostAudit => {
    table_db_name => 'hostaudit',
    columns => {
      id => {
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      pending => {
        default => '',
        description => 'This flag specifies whether the change is pending or it has been committed.',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'bool'
      },
      scope => {
        default => '',
        description => 'DHCP scope where change happened',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'audit_records',
          table => 'DhcpScope'
        },
        nullable => 0,
        tag => 'DHCP Scope',
        type => 'integer'
      },
      zone => {
        default => '',
        description => '',
        length => '',
        linksto => {
          cascade => 'Delete',
          method => 'audit_records',
          table => 'Zone'
        },
        nullable => 0,
        tag => 'Zone',
        type => 'integer'
      },
      tstamp => {
        default => '1970-01-02 00:00:01',
        description => 'When this change happened',
        length => '',
        nullable => 0,
        tag => 'Timestamp',
        type => 'timestamp'
      },
      user => {
        default => '',
        description => 'User that made the change',
        length => '255',
        nullable => 1,
        tag => 'User',
        type => 'varchar'
      },
      record_type => {
        default => '',
        description => 'Record Type',
        length => '255',
        nullable => 1,
        tag => 'Record Type',
        type => 'varchar'
      },
      operation => {
        default => '',
        description => 'DB Operation (insert, update, delete)',
        length => '255',
        nullable => 1,
        tag => 'Operation',
        type => 'varchar'
      },
      fields => {
        default => '',
        description => 'Fields changed',
        length => '255',
        nullable => 1,
        tag => 'Fields',
        type => 'varchar'
      },
      vals => {
        default => '',
        description => 'Values changed',
        length => '255',
        nullable => 1,
        tag => 'Values',
        type => 'varchar'
      },
    },
    description => 'Zone Record changes',
    has_history => 0,
    index => [ ['zone'], ['scope'], ['user'], ['record_type'], ['pending'] ],
    isjoin => '0',
    label => [
      'zone',
    ],
    primary_key => 'id',
    unique => [ [ ] ],
    views => {
      all => [
        'tstamp',
        'user',
        'zone',
        'scope',
        'record_type',
        'operation',
        'fields',
        'vals',
        'pending',
      ],
      brief => [
        'tstamp',
        'user',
	'zone',
	'scope',
        'operation',
        'record_type',
        'pending',
      ]
    }
  },
  SavedQueries => { 
    table_db_name => 'savedqueries',
    columns => { 
      id => { 
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of the SavedQuery',
        length => '255',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      querytext => {
        default => '',
        description => 'Saved SQL query',
        length => '',
        nullable => 0,
        tag => 'Saved SQL',
        nullable => 0,
        type => 'blob'
      }        
    },
    description => 'Saved SQL queries',
    has_history => '0',
    unique => [ ['name'] ],
    label => [ 'name', 'querytext'  ],
    index => [ ],
    isjoin => '0',
    primary_key => 'id',
    views => { 
      'all' => [
         'name',
         'querytext'
      ],
      brief => [
         'name'
      ]
    } 
  },
  DataCache => { 
    table_db_name => 'datacache',
    columns => { 
      id => { 
        default => '',
        description => '',
        length => '',
        nullable => 0,
        tag => undef,
        type => 'integer'
      },
      name => {
        default => '',
        description => 'Name of the data',
        length => '255',
        nullable => 0,
        tag => 'Name',
        type => 'varchar'
      },
      data => {
        default => '',
        description => 'binary data',
        length => '',
        nullable => 0,
        tag => 'Binary Data',
        nullable => 0,
        type => 'longblob'
      },    
      tstamp => {
        default => '1970-01-02 00:00:01',
        description => 'When this data was cached',
        length => '',
        nullable => 0,
        tag => 'Timestamp',
        type => 'timestamp'
      }
    },
    description => 'Cached data',
    has_history => '0',
    unique => [ ['name'] ],
    label => [ 'name' ],
    index => [ ],
    isjoin => '0',
    primary_key => 'id',
    views => { 
      'all' => [
         'name',
      ],
      brief => [
         'name', 'data',
      ]
    } 
  }   
 }
}
