feat(training): add pricing and TrainingPrice with amount, currency and type (open|corporate)
This commit is contained in:
parent
db6ff45c99
commit
5d83bb0308
8 changed files with 316 additions and 45 deletions
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
Reference in a new issue