From 73399bef7a212e03eced12bd5bd9aaa0ef90d0d2 Mon Sep 17 00:00:00 2001 From: TeoV Date: Fri, 15 Sep 2017 17:02:22 +0300 Subject: [PATCH] Tenant before ID on TPResources and TPStats --- data/tariffplans/testtp/Resources.csv | 12 ++++++------ data/tariffplans/testtp/Stats.csv | 2 +- engine/models.go | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/tariffplans/testtp/Resources.csv b/data/tariffplans/testtp/Resources.csv index 0077b1c66..a508329df 100755 --- a/data/tariffplans/testtp/Resources.csv +++ b/data/tariffplans/testtp/Resources.csv @@ -1,6 +1,6 @@ -#Id[0],Tenant[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5],TTL[6],Limit[7],AllocationMessage[8],Blocker[9],Stored[10],Weight[11],Thresholds[12] -ResGroup1,cgrates.org,*string,Account,1001;1002,2014-07-29T15:00:00Z,1s,7,,true,true,20, -ResGroup1,cgrates.org,*string_prefix,Destination,10;20,,,,,,,, -ResGroup1,cgrates.org,*rsr_fields,,Subject(~^1.*1$);Destination(1002),,,,,,,, -ResGroup2,cgrates.org,*destinations,Destination,DST_FS,2014-07-29T15:00:00Z,3600s,8,SPECIAL_1002,true,true,10, -ResGroup3,cgrates.org,*cdr_stats,,CDRST1:*min_ASR:34;CDRST_1001:*min_ASR:20,,,,,,,, +#Tenant[0],Id[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5],TTL[6],Limit[7],AllocationMessage[8],Blocker[9],Stored[10],Weight[11],Thresholds[12] +cgrates.org,ResGroup1,*string,Account,1001;1002,2014-07-29T15:00:00Z,1s,7,,true,true,20, +cgrates.org,ResGroup1,*string_prefix,Destination,10;20,,,,,,,, +cgrates.org,ResGroup1,*rsr_fields,,Subject(~^1.*1$);Destination(1002),,,,,,,, +cgrates.org,ResGroup2,*destinations,Destination,DST_FS,2014-07-29T15:00:00Z,3600s,8,SPECIAL_1002,true,true,10, +cgrates.org,ResGroup3,*cdr_stats,,CDRST1:*min_ASR:34;CDRST_1001:*min_ASR:20,,,,,,,, diff --git a/data/tariffplans/testtp/Stats.csv b/data/tariffplans/testtp/Stats.csv index 93311a0e6..28fb633ff 100755 --- a/data/tariffplans/testtp/Stats.csv +++ b/data/tariffplans/testtp/Stats.csv @@ -1,2 +1,2 @@ #Tenant[0],Id[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5],QueueLength[6],TTL[7],Metrics[8],Blocker[9],Stored[10],Weight[11],Thresholds[12] -Tester,Stats1,*string,Account,1001;1002,2014-07-29T15:00:00Z,100,1s,*asr;*acd;*acc,true,true,20,THRESH1;THRESH2 \ No newline at end of file +cgrates.org,Stats1,*string,Account,1001;1002,2014-07-29T15:00:00Z,100,1s,*asr;*acd;*acc,true,true,20,THRESH1;THRESH2 diff --git a/engine/models.go b/engine/models.go index 76abdcabd..0031f11f8 100755 --- a/engine/models.go +++ b/engine/models.go @@ -454,8 +454,8 @@ func (t TBLSMCosts) TableName() string { type TpResource struct { PK uint `gorm:"primary_key"` Tpid string - ID string `index:"0" re:""` - Tenant string `index:"1" re:""` + Tenant string `index:"0" re:""` + ID string `index:"1" re:""` FilterType string `index:"2" re:"^\*[A-Za-z].*"` FilterFieldName string `index:"3" re:""` FilterFieldValues string `index:"4" re:""`