From 87d71e65ed131b3e15510af968dd5ba0d30d851d Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Sat, 23 Mar 2024 07:26:24 +0300 Subject: Feat: parse input; show actions --- internal/models/models.go | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'internal/models') diff --git a/internal/models/models.go b/internal/models/models.go index eb90a0d..ee6ae5f 100644 --- a/internal/models/models.go +++ b/internal/models/models.go @@ -2,28 +2,26 @@ package models import "time" -type ( - ScoreChanger interface { - ChangeScore() error - } +type ActionType string + +const ( + ActionTypePlus ActionType = "ActionTypePlus" + ActionTypeMinus ActionType = "ActionTypeMinus" +) +type ( UserScore struct { ID string - Acts []ScoreChanger + Actions []Action BurnTime time.Time Score int8 } // plus 1 - PlusAction struct { + Action struct { Name string + Magnitude uint8 Repeatable bool - } - - // minus x - // always repeatable - MinusAction struct { - Name string - Magnitude uint8 + Type ActionType } ) -- cgit v1.2.3