Update RateProfile to use map[string]*Rate instead of slice

This commit is contained in:
TeoV
2020-06-15 16:03:32 +03:00
committed by Dan Christian Bogos
parent 72a521a66d
commit 21773a185d
23 changed files with 225 additions and 197 deletions

View File

@@ -431,27 +431,28 @@ type TPDispatcherHost struct {
}
type RateProfileMdl struct {
PK uint `gorm:"primary_key"`
Tpid string
Tenant string `index:"0" re:""`
ID string `index:"1" re:""`
FilterIDs string `index:"2" re:""`
ActivationInterval string `index:"3" re:""`
Weight float64 `index:"4" re:"\d+\.?\d*"`
ConnectFee float64 `index:"5" re:"\d+\.?\d*"`
RoundingMethod string `index:"6" re:""`
RoundingDecimals int `index:"7" re:""`
MinCost float64 `index:"8" re:"\d+\.?\d*""`
MaxCost float64 `index:"9" re:"\d+\.?\d*"`
MaxCostStrategy string `index:"10" re:""`
RateID string `index:"11" re:""`
RateFilterIDs string `index:"12" re:""`
RateWeight float64 `index:"13" re:"\d+\.?\d*"`
RateValue float64 `index:"14" re:"\d+\.?\d*"`
RateUnit string `index:"15" re:""`
RateIncrement string `index:"16" re:""`
RateBlocker bool `index:"17" re:""`
CreatedAt time.Time
PK uint `gorm:"primary_key"`
Tpid string
Tenant string `index:"0" re:""`
ID string `index:"1" re:""`
FilterIDs string `index:"2" re:""`
ActivationInterval string `index:"3" re:""`
Weight float64 `index:"4" re:"\d+\.?\d*"`
ConnectFee float64 `index:"5" re:"\d+\.?\d*"`
RoundingMethod string `index:"6" re:""`
RoundingDecimals int `index:"7" re:""`
MinCost float64 `index:"8" re:"\d+\.?\d*""`
MaxCost float64 `index:"9" re:"\d+\.?\d*"`
MaxCostStrategy string `index:"10" re:""`
RateID string `index:"11" re:""`
RateFilterIDs string `index:"12" re:""`
RateActivationInterval string `index:"13" re:""`
RateWeight float64 `index:"14" re:"\d+\.?\d*"`
RateValue float64 `index:"15" re:"\d+\.?\d*"`
RateUnit string `index:"16" re:""`
RateIncrement string `index:"17" re:""`
RateBlocker bool `index:"18" re:""`
CreatedAt time.Time
}
func (_ RateProfileMdl) TableName() string {