1
0
Fork 0

feat(training): add pricing and TrainingPrice with amount, currency and type (open|corporate)

This commit is contained in:
Vojtěch Mareš 2024-05-05 11:55:33 +02:00
parent db6ff45c99
commit 5d83bb0308
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
8 changed files with 316 additions and 45 deletions

View file

@ -2,6 +2,8 @@ package training
import (
"github.com/google/uuid"
"github.com/shopspring/decimal"
"gitlab.mareshq.com/hq/yggdrasil/internal/currency"
)
type TrainingID = uuid.UUID
@ -15,4 +17,18 @@ type Training struct {
Name string
Days int8
Description string
Pricing []TrainingPrice
}
type TrainingPrice struct {
Amount decimal.Decimal
Currency currency.Currency
Type TrainingPriceType
}
type TrainingPriceType string
const (
OpenTrainingPrice TrainingPriceType = "OPEN"
CorporateTrainingPrice TrainingPriceType = "CORPORATE"
)