X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=8c252031eef4c879ba5fabf0a9e4ea515523b16e;hb=9dafe1bcc38121281d62ffe2d48eba6b8fd748e7;hp=4fc0cfe6925af55964c306ada6e936dbf100a5f7;hpb=dac4bb8dc3fcdd36fdcaf445c12134103a9d599e;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 4fc0cfe69..8c252031e 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -538,6 +538,24 @@ sub tables_hashref { 'index' => [ ['custnum'], ['_date'], ['statementnum'], ['agent_invid'] ], }, + #for importing invoices from a legacy system for display purposes only + # no effect upon balance + 'legacy_cust_bill' => { + 'columns' => [ + 'legacyinvnum', 'serial', '', '', '', '', + 'legacyid', 'varchar', 'NULL', $char_d, '', '', + 'custnum', 'int', '', '', '', '', + '_date', @date_type, '', '', + 'charged', @money_type, '', '', + 'content_pdf', 'blob', 'NULL', '', '', '', + 'content_html', 'text', 'NULL', '', '', '', + 'locale', 'varchar', 'NULL', 16, '', '', + ], + 'primary_key' => 'legacyinvnum', + 'unique' => [], + 'index' => [ ['legacyid', 'custnum', 'locale' ], ], + }, + 'cust_statement' => { 'columns' => [ 'statementnum', 'serial', '', '', '', '', @@ -887,6 +905,7 @@ sub tables_hashref { 'billday', 'int', 'NULL', '', '', '', 'edit_subject', 'char', 'NULL', 1, '', '', 'locale', 'varchar', 'NULL', 16, '', '', + 'calling_list_exempt', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], @@ -1381,19 +1400,19 @@ sub tables_hashref { 'pay_batch' => { #batches of payments to an external processor 'columns' => [ - 'batchnum', 'serial', '', '', '', '', - 'payby', 'char', '', 4, '', '', # CARD/CHEK - 'status', 'char', 'NULL', 1, '', '', - 'download', @date_type, '', '', - 'upload', @date_type, '', '', + 'batchnum', 'serial', '', '', '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'payby', 'char', '', 4, '', '', # CARD/CHEK + 'status', 'char', 'NULL', 1, '', '', + 'download', @date_type, '', '', + 'upload', @date_type, '', '', ], 'primary_key' => 'batchnum', 'unique' => [], 'index' => [], }, - 'cust_pay_batch' => { #what's this used for again? list of customers - #in current CARD batch? (necessarily CARD?) + 'cust_pay_batch' => { #list of customers in current CARD/CHEK batch 'columns' => [ 'paybatchnum', 'serial', '', '', '', '', 'batchnum', 'int', '', '', '', '', @@ -1993,31 +2012,32 @@ sub tables_hashref { 'svc_dsl' => { 'columns' => [ - 'svcnum', 'int', '', '', '', '', - 'pushed', 'int', 'NULL', '', '', '', - 'desired_due_date', 'int', 'NULL', '', '', '', - 'due_date', 'int', 'NULL', '', '', '', - 'vendor_order_id', 'varchar', 'NULL', $char_d, '', '', - 'vendor_qual_id', 'varchar', 'NULL', $char_d, '', '', - 'vendor_order_type', 'varchar', 'NULL', $char_d, '', '', + 'svcnum', 'int', '', '', '', '', + 'pushed', 'int', 'NULL', '', '', '', + 'desired_due_date', 'int', 'NULL', '', '', '', + 'due_date', 'int', 'NULL', '', '', '', + 'vendor_order_id', 'varchar', 'NULL', $char_d, '', '', + 'vendor_qual_id', 'varchar', 'NULL', $char_d, '', '', + 'vendor_order_type', 'varchar', 'NULL', $char_d, '', '', 'vendor_order_status', 'varchar', 'NULL', $char_d, '', '', - 'first', 'varchar', 'NULL', $char_d, '', '', - 'last', 'varchar', 'NULL', $char_d, '', '', - 'company', 'varchar', 'NULL', $char_d, '', '', - 'phonenum', 'varchar', 'NULL', 24, '', '', - 'loop_type', 'char', 'NULL', 1, '', '', - 'local_voice_provider', 'varchar', 'NULL', $char_d, '', '', - 'circuitnum', 'varchar', 'NULL', $char_d, '', '', - 'rate_band', 'varchar', 'NULL', $char_d, '', '', - 'vpi', 'int', 'NULL', '', '', '', - 'vci', 'int', 'NULL', '', '', '', - 'isp_chg', 'char', 'NULL', 1, '', '', - 'isp_prev', 'varchar', 'NULL', $char_d, '', '', - 'username', 'varchar', 'NULL', $char_d, '', '', - 'password', 'varchar', 'NULL', $char_d, '', '', - 'staticips', 'text', 'NULL', '', '', '', - 'monitored', 'char', 'NULL', 1, '', '', - 'last_pull', 'int', 'NULL', '', '', '', + 'first', 'varchar', 'NULL', $char_d, '', '', + 'last', 'varchar', 'NULL', $char_d, '', '', + 'company', 'varchar', 'NULL', $char_d, '', '', + 'phonenum', 'varchar', 'NULL', 24, '', '', + 'gateway_access_number', 'varchar', 'NULL', 24, '', '', + 'loop_type', 'char', 'NULL', 1, '', '', + 'local_voice_provider', 'varchar', 'NULL', $char_d, '', '', + 'circuitnum', 'varchar', 'NULL', $char_d, '', '', + 'rate_band', 'varchar', 'NULL', $char_d, '', '', + 'vpi', 'int', 'NULL', '', '', '', + 'vci', 'int', 'NULL', '', '', '', + 'isp_chg', 'char', 'NULL', 1, '', '', + 'isp_prev', 'varchar', 'NULL', $char_d, '', '', + 'username', 'varchar', 'NULL', $char_d, '', '', + 'password', 'varchar', 'NULL', $char_d, '', '', + 'staticips', 'text', 'NULL', '', '', '', + 'monitored', 'char', 'NULL', 1, '', '', + 'last_pull', 'int', 'NULL', '', '', '', ], 'primary_key' => 'svcnum', 'unique' => [ ], @@ -2374,12 +2394,27 @@ sub tables_hashref { 'groupnum', 'serial', '', '', '', '', 'groupname', 'varchar', '', $char_d, '', '', 'description', 'varchar', 'NULL', $char_d, '', '', + 'priority', 'int', '', '', '1', '', ], 'primary_key' => 'groupnum', 'unique' => [ ['groupname'] ], 'index' => [], }, + 'radius_attr' => { + 'columns' => [ + 'attrnum', 'serial', '', '', '', '', + 'groupnum', 'int', '', '', '', '', + 'attrname', 'varchar', '', $char_d, '', '', + 'value', 'varchar', '', $char_d, '', '', + 'attrtype', 'char', '', 1, '', '', + 'op', 'char', '', 2, '', '', + ], + 'primary_key' => 'attrnum', + 'unique' => [ ['groupnum','attrname'] ], #? + 'index' => [], + }, + 'msgcat' => { 'columns' => [ 'msgnum', 'serial', '', '', '', '', @@ -2468,8 +2503,8 @@ sub tables_hashref { 'svcnum', 'int', '', '', '', '', 'description', 'varchar', 'NULL', $char_d, '', '', 'blocknum', 'int', 'NULL', '', '', '', - 'speed_up', 'int', '', '', '', '', - 'speed_down', 'int', '', '', '', '', + 'speed_up', 'int', 'NULL', '', '', '', + 'speed_down', 'int', 'NULL', '', '', '', 'ip_addr', 'varchar', 'NULL', 15, '', '', 'mac_addr', 'varchar', 'NULL', 12, '', '', 'authkey', 'varchar', 'NULL', 32, '', '', @@ -2668,6 +2703,30 @@ sub tables_hashref { 'index' => [], }, + #not really part of the above rate_ stuff (used with flat rate rather than + # rated billing), but could be eventually, and its a rate + 'rate_tier' => { + 'columns' => [ + 'tiernum', 'serial', '', '', '', '', + 'tiername', 'varchar', '', $char_d, '', '', + ], + 'primary_key' => 'tiernum', + 'unique' => [ [ 'tiername'], ], + 'index' => [], + }, + + 'rate_tier_detail' => { + 'columns' => [ + 'tierdetailnum', 'serial', '', '', '', '', + 'tiernum', 'int', '', '', '', '', + 'min_quan', 'int', '', '', '', '', + 'min_charge', 'decimal', '', '10,4', '', '', + ], + 'primary_key' => 'tierdetailnum', + 'unique' => [], + 'index' => [ ['tiernum'], ], + }, + 'usage_class' => { 'columns' => [ 'classnum', 'serial', '', '', '', '', @@ -2855,24 +2914,17 @@ sub tables_hashref { 'max_callers', 'int', 'NULL', '', '', '', ### - # fields for unitel/RSLCOM/convergent that don't map well to asterisk - # defaults - # though these are now used elsewhere: + # old fields for unitel/RSLCOM/convergent that don't map to asterisk + # ones we adoped moved to "own fields" section below # charged_party, upstream_price, rated_price, carrierid, cdrtypenum ### - #cdr_type: Usage = 1, S&E = 7, OC&C = 8 - 'cdrtypenum', 'int', 'NULL', '', '', '', - - 'charged_party', 'varchar', 'NULL', $char_d, '', '', - 'upstream_currency', 'char', 'NULL', 3, '', '', 'upstream_price', 'decimal', 'NULL', '10,4', '', '', 'upstream_rateplanid', 'int', 'NULL', '', '', '', #? # how it was rated internally... 'ratedetailnum', 'int', 'NULL', '', '', '', - 'rated_price', 'decimal', 'NULL', '10,4', '', '', 'distance', 'decimal', 'NULL', '', '', '', 'islocal', 'int', 'NULL', '', '', '', # '', '', 0, '' instead? @@ -2883,16 +2935,24 @@ sub tables_hashref { 'description', 'varchar', 'NULL', $char_d, '', '', 'quantity', 'int', 'NULL', '', '', '', - #cdr_carrier: Telstra =1, Optus = 2, RSL COM = 3 - 'carrierid', 'int', 'NULL', '', '', '', - 'upstream_rateid', 'int', 'NULL', '', '', '', ### #and now for our own fields ### - # a svcnum... right..? + 'cdrtypenum', 'int', 'NULL', '', '', '', + + 'charged_party', 'varchar', 'NULL', $char_d, '', '', + + # how it was rated internally... + 'rated_price', 'decimal', 'NULL', '10,4', '', '', + 'rated_seconds', 'int', 'NULL', '', '', '', + 'rated_minutes', 'double precision', 'NULL', '', '', '', + + 'carrierid', 'int', 'NULL', '', '', '', + + # service it was matched to 'svcnum', 'int', 'NULL', '', '', '', #NULL, done (or something) @@ -2943,6 +3003,8 @@ sub tables_hashref { 'acctid', 'bigint', '', '', '', '', 'termpart', 'int', '', '', '', '',#future use see below 'rated_price', 'decimal', 'NULL', '10,4', '', '', + 'rated_seconds', 'int', 'NULL', '', '', '', + 'rated_minutes', 'double precision', 'NULL', '', '', '', 'status', 'varchar', 'NULL', 32, '', '', 'svcnum', 'int', 'NULL', '', '', '', ],