Fixed compilation
This commit is contained in:
47
frontend/pshared/lib/data/dto/ledger/account.dart
Normal file
47
frontend/pshared/lib/data/dto/ledger/account.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/describable.dart';
|
||||
import 'package:pshared/data/dto/ledger/balance.dart';
|
||||
|
||||
part 'account.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable(includeIfNull: false, explicitToJson: true)
|
||||
class LedgerAccountDTO {
|
||||
final String ledgerAccountRef;
|
||||
final String organizationRef;
|
||||
final String? ownerRef;
|
||||
final String accountCode;
|
||||
final String accountType;
|
||||
final String currency;
|
||||
final String status;
|
||||
final bool allowNegative;
|
||||
final bool isSettlement;
|
||||
final Map<String, String>? metadata;
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
final DescribableDTO describable;
|
||||
|
||||
final LedgerBalanceDTO? balance;
|
||||
|
||||
const LedgerAccountDTO({
|
||||
required this.ledgerAccountRef,
|
||||
required this.organizationRef,
|
||||
this.ownerRef,
|
||||
required this.accountCode,
|
||||
required this.accountType,
|
||||
required this.currency,
|
||||
required this.status,
|
||||
required this.allowNegative,
|
||||
required this.isSettlement,
|
||||
this.metadata,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
required this.describable,
|
||||
this.balance,
|
||||
});
|
||||
|
||||
factory LedgerAccountDTO.fromJson(Map<String, dynamic> json) => _$LedgerAccountDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$LedgerAccountDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user