import 'package:concierge/data/remote/models/product.dart';
import 'package:json_annotation/json_annotation.dart';

part '../../../_generated/data/remote/models/order_review.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class OrderReview {
  final List<Product> products;
  final int areaId;
  final String locationCode;
  final bool delivery;
  final String requestedDeliveryTime;
  final String paymentType;
  final String fullName;
  final String customerId;
  final String customerName;
  final String customerComment;
  final String orderType;
  final double deliveryPrice;
  final double totalPrice;
  final double totalPriceBeforeSavings;

  OrderReview({
    required this.products,
    required this.areaId,
    required this.locationCode,
    required this.delivery,
    required this.requestedDeliveryTime,
    required this.paymentType,
    required this.fullName,
    required this.customerId,
    required this.customerName,
    required this.customerComment,
    required this.orderType,
    required this.deliveryPrice,
    required this.totalPrice,
    required this.totalPriceBeforeSavings,
  });

  factory OrderReview.fromJson(Map<String, dynamic> json) => _$OrderReviewFromJson(json);

  Map<String, dynamic> toJson() => _$OrderReviewToJson(this);
}