import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_header_model.dart';
class HomeGoodsStyleModel {
  String listColumn;
  List<HomeGoodsHeaderModel> recommendList;
  String providerNameColor;
  String providerNameBackgroundColor;
  String shopNameColor;
  String shopIcon;
  String couponFontColor;
  String couponBgColor;
  String commissionFontColor;
  String commissionBgColor;
  String marketPriceColor;
  String currentPriceColor;

  HomeGoodsStyleModel(
      {this.listColumn,
        this.recommendList,
        this.providerNameColor,
        this.providerNameBackgroundColor,
        this.shopNameColor,
        this.shopIcon,
        this.couponFontColor,
        this.couponBgColor,
        this.commissionFontColor,
        this.commissionBgColor,
        this.marketPriceColor,
        this.currentPriceColor});

  HomeGoodsStyleModel.fromJson(Map<String, dynamic> json) {
    listColumn = json['list_column'];
    if (json['recommend_list'] != null) {
      recommendList = new List<HomeGoodsHeaderModel>();
      json['recommend_list'].forEach((v) {
        recommendList.add(new HomeGoodsHeaderModel.fromJson(v));
      });
    }
    providerNameColor = json['provider_name_color'];
    providerNameBackgroundColor = json['provider_name_background_color'];
    shopNameColor = json['shop_name_color'];
    shopIcon = json['shop_icon'];
    couponFontColor = json['coupon_font_color'];
    couponBgColor = json['coupon_bg_color'];
    commissionFontColor = json['commission_font_color'];
    commissionBgColor = json['commission_bg_color'];
    marketPriceColor = json['market_price_color'];
    currentPriceColor = json['current_price_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['list_column'] = this.listColumn;
    if (this.recommendList != null) {
      data['recommend_list'] =
          this.recommendList.map((v) => v.toJson()).toList();
    }
    data['provider_name_color'] = this.providerNameColor;
    data['provider_name_background_color'] = this.providerNameBackgroundColor;
    data['shop_name_color'] = this.shopNameColor;
    data['shop_icon'] = this.shopIcon;
    data['coupon_font_color'] = this.couponFontColor;
    data['coupon_bg_color'] = this.couponBgColor;
    data['commission_font_color'] = this.commissionFontColor;
    data['commission_bg_color'] = this.commissionBgColor;
    data['market_price_color'] = this.marketPriceColor;
    data['current_price_color'] = this.currentPriceColor;
    return data;
  }
}