From 046bde17d4b3db0766eca6f2e393c493c3342296 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 8 Apr 2026 15:09:32 +0200 Subject: [PATCH] format Date for horrible date name --- models/common/pricing/interfaces.go | 1 + models/resources/priced_resource.go | 4 ++++ models/workflow_execution/workflow_execution.go | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/models/common/pricing/interfaces.go b/models/common/pricing/interfaces.go index 55ee888..f4de37a 100755 --- a/models/common/pricing/interfaces.go +++ b/models/common/pricing/interfaces.go @@ -9,6 +9,7 @@ import ( type PricedItemITF interface { GetID() string + GetName() string GetInstanceID() string GetType() tools.DataType IsPurchasable() bool diff --git a/models/resources/priced_resource.go b/models/resources/priced_resource.go index 10277ca..e4fec0a 100755 --- a/models/resources/priced_resource.go +++ b/models/resources/priced_resource.go @@ -47,6 +47,10 @@ func (abs *PricedResource[T]) GetID() string { return abs.ResourceID } +func (abs *PricedResource[T]) GetName() string { + return abs.Name +} + func (abs *PricedResource[T]) GetInstanceID() string { return abs.InstanceID } diff --git a/models/workflow_execution/workflow_execution.go b/models/workflow_execution/workflow_execution.go index f7f8214..3dbdcd6 100755 --- a/models/workflow_execution/workflow_execution.go +++ b/models/workflow_execution/workflow_execution.go @@ -243,7 +243,7 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools. bookingItem := &booking.Booking{ AbstractObject: utils.AbstractObject{ UUID: uuid.New().String(), - Name: d.GetName() + "_" + executionsID + "_" + wfID, + Name: priced.GetName() + "_" + executionsID[:8] + " " + start.Format("2006-01-02 15:04"), IsDraft: true, }, PricedItem: m,