mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 07:08:45 +05:00
Update RateProfile to use map[string]*Rate instead of slice
This commit is contained in:
committed by
Dan Christian Bogos
parent
72a521a66d
commit
21773a185d
@@ -83,8 +83,8 @@ type TPDestination struct {
|
||||
}
|
||||
|
||||
// This file deals with tp_* data definition
|
||||
|
||||
type TPRate struct {
|
||||
// TPRateRALs -> TPRateRALs
|
||||
type TPRateRALs struct {
|
||||
TPid string // Tariff plan id
|
||||
ID string // Rate id
|
||||
RateSlots []*RateSlot // One or more RateSlots
|
||||
@@ -150,7 +150,7 @@ type TPDestinationRate struct {
|
||||
type DestinationRate struct {
|
||||
DestinationId string // The destination identity
|
||||
RateId string // The rate identity
|
||||
Rate *TPRate
|
||||
Rate *TPRateRALs
|
||||
RoundingMethod string
|
||||
RoundingDecimals int
|
||||
MaxCost float64
|
||||
@@ -1436,3 +1436,31 @@ type AttrsExecuteActionPlans struct {
|
||||
*ArgDispatcher
|
||||
TenantArg
|
||||
}
|
||||
|
||||
type TPRateProfile struct {
|
||||
TPid string
|
||||
Tenant string
|
||||
ID string
|
||||
FilterIDs []string
|
||||
ActivationInterval *TPActivationInterval
|
||||
Weight float64
|
||||
ConnectFee float64
|
||||
RoundingMethod string
|
||||
RoundingDecimals int
|
||||
MinCost float64
|
||||
MaxCost float64
|
||||
MaxCostStrategy string
|
||||
Rates map[string]*TPRate
|
||||
}
|
||||
|
||||
type TPRate struct {
|
||||
ID string // RateID
|
||||
FilterIDs []string // RateFilterIDs
|
||||
ActivationInterval *TPActivationInterval //TPActivationInterval have ATime and ETime as strings
|
||||
IntervalStart string
|
||||
Weight float64 // RateWeight will decide the winner per interval start
|
||||
Value float64 // RateValue
|
||||
Unit string
|
||||
Increment string
|
||||
Blocker bool // RateBlocker will make this rate recurrent, deactivating further intervals
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user