1
0
Fork 0

feat: add training type/model

This commit is contained in:
Vojtěch Mareš 2024-05-04 11:44:45 +02:00
parent 3ee3be9e7f
commit 627be4d2f4
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
3 changed files with 18 additions and 3 deletions

2
go.mod
View file

@ -5,12 +5,12 @@ go 1.22.2
require (
github.com/gofiber/contrib/fiberzap/v2 v2.1.3
github.com/gofiber/fiber/v2 v2.52.4
github.com/google/uuid v1.6.0
go.uber.org/zap v1.27.0
)
require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/klauspost/compress v1.17.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect

4
go.sum
View file

@ -6,8 +6,8 @@ github.com/gofiber/contrib/fiberzap/v2 v2.1.3 h1:znIDjHJUyhp11h5w8AaABCtEJejxjiC
github.com/gofiber/contrib/fiberzap/v2 v2.1.3/go.mod h1:9KrEpG4A8g1Y4J7OS5WYq6rDyy+sXAEDSgGdCGPnH1Y=
github.com/gofiber/fiber/v2 v2.52.4 h1:P+T+4iK7VaqUsq2PALYEfBBo6bJZ4q3FP8cZ84EggTM=
github.com/gofiber/fiber/v2 v2.52.4/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=

15
pkg/training/model.go Normal file
View file

@ -0,0 +1,15 @@
package training
import "github.com/google/uuid"
type TrainingID uuid.UUID
func NewTrainingID() TrainingID {
return TrainingID(uuid.Must(uuid.NewV7()))
}
type Training struct {
ID TrainingID
Name string
Days int32
}