'sdate', @date_type, '', '',
'edate', @date_type, '', '',
'itemdesc', 'varchar', 'NULL', $char_d, '', '',
+ 'section', 'varchar', 'NULL', $char_d, '', '',
'quantity', 'int', 'NULL', '', '', '',
'unitsetup', @money_typen, '', '',
'unitrecur', @money_typen, '', '',
'billpkgnum', 'int', 'NULL', '', '', '', # should not be nullable
'pkgnum', 'int', 'NULL', '', '', '', # deprecated
'invnum', 'int', 'NULL', '', '', '', # deprecated
+ 'amount', @money_typen, '', '',
'format', 'char', 'NULL', 1, '', '',
+ 'classnum', 'char', 'NULL', 1, '', '',
'detail', 'varchar', '', $char_d, '', '',
],
'primary_key' => 'detailnum',
'custnum', 'serial', '', '', '', '',
'agentnum', 'int', '', '', '', '',
'agent_custid', 'varchar', 'NULL', $char_d, '', '',
+ 'custbatch', 'varchar', 'NULL', $char_d, '', '',
# 'titlenum', 'int', 'NULL', '', '', '',
'last', 'varchar', '', $char_d, '', '',
# 'middle', 'varchar', 'NULL', $char_d, '', '',
[ 'ship_last' ], [ 'ship_company' ],
[ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ],
[ 'payby' ], [ 'paydate' ],
+ [ 'agentnum' ], [ 'custbatch' ],
],
},
'index' => [ [ 'pkgnum' ], [ 'optionname' ] ],
},
+ 'cust_pkg_detail' => {
+ 'columns' => [
+ 'pkgdetailnum', 'serial', '', '', '', '',
+ 'pkgnum', 'int', '', '', '', '',
+ 'detail', 'varchar', '', $char_d, '', '',
+ 'detailtype', 'char', '', 1, '', '', # "I"nvoice or "C"omment
+ 'weight', 'int', '', '', '', '',
+ ],
+ 'primary_key' => 'pkgdetailnum',
+ 'unique' => [],
+ 'index' => [ [ 'pkgnum', 'detailtype' ] ],
+ },
+
'cust_pkg_reason' => {
'columns' => [
'num', 'serial', '', '', '', '',
'index' => [ ['svcnum'], ['pkgnum'], ['svcpart'] ],
},
+ 'cust_svc_option' => {
+ 'columns' => [
+ 'optionnum', 'serial', '', '', '', '',
+ 'svcnum', 'int', '', '', '', '',
+ 'optionname', 'varchar', '', $char_d, '', '',
+ 'optionvalue', 'text', 'NULL', '', '', '',
+ ],
+ 'primary_key' => 'optionnum',
+ 'unique' => [],
+ 'index' => [ [ 'svcnum' ], [ 'optionname' ] ],
+ },
+
'part_pkg' => {
'columns' => [
'pkgpart', 'serial', '', '', '', '',
'taxoverridenum', 'serial', '', '', '', '',
'pkgpart', 'serial', '', '', '', '',
'taxclassnum', 'serial', '', '', '', '',
+ 'usage_class', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'taxoverridenum',
'unique' => [],
'min_charge', 'decimal', '', '10,5', '', '',
'sec_granularity', 'int', '', '', '', '',
#time period (link to table of periods)?
+ 'classnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'ratedetailnum',
'unique' => [ [ 'ratenum', 'orig_regionnum', 'dest_regionnum' ] ],
'index' => [ [ 'countrycode' ], [ 'regionnum' ] ],
},
+ 'usage_class' => {
+ 'columns' => [
+ 'classnum', 'serial', '', '', '', '',
+ 'classname', 'varchar', '', $char_d, '', '',
+ 'disabled', 'char', 'NULL', 1, '', '',
+ ],
+ 'primary_key' => 'classnum',
+ 'unique' => [],
+ 'index' => [ ['disabled'] ],
+ },
+
'reg_code' => {
'columns' => [
'codenum', 'serial', '', '', '', '',
#NULL, done (or something)
'freesidestatus', 'varchar', 'NULL', 32, '', '',
+ 'cdrbatch', 'varchar', 'NULL', $char_d, '', '',
+
],
'primary_key' => 'acctid',
'unique' => [],
- 'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ] ],
+ 'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ], [ 'cdrbatch' ], ],
},
'cdr_calltype' => {
'phonenum', 'varchar', '', 15, '', '', #12 ?
'pin', 'varchar', 'NULL', $char_d, '', '',
'sip_password', 'varchar', 'NULL', $char_d, '', '',
+ 'phone_name', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'svcnum',
'unique' => [],