import 'package:pshared/data/dto/payment/fee_line.dart';
import 'package:pshared/data/mapper/money.dart';
import 'package:pshared/models/payment/fees/line.dart';


extension FeeLineDTOMapper on FeeLineDTO {
  FeeLine toDomain() => FeeLine(
    ledgerAccountRef: ledgerAccountRef,
    amount: amount?.toDomain(),
    lineType: lineType,
    side: side,
    meta: meta,
  );
}

extension FeeLineMapper on FeeLine {
  FeeLineDTO toDTO() => FeeLineDTO(
    ledgerAccountRef: ledgerAccountRef,
    amount: amount?.toDTO(),
    lineType: lineType,
    side: side,
    meta: meta,
  );
}
