accounts creation
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/discovery Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/gateway_mntx Pipeline was successful
ci/woodpecker/push/gateway_chain Pipeline was successful
ci/woodpecker/push/gateway_tgsettle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful

This commit is contained in:
Stephan D
2026-01-23 00:13:43 +01:00
parent b677d37b99
commit 218c4e20b3
64 changed files with 1641 additions and 338 deletions

View File

@@ -2,6 +2,8 @@ import 'package:json_annotation/json_annotation.dart';
import 'package:pshared/data/dto/describable.dart';
import 'package:pshared/data/dto/ledger/balance.dart';
import 'package:pshared/data/dto/ledger/status.dart';
import 'package:pshared/data/dto/ledger/type.dart';
part 'account.g.dart';
@@ -12,9 +14,9 @@ class LedgerAccountDTO {
final String organizationRef;
final String? ownerRef;
final String accountCode;
final String accountType;
final LedgerAccountTypeDTO accountType;
final String currency;
final String status;
final LedgerAccountStatusDTO status;
final bool allowNegative;
final bool isSettlement;
final Map<String, String>? metadata;

View File

@@ -0,0 +1,13 @@
import 'package:json_annotation/json_annotation.dart';
enum LedgerAccountStatusDTO {
@JsonValue('unspecified')
unspecified,
@JsonValue('active')
active,
@JsonValue('frozen')
frozen,
}

View File

@@ -0,0 +1,19 @@
import 'package:json_annotation/json_annotation.dart';
enum LedgerAccountTypeDTO {
@JsonValue('unspecified')
unspecified,
@JsonValue('asset')
asset,
@JsonValue('liability')
liability,
@JsonValue('revenue')
revenue,
@JsonValue('expense')
expense,
}

View File

@@ -1,20 +1,21 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:pshared/data/dto/wallet/chain_asset.dart';
part 'asset.g.dart';
@JsonSerializable()
class WalletAssetDTO {
final String chain;
final String tokenSymbol;
class WalletAssetDTO extends ChainAssetDTO {
final String contractAddress;
const WalletAssetDTO({
required this.chain,
required this.tokenSymbol,
required super.chain,
required super.tokenSymbol,
required this.contractAddress,
});
factory WalletAssetDTO.fromJson(Map<String, dynamic> json) => _$WalletAssetDTOFromJson(json);
@override
Map<String, dynamic> toJson() => _$WalletAssetDTOToJson(this);
}

View File

@@ -0,0 +1,18 @@
import 'package:json_annotation/json_annotation.dart';
part 'chain_asset.g.dart';
@JsonSerializable()
class ChainAssetDTO {
final String chain;
final String tokenSymbol;
const ChainAssetDTO({
required this.chain,
required this.tokenSymbol,
});
factory ChainAssetDTO.fromJson(Map<String, dynamic> json) => _$ChainAssetDTOFromJson(json);
Map<String, dynamic> toJson() => _$ChainAssetDTOToJson(this);
}