22 lines
698 B
Dart
22 lines
698 B
Dart
import 'package:pshared/data/dto/payment/quotes.dart';
|
|
import 'package:pshared/data/mapper/payment/payment_quote.dart';
|
|
import 'package:pshared/data/mapper/payment/quote_aggregate.dart';
|
|
import 'package:pshared/models/payment/quotes.dart';
|
|
|
|
|
|
extension PaymentQuotesDTOMapper on PaymentQuotesDTO {
|
|
PaymentQuotes toDomain() => PaymentQuotes(
|
|
quoteRef: quoteRef,
|
|
aggregate: aggregate?.toDomain(),
|
|
quotes: quotes?.map((quote) => quote.toDomain()).toList(),
|
|
);
|
|
}
|
|
|
|
extension PaymentQuotesMapper on PaymentQuotes {
|
|
PaymentQuotesDTO toDTO() => PaymentQuotesDTO(
|
|
quoteRef: quoteRef,
|
|
aggregate: aggregate?.toDTO(),
|
|
quotes: quotes?.map((quote) => quote.toDTO()).toList(),
|
|
);
|
|
}
|