Implemented ledger provider
This commit is contained in:
16
frontend/pshared/lib/api/responses/ledger/accounts.dart
Normal file
16
frontend/pshared/lib/api/responses/ledger/accounts.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/ledger/account.dart';
|
||||
|
||||
part 'accounts.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class LedgerAccountsResponse {
|
||||
final List<LedgerAccountDTO> accounts;
|
||||
|
||||
const LedgerAccountsResponse({required this.accounts});
|
||||
|
||||
factory LedgerAccountsResponse.fromJson(Map<String, dynamic> json) => _$LedgerAccountsResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$LedgerAccountsResponseToJson(this);
|
||||
}
|
||||
16
frontend/pshared/lib/api/responses/ledger/balance.dart
Normal file
16
frontend/pshared/lib/api/responses/ledger/balance.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/ledger/balance.dart';
|
||||
|
||||
part 'balance.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class LedgerBalanceResponse {
|
||||
final LedgerBalanceDTO balance;
|
||||
|
||||
const LedgerBalanceResponse({required this.balance});
|
||||
|
||||
factory LedgerBalanceResponse.fromJson(Map<String, dynamic> json) => _$LedgerBalanceResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$LedgerBalanceResponseToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user