ledger account service basis
This commit is contained in:
58
frontend/pshared/lib/models/ledger/account.dart
Normal file
58
frontend/pshared/lib/models/ledger/account.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:pshared/models/describable.dart';
|
||||
|
||||
|
||||
class LedgerAccount implements Describable {
|
||||
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 Describable describable;
|
||||
|
||||
@override
|
||||
String get name => describable.name;
|
||||
|
||||
@override
|
||||
String? get description => describable.description;
|
||||
|
||||
const LedgerAccount({
|
||||
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,
|
||||
});
|
||||
|
||||
LedgerAccount copyWith({
|
||||
Describable? describable,
|
||||
}) => LedgerAccount(
|
||||
ledgerAccountRef: ledgerAccountRef,
|
||||
organizationRef: organizationRef,
|
||||
ownerRef: ownerRef,
|
||||
accountCode: accountCode,
|
||||
accountType: accountType,
|
||||
currency: currency,
|
||||
status: status,
|
||||
allowNegative: allowNegative,
|
||||
isSettlement: isSettlement,
|
||||
metadata: metadata,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
describable: describable ?? this.describable,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user