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
|
|
@ -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: >
|
||||
|
|
|
|||
Reference in a new issue