copy method
OrderModel<T>
copy(
{ - String? id,
- String? name,
- String? ordererId,
- Option<CouponModel>? coupon,
- int? totalPrice,
- int? discount,
- int? deliveryTip,
- int? actualPaymentPrice,
- ApartmentModel? apartment,
- String? userPhoneNumber,
- String? detailedAddress,
- DateTime? updatedAt,
- DateTime? createdAt,
})
Implementation
OrderModel<T> copy({
String? id,
String? name,
String? ordererId,
Option<CouponModel>? coupon,
int? totalPrice,
int? discount,
int? deliveryTip,
int? actualPaymentPrice,
ApartmentModel? apartment,
String? userPhoneNumber,
String? detailedAddress,
Iterable<T>? menus,
DateTime? updatedAt,
DateTime? createdAt,
}) {
return OrderModel(
id: id ?? this.id,
name: name ?? this.name,
ordererId: ordererId ?? this.ordererId,
coupon: coupon != null ? coupon.value : this.coupon,
totalPrice: totalPrice ?? this.totalPrice,
discount: discount ?? this.discount,
actualPaymentPrice: actualPaymentPrice ?? this.actualPaymentPrice,
apartment: apartment ?? this.apartment,
userPhoneNumber: userPhoneNumber ?? this.userPhoneNumber,
menus: menus ?? this.menus,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}