import 'package:flutter/cupertino.dart';

class AddProductToCartRequestModel {
  int? quantity;
  int? product_id;
  String? shopping_cart_type;
  int? customer_id;

  AddProductToCartRequestModel({@required this.product_id, this.customer_id, this.shopping_cart_type = "ShoppingCart", this.quantity = 1});

  Map<String, dynamic> json() {
    return {
      "shopping_cart_item" : {
        "quantity": quantity,
        "product_id": product_id,
        "shopping_cart_type": shopping_cart_type,
        "customer_id": customer_id
      }
    };
  }
}

class UpdateProductToCartRequestModel extends AddProductToCartRequestModel{
  UpdateProductToCartRequestModel({required int product_id, required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1})
      : super(customer_id: customer_id, product_id: product_id, quantity: quantity, shopping_cart_type: shopping_cart_type);
}
