new tower/sector UI, mapping features, and network monitoring, #37802
[freeside.git] / FS / FS / Schema.pm
index ac58510..66b9a51 100644 (file)
@@ -203,6 +203,7 @@ sub dbdef_dist {
            && ! /^log(_context)?$/
            && ! /^(legacy_cust_history|cacti_page|template_image|access_user_log)$/
            && ( ! /^queue(_arg|_depend|_stat)?$/ || ! $opt->{'queue-no_history'} )
+           && ! /^addr_status$/
            && ! $tables_hashref_torrus->{$_}
          }
       $dbdef->tables
@@ -1361,6 +1362,7 @@ sub tables_hashref {
         'commission_agentnum', 'int', 'NULL', '', '', '', #
         'commission_salesnum', 'int', 'NULL', '', '', '', #
         'commission_pkgnum',   'int', 'NULL', '', '', '', #
+        'commission_invnum',   'int', 'NULL', '', '', '',
         'credbatch',    'varchar', 'NULL', $char_d, '', '',
       ],
       'primary_key'  => 'crednum',
@@ -1396,6 +1398,10 @@ sub tables_hashref {
                             table      => 'cust_pkg',
                             references => [ 'pkgnum' ],
                           },
+                          { columns    => [ 'commission_invnum' ],
+                            table      => 'cust_bill',
+                            references => [ 'invnum' ],
+                          },
                         ],
     },
 
@@ -1417,6 +1423,7 @@ sub tables_hashref {
         'commission_agentnum', 'int', 'NULL', '', '', '',
         'commission_salesnum', 'int', 'NULL', '', '', '',
         'commission_pkgnum',   'int', 'NULL', '', '', '',
+        'commission_invnum',   'int', 'NULL', '', '', '',
         #void fields
         'void_date',  @date_type,                  '', '', 
         'void_reason', 'varchar', 'NULL', $char_d, '', '', 
@@ -1456,6 +1463,10 @@ sub tables_hashref {
                             table      => 'cust_pkg',
                             references => [ 'pkgnum' ],
                           },
+                          { columns    => [ 'commission_invnum' ],
+                            table      => 'cust_bill',
+                            references => [ 'invnum' ],
+                          },
                           { columns    => [ 'void_reasonnum' ],
                             table      => 'reason',
                             references => [ 'reasonnum' ],
@@ -2039,9 +2050,12 @@ sub tables_hashref {
         'district',        'varchar', 'NULL',      20, '', '',
         'censustract',     'varchar', 'NULL',      20, '', '',
         'censusyear',         'char', 'NULL',       4, '', '',
+
+        #used only in... DSL qualification?  .CA DSL qualification?
         'location_type',   'varchar', 'NULL',      20, '', '',
         'location_number', 'varchar', 'NULL',      20, '', '',
         'location_kind',      'char', 'NULL',       1, '', '',
+
         'incorporated',       'char', 'NULL',       1, '', '',
         'disabled',           'char', 'NULL',       1, '', '', 
       ],
@@ -2376,7 +2390,7 @@ sub tables_hashref {
     'cust_pay_pending' => {
       'columns' => [
         'paypendingnum',      'serial',     '',      '', '', '',
-        'custnum',               'int',     '',      '', '', '', 
+        'custnum',               'int', 'NULL',      '', '', '', 
         'paid',            @money_type,                  '', '', 
         'currency',             'char', 'NULL',       3, '', '',
         '_date',            @date_type,                  '', '', 
@@ -4872,7 +4886,8 @@ sub tables_hashref {
         'sector_range', 'decimal', 'NULL',      '', '', '',  #?
         'downtilt',     'decimal', 'NULL',      '', '', '',
         'v_width',          'int', 'NULL',      '', '', '',
-        'margin',       'decimal', 'NULL',     '', '', '',
+        'db_high',          'int', 'NULL',     '', '', '',
+        'db_low',           'int', 'NULL',     '', '', '',
         'image',           'blob', 'NULL',     '', '', '',
         'west',         'decimal', 'NULL', '10,7', '', '',
         'east',         'decimal', 'NULL', '10,7', '', '',
@@ -4889,6 +4904,23 @@ sub tables_hashref {
                         ],
     },
 
+    'sector_coverage' => {
+      'columns' => [
+        'coveragenum', 'serial', '', '', '', '',
+        'sectornum',     'int', '', '', '', '',
+        'db_loss',       'int', '', '', '', '',
+        'geometry',     'text', 'NULL', '', '', '',
+      ],
+      'primary_key' => 'coveragenum',
+      'unique' => [],
+      'index'  => [],
+      'foreign_keys' => [
+                          { columns => [ 'sectornum' ],
+                            table   => 'tower_sector'
+                          },
+                        ],
+    },
+
     'part_virtual_field' => {
       'columns' => [
         'vfieldpart', 'serial', '', '', '', '', 
@@ -5537,6 +5569,10 @@ sub tables_hashref {
         'rated_ratename',         'varchar', 'NULL', $char_d, '', '', 
         'rated_cost',            'decimal', 'NULL',  '10,4', '', '',
 
+        # real endpoints of the call
+        'src_lrn',             'varchar', 'NULL',     '15', '', '',
+        'dst_lrn',             'varchar', 'NULL',     '15', '', '',
+
         'carrierid',               'bigint', 'NULL',      '', '', '',
 
         # service it was matched to
@@ -5599,6 +5635,7 @@ sub tables_hashref {
         'rated_price',  'decimal', 'NULL',  '10,4', '', '',
         'rated_seconds',    'int', 'NULL',      '', '', '',
         'rated_minutes', 'double precision', 'NULL',   '', '', '',
+        'rated_granularity','int', 'NULL',      '', '', '',
         'status',       'varchar', 'NULL',      32, '', '',
         'svcnum',           'int', 'NULL',      '', '', '',
       ],
@@ -7302,6 +7339,7 @@ sub tables_hashref {
         'graphnum',       'int',      'NULL', '', '', '', 
         'imported',       @date_type,             '', '',
         'content',        'text',     'NULL', '', '', '',
+        'thumbnail',      'text',     'NULL', '', '', '',
       ],
       'primary_key' => 'cacti_pagenum',
       'unique'  => [ ],
@@ -7438,6 +7476,72 @@ sub tables_hashref {
                         ],
     },
 
+    'commission_schedule' => {
+      'columns' => [
+        'schedulenum',    'serial',     '',      '', '', '',
+        'schedulename',  'varchar',     '', $char_d, '', '',
+        'reasonnum',         'int', 'NULL',      '', '', '',
+        'basis',         'varchar', 'NULL',      32, '', '',
+      ],
+      'primary_key'  => 'schedulenum',
+      'unique'       => [],
+      'index'        => [],
+    },
+
+    'commission_rate' => {
+      'columns' => [
+        'commissionratenum', 'serial',     '',      '', '', '',
+        'schedulenum',       'int',     '',      '', '', '',
+        'cycle',             'int',     '',      '', '', '',
+        'amount',            @money_type,          '', '', 
+        'percent',           'decimal','',   '7,4', '', '',
+      ],
+      'primary_key'  => 'commissionratenum',
+      'unique'       => [ [ 'schedulenum', 'cycle', ] ],
+      'index'        => [],
+      'foreign_keys' => [
+                          { columns => [ 'schedulenum' ],
+                            table   => 'commission_schedule',
+                          },
+                        ],
+    },
+
+    'saved_search' => {
+      'columns' => [
+        'searchnum',    'serial',  '',          '', '', '',
+        'usernum',      'int',     'NULL',      '', '', '',
+        'searchname',   'varchar', '',     $char_d, '', '',
+        'path',         'varchar', '',     $char_d, '', '',
+        'params',       'text',    'NULL',      '', '', '',
+        'disabled',     'char',    'NULL',       1, '', '',
+        'freq',         'varchar', 'NULL',      16, '', '',
+        'last_sent',    'int',     'NULL',      '', '', '',
+        'format',       'varchar', 'NULL',      32, '', '',
+      ],
+      'primary_key'   => 'searchnum',
+      'unique'        => [],
+      'index'         => [],
+      'foreign_keys'  => [
+                           { columns => [ 'usernum' ],
+                             table   => 'access_user',
+                           },
+                         ],
+    },
+
+    'addr_status' => {
+      'columns' => [
+        'addrnum',  'serial',      '', '', '', '',
+        'ip_addr',  'varchar', 'NULL', 40, '', '',
+        '_date',    @date_type,            '', '',
+        'up',       'char',    'NULL',  1, '', '',
+        'delay',    'int',     'NULL', '', '', '',
+      ],
+      'primary_key'   => 'addrnum',
+      'unique'        => [ [ 'ip_addr' ] ],
+      'index'         => [ [ '_date' ] ],
+      'foreign_keys'  => [],
+    },
+
     # name type nullability length default local
 
     #'new_table' => {