Fixed compilation

This commit is contained in:
Stephan D
2026-01-22 14:15:14 +01:00
parent 8456263dd8
commit 32e8376700
41 changed files with 549 additions and 190 deletions

View File

@@ -0,0 +1,27 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:pshared/data/dto/money.dart';
part 'balance.g.dart';
@JsonSerializable(
includeIfNull: false, // <- omitempty behavior
explicitToJson: true, // <- nested DTOs call toJson()
)
class LedgerBalanceDTO {
final String ledgerAccountRef;
final MoneyDTO? balance;
final int version;
final DateTime? lastUpdated;
const LedgerBalanceDTO({
required this.ledgerAccountRef,
this.balance,
required this.version,
this.lastUpdated,
});
factory LedgerBalanceDTO.fromJson(Map<String, dynamic> json) => _$LedgerBalanceDTOFromJson(json);
Map<String, dynamic> toJson() => _$LedgerBalanceDTOToJson(this);
}