diff options
author | GrailFinder <wohilas@gmail.com> | 2024-03-23 07:26:24 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2024-03-23 07:26:24 +0300 |
commit | 87d71e65ed131b3e15510af968dd5ba0d30d851d (patch) | |
tree | 78249d3ece11bb6c3fc96fd1c23273ae87e02523 /internal/models | |
parent | 5f2eb541052f6f6f02d5bc4320f9c19e21c6f59f (diff) |
Feat: parse input; show actions
Diffstat (limited to 'internal/models')
-rw-r--r-- | internal/models/models.go | 24 |
1 files changed, 11 insertions, 13 deletions
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 } ) |