X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=0568bdf1d2ab8d14aeb3585cce6871a0baccbee3;hp=87bdc26479ab20c1bfdee0f3d295ae3b3fb4999b;hb=bda8c33f9b346ba6cd7aa4174ce0d3e37db7bd49;hpb=c5ceb74497f48162185959070d841a91e8bb58d9 diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 87bdc2647..0568bdf1d 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -2688,6 +2688,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', '', '', '', '', @@ -2875,24 +2899,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? @@ -2903,16 +2920,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) @@ -2963,6 +2988,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', '', '', '', ],