multiquote service
This commit is contained in:
21
frontend/pshared/lib/data/mapper/payment/quotes.dart
Normal file
21
frontend/pshared/lib/data/mapper/payment/quotes.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
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(),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user