import 'package:equatable/equatable.dart';

class HomeGoodsModel extends Equatable {
  String provider;
  String providerName;
  String goodId;
  String goodImage;
  String goodTitle;
  String shopName;
  String coupon;
  String commission;
  String marketPrice;
  String currentPrice;
  String inorderCount;

  HomeGoodsModel(
      {this.provider,
        this.providerName,
        this.goodId,
        this.goodImage,
        this.goodTitle,
        this.shopName,
        this.coupon,
        this.commission,
        this.marketPrice,
        this.currentPrice,
        this.inorderCount});

  HomeGoodsModel.fromJson(Map<String, dynamic> json) {
    provider = json['provider'];
    providerName = json['provider_name'];
    goodId = json['good_id'];
    goodImage = json['good_image'];
    goodTitle = json['good_title'];
    shopName = json['shop_name'];
    coupon = json['coupon'];
    commission = json['commission'];
    marketPrice = json['market_price'];
    currentPrice = json['current_price'];
    inorderCount = json['inorder_count'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['provider'] = this.provider;
    data['provider_name'] = this.providerName;
    data['good_id'] = this.goodId;
    data['good_image'] = this.goodImage;
    data['good_title'] = this.goodTitle;
    data['shop_name'] = this.shopName;
    data['coupon'] = this.coupon;
    data['commission'] = this.commission;
    data['market_price'] = this.marketPrice;
    data['current_price'] = this.currentPrice;
    data['inorder_count'] = this.inorderCount;
    return data;
  }

  @override
  List<Object> get props => [this.goodId, this.provider, this.providerName];
}

