'refnum', 'int', '', '', '', '',
'referral_custnum', 'int', 'NULL', '', '', '',
'comments', 'text', 'NULL', '', '', '',
+ 'spool_cdr','char', 'NULL', 1, '', '',
],
'primary_key' => 'custnum',
'unique' => [],
#'index' => [ ['last'], ['company'] ],
'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ],
[ 'daytime' ], [ 'night' ], [ 'fax' ], [ 'refnum' ],
- [ 'county' ], [ 'state' ], [ 'country' ]
+ [ 'county' ], [ 'state' ], [ 'country' ], [ 'zip' ],
],
},
'orig_regionnum', 'int', 'NULL', '', '', '',
'dest_regionnum', 'int', '', '', '', '',
'min_included', 'int', '', '', '', '',
- 'min_charge', @money_type, '', '',
+ #'min_charge', @money_type, '', '',
+ 'min_charge', 'decimal', '', '10,5', '', '',
'sec_granularity', 'int', '', '', '', '',
#time period (link to table of periods)?
],
'upstream_price', 'decimal', 'NULL', '10,2', '', '',
'upstream_rateplanid', 'int', 'NULL', '', '', '', #?
+ # how it was rated internally...
+ 'ratedetailnum', 'int', 'NULL', '', '', '',
+ 'rated_price', 'decimal', 'NULL', '10,2', '', '',
+
'distance', 'decimal', 'NULL', '', '', '',
'islocal', 'int', 'NULL', '', '', '', # '', '', 0, '' instead?
# a svcnum... right..?
'svcnum', 'int', 'NULL', '', '', '',
- #NULL, done, skipped, pushed_downstream (or something)
+ #NULL, done (or something)
'freesidestatus', 'varchar', 'NULL', 32, '', '',
],
'index' => [],
},
+ #map upstream rateid to ours...
+ 'cdr_upstream_rate' => {
+ 'columns' => [
+ 'upstreamratenum', 'serial', '', '', '', '',
+ 'upstream_rateid', 'varchar', '', $char_d, '', '',
+ 'ratedetailnum', 'int', 'NULL', '', '', '',
+ ],
+ 'primary_key' => 'upstreamratenum', #XXX need a primary key
+ 'unique' => [ [ 'upstream_rateid' ] ], #unless we add another field, yeah
+ 'index' => [],
+ },
+
+ 'inventory_item' => {
+ 'columns' => [
+ 'itemnum', 'serial', '', '', '', '',
+ 'classnum', 'int', '', '', '', '',
+ 'item', 'varchar', '', $char_d, '', '',
+ 'svcnum', 'int', 'NULL', '', '', '',
+ ],
+ 'primary_key' => 'itemnum',
+ 'unique' => [ [ 'classnum', 'item' ] ],
+ 'index' => [ [ 'classnum' ], [ 'svcnum' ] ],
+ },
+
+ 'inventory_class' => {
+ 'columns' => [
+ 'classnum', 'serial', '', '', '', '',
+ 'classname', 'varchar', $char_d, '', '', '',
+ ],
+ 'primary_key' => 'classnum',
+ 'unique' => [],
+ 'index' => [],
+ },
};