summaryrefslogtreecommitdiffstats
path: root/internal/models/engagement.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models/engagement.go')
-rw-r--r--internal/models/engagement.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/models/engagement.go b/internal/models/engagement.go
index 26b468a..87e0786 100644
--- a/internal/models/engagement.go
+++ b/internal/models/engagement.go
@@ -2,6 +2,8 @@ package models
import (
"database/sql"
+ "fmt"
+ "strconv"
"time"
)
@@ -12,6 +14,12 @@ type EngagementStrategy struct {
Operation Operation
}
+func (es *EngagementStrategy) FormatForTable() string {
+ startYear := strconv.Itoa(es.ValidFrom.Year())
+ endYear := strconv.Itoa(es.ValidTo.Year())
+ return fmt.Sprintf("%s-%s", startYear, endYear)
+}
+
type EngagementStrategyModel struct {
DB *sql.DB
}