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

@ -163,10 +163,15 @@ components:
maximum: 5
description:
type: string
pricing:
type: array
items:
$ref: "#/components/schemas/TrainingPrice"
required:
- name
- days
- description
- pricing
Training:
allOf:
@ -185,6 +190,34 @@ components:
x-go-type-import:
path: gitlab.mareshq.com/hq/yggdrasil/pkg/training
TrainingPrice:
type: object
properties:
currency:
type: string
enum:
- CZK
- EUR
- USD
x-go-type: currency.Currency
x-go-type-package:
path: gitlab.mareshq.com/hq/yggdrasil/internal/currency
amount:
type: number
minimum: 0
x-go-type: decimal.Decimal
x-go-type-package:
path: github.com/shopspring/decimal
type:
type: string
enum:
- OPEN
- CORPORATE
required:
- currency
- amount
- type
ProblemDetails:
type: object
description: >