hs.hsadmin.ng/src/main/resources/api-definition/hs-office/hs-office-coopassets-schemas.yaml
Michael Hoennig 216886e5f4 add-reverse-mapping-for-assetsharestx-adjustment (#38)
Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: #38
Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
2024-04-11 10:08:45 +02:00

93 lines
2.9 KiB
YAML

components:
schemas:
HsOfficeCoopAssetsTransactionType:
type: string
enum:
- ADJUSTMENT
- DEPOSIT
- DISBURSAL
- TRANSFER
- ADOPTION
- CLEARING
- LOSS
HsOfficeCoopAssetsTransaction:
type: object
properties:
uuid:
type: string
format: uuid
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
comment:
type: string
adjustedAssetTx:
$ref: '#/components/schemas/HsOfficeReferencedCoopAssetsTransaction'
adjustmentAssetTx:
$ref: '#/components/schemas/HsOfficeReferencedCoopAssetsTransaction'
HsOfficeReferencedCoopAssetsTransaction:
description:
Similar to `HsOfficeCoopAssetsTransaction` but without the self-referencing properties
(`adjustedAssetTx` and `adjustmentAssetTx`), to avoid recursive JSON.
type: object
properties:
uuid:
type: string
format: uuid
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
comment:
type: string
HsOfficeCoopAssetsTransactionInsert:
type: object
properties:
membershipUuid:
type: string
format: uuid
nullable: false
transactionType:
$ref: '#/components/schemas/HsOfficeCoopAssetsTransactionType'
assetValue:
type: number
format: currency
valueDate:
type: string
format: date
reference:
type: string
minLength: 6
maxLength: 48
comment:
type: string
reverseEntryUuid:
type: string
format: uuid
required:
- membershipUuid
- transactionType
- assetValue
- valueDate
- reference
additionalProperties: false