Changed the weight field into db tables and csv

This commit is contained in:
porosnicuadrian
2021-02-15 17:58:19 +02:00
committed by Dan Christian Bogos
parent a975522e2c
commit 0088a7f3ea
4 changed files with 16 additions and 16 deletions

View File

@@ -482,14 +482,14 @@ CREATE TABLE tp_rate_profiles (
`id` varchar(64) NOT NULL,
`filter_ids` varchar(64) NOT NULL,
`activation_interval` varchar(64) NOT NULL,
`weight` decimal(8,2) NOT NULL,
`weights` varchar(64) NOT NULL,
`min_cost` decimal(8,4) NOT NULL,
`max_cost` decimal(8,4) NOT NULL,
`max_cost_strategy` varchar(64) NOT NULL,
`rate_id` varchar(32) NOT NULL,
`rate_filter_ids` varchar(64) NOT NULL,
`rate_activation_times` varchar(64) NOT NULL,
`rate_weight` decimal(8,2) NOT NULL,
`rate_weights` varchar(64) NOT NULL,
`rate_blocker` BOOLEAN NOT NULL,
`rate_interval_start` varchar(64) NOT NULL,
`rate_fixed_fee` decimal(8,4) NOT NULL,
@@ -544,11 +544,11 @@ CREATE TABLE tp_account_profiles (
`id` varchar(64) NOT NULL,
`filter_ids` varchar(64) NOT NULL,
`activation_interval` varchar(64) NOT NULL,
`weights` decimal(8,2) NOT NULL,
`weights` varchar(64) NOT NULL,
`opts` varchar(256) NOT NULL,
`balance_id` varchar(64) NOT NULL,
`balance_filter_ids` varchar(64) NOT NULL,
`balance_weights` decimal(8,2) NOT NULL,
`balance_weights` varchar(64) NOT NULL,
`balance_type` varchar(64) NOT NULL,
`balance_units` decimal(16,4) NOT NULL,
`balance_unit_factors` varchar(64) NOT NULL,

View File

@@ -467,14 +467,14 @@ CREATE INDEX tp_routes_unique ON tp_routes ("tpid", "tenant", "id",
"id" varchar(64) NOT NULL,
"filter_ids" varchar(64) NOT NULL,
"activation_interval" varchar(64) NOT NULL,
"weight" decimal(8,2) NOT NULL,
"weights" varchar(64) NOT NULL,
"min_cost" decimal(8,4) NOT NULL,
"max_cost" decimal(8,4) NOT NULL,
"max_cost_strategy" VARCHAR(64) NOT NULL,
"rate_id" VARCHAR(64) NOT NULL,
"rate_filter_ids" VARCHAR(64) NOT NULL,
"rate_activation_times" VARCHAR(64) NOT NULL,
"rate_weight" decimal(8,2) NOT NULL,
"rate_weights" varchar(64) NOT NULL,
"rate_blocker" BOOLEAN NOT NULL,
"rate_interval_start" VARCHAR(64) NOT NULL,
"rate_fixed_fee" decimal(8,4) NOT NULL,
@@ -527,11 +527,11 @@ CREATE TABLE tp_account_profiles (
"id" varchar(64) NOT NULL,
"filter_ids" varchar(64) NOT NULL,
"activation_interval" varchar(64) NOT NULL,
"weights" decimal(8,2) NOT NULL,
"weights" varchar(64) NOT NULL,
"opts" varchar(256) NOT NULL,
"balance_id" varchar(64) NOT NULL,
"balance_filter_ids" varchar(64) NOT NULL,
"balance_weights" decimal(8,2) NOT NULL,
"balance_weights" varchar(64) NOT NULL,
"balance_type" varchar(64) NOT NULL,
"balance_units" decimal(16,4) NOT NULL,
"balance_unit_factors" varchar(64) NOT NULL,

View File

@@ -1,5 +1,5 @@
#Tenant,ID,FilterIDs,ActivationInterval,Weight,MinCost,MaxCost,MaxCostStrategy,RateID,RateFilterIDs,RateActivationStart,RateWeight,RateBlocker,RateIntervalStart,RateFixedFee,RateRecurrentFee,RateUnit,RateIncrement
cgrates.org,RT_SPECIAL_1002,*string:~*req.Account:1002,,10,0,0,*free,RT_ALWAYS,,"* * * * *",0,false,0s,,0.01,1m,1s
cgrates.org,RT_RETAIL1,,,0,0,0,*free,RT_ALWAYS,,"* * * * *",0,false,0s,,0.4,1m,30s
cgrates.org,RT_RETAIL1,,,,,,,RT_ALWAYS,,"* * * * *",0,false,1m,,0.2,1m,10s
#Tenant,ID,FilterIDs,ActivationInterval,Weights,MinCost,MaxCost,MaxCostStrategy,RateID,RateFilterIDs,RateActivationStart,RateWeights,RateBlocker,RateIntervalStart,RateFixedFee,RateRecurrentFee,RateUnit,RateIncrement
cgrates.org,RT_SPECIAL_1002,*string:~*req.Account:1002,,;10,0,0,*free,RT_ALWAYS,,"* * * * *",;0,false,0s,,0.01,1m,1s
cgrates.org,RT_RETAIL1,,,;0,0,0,*free,RT_ALWAYS,,"* * * * *",;0,false,0s,,0.4,1m,30s
cgrates.org,RT_RETAIL1,,,,,,,RT_ALWAYS,,"* * * * *",;0,false,1m,,0.2,1m,10s
1 #Tenant ID FilterIDs ActivationInterval Weight Weights MinCost MaxCost MaxCostStrategy RateID RateFilterIDs RateActivationStart RateWeight RateWeights RateBlocker RateIntervalStart RateFixedFee RateRecurrentFee RateUnit RateIncrement
2 cgrates.org RT_SPECIAL_1002 *string:~*req.Account:1002 10 ;10 0 0 *free RT_ALWAYS * * * * * 0 ;0 false 0s 0.01 1m 1s
3 cgrates.org RT_RETAIL1 0 ;0 0 0 *free RT_ALWAYS * * * * * 0 ;0 false 0s 0.4 1m 30s
4 cgrates.org RT_RETAIL1 RT_ALWAYS * * * * * 0 ;0 false 1m 0.2 1m 10s
5

View File

@@ -1,5 +1,5 @@
#Tenant,ID,FilterIDs,ActivationInterval,Weight,MinCost,MaxCost,MaxCostStrategy,RateID,RateFilterIDs,RateActivationStart,RateWeight,RateBlocker,RateIntervalStart,RateFixedFee,RateRecurrentFee,RateUnit,RateIncrement
cgrates.org,RP1,*string:~*req.Subject:1001,,0,0.1,0.6,*free,RT_WEEK,,"* * * * 1-5",0,false,0s,,0.12,1m,1m
#Tenant,ID,FilterIDs,ActivationInterval,Weights,MinCost,MaxCost,MaxCostStrategy,RateID,RateFilterIDs,RateActivationStart,RateWeights,RateBlocker,RateIntervalStart,RateFixedFee,RateRecurrentFee,RateUnit,RateIncrement
cgrates.org,RP1,*string:~*req.Subject:1001,,;0,0.1,0.6,*free,RT_WEEK,,"* * * * 1-5",;0,false,0s,,0.12,1m,1m
cgrates.org,RP1,,,,,,,RT_WEEK,,,,,1m,,0.6,1m,1s
cgrates.org,RP1,,,,,,,RT_WEEKEND,,"* * * * 0,6",10,false,0s,,0.06,1m,1s
cgrates.org,RP1,,,,,,,RT_CHRISTMAS,,* * 24 12 *,30,false,0s,,0.06,1m,1s
cgrates.org,RP1,,,,,,,RT_WEEKEND,,"* * * * 0,6",;10,false,0s,,0.06,1m,1s
cgrates.org,RP1,,,,,,,RT_CHRISTMAS,,* * 24 12 *,;30,false,0s,,0.06,1m,1s
1 #Tenant ID FilterIDs ActivationInterval Weight Weights MinCost MaxCost MaxCostStrategy RateID RateFilterIDs RateActivationStart RateWeight RateWeights RateBlocker RateIntervalStart RateFixedFee RateRecurrentFee RateUnit RateIncrement
2 cgrates.org RP1 *string:~*req.Subject:1001 0 ;0 0.1 0.6 *free RT_WEEK * * * * 1-5 0 ;0 false 0s 0.12 1m 1m
3 cgrates.org RP1 RT_WEEK 1m 0.6 1m 1s
4 cgrates.org RP1 RT_WEEKEND * * * * 0,6 10 ;10 false 0s 0.06 1m 1s
5 cgrates.org RP1 RT_CHRISTMAS * * 24 12 * 30 ;30 false 0s 0.06 1m 1s