mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add API's for RateProfiles
This commit is contained in:
committed by
Dan Christian Bogos
parent
75406ceaf2
commit
7d1b0a5e03
@@ -468,6 +468,40 @@ CREATE TABLE tp_dispatcher_hosts (
|
||||
`id`,`address`)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table `tp_rate_profiles`
|
||||
--
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS tp_rate_profiles;
|
||||
CREATE TABLE tp_rate_profiles (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`tpid` varchar(64) NOT NULL,
|
||||
`tenant` varchar(64) NOT NULL,
|
||||
`id` varchar(64) NOT NULL,
|
||||
`filter_ids` varchar(64) NOT NULL,
|
||||
`activation_interval` varchar(64) NOT NULL,
|
||||
`weight` decimal(8,2) NOT NULL,
|
||||
`connect_fee` decimal(8,2) NOT NULL,
|
||||
`rounding_method` varchar(64) NOT NULL,
|
||||
`rounding_decimals` tinyint(4) 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,
|
||||
`route_weight` decimal(8,2) NOT NULL,
|
||||
`rate_value` decimal(8,4) NOT NULL,
|
||||
`rate_unit` varchar(64) NOT NULL,
|
||||
`rate_increment` varchar(64) NOT NULL,
|
||||
`rate_blocker` BOOLEAN NOT NULL,
|
||||
`created_at` TIMESTAMP,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `tpid` (`tpid`),
|
||||
UNIQUE KEY `unique_tp_rate_profiles` (`tpid`,`tenant`,
|
||||
`id`,`filter_ids`,`rate_id` )
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table `versions`
|
||||
--
|
||||
|
||||
@@ -455,6 +455,38 @@ CREATE INDEX tp_routes_unique ON tp_routes ("tpid", "tenant", "id",
|
||||
CREATE INDEX tp_dispatcher_hosts_unique ON tp_dispatcher_hosts ("tpid", "tenant", "id",
|
||||
"address");
|
||||
|
||||
--
|
||||
-- Table structure for table `tp_rate_profiles`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS tp_rate_profiles;
|
||||
CREATE TABLE tp_rate_profiles (
|
||||
"pk" SERIAL PRIMARY KEY,
|
||||
"tpid" varchar(64) NOT NULL,
|
||||
"tenant" varchar(64) NOT NULL,
|
||||
"id" varchar(64) NOT NULL,
|
||||
"filter_ids" varchar(64) NOT NULL,
|
||||
"activation_interval" varchar(64) NOT NULL,
|
||||
"weight" decimal(8,2) NOT NULL,
|
||||
"connect_fee" decimal(8,4) NOT NULL,
|
||||
"rounding_method" varchar(64) NOT NULL,
|
||||
"rounding_decimals" SMALLINT 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_weight" decimal(8,2) NOT NULL,
|
||||
"rate_value" decimal(8,4) NOT NULL,
|
||||
"rate_unit" VARCHAR(64) NOT NULL,
|
||||
"rate_increment" VARCHAR(64) NOT NULL,
|
||||
"rate_blocker" BOOLEAN NOT NULL,
|
||||
"created_at" TIMESTAMP WITH TIME ZONE
|
||||
);
|
||||
CREATE INDEX tp_rate_profiles_ids ON tp_rate_profiles (tpid);
|
||||
CREATE INDEX tp_rate_profiles_unique ON tp_rate_profiles ("tpid", "tenant", "id",
|
||||
"filter_ids", "rate_id");
|
||||
|
||||
--
|
||||
-- Table structure for table `versions`
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user