///有商品弹窗model
class HasGoodsDialogStyleModel {
  String titleImg;
  String bgColor;
  ModuleList moduleList;

  HasGoodsDialogStyleModel({this.titleImg, this.bgColor, this.moduleList});

  HasGoodsDialogStyleModel.fromJson(Map<String, dynamic> json) {
    titleImg = json['title_img'];
    bgColor = json['bg_color'];
    moduleList = json['module_list'] != null
        ? new ModuleList.fromJson(json['module_list'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title_img'] = this.titleImg;
    data['bg_color'] = this.bgColor;
    if (this.moduleList != null) {
      data['module_list'] = this.moduleList.toJson();
    }
    return data;
  }
}

class ModuleList {
  Coupon coupon;
  Coupon commission;
  Coupon shopTitle;
  Coupon couponPrice;
  Coupon couponAfter;
  Coupon couponAfterPrice;
  SaveBtn saveBtn;
  SaveBtn viewGoodsBtn;

  ModuleList(
      {this.coupon,
        this.commission,
        this.shopTitle,
        this.couponPrice,
        this.couponAfter,
        this.couponAfterPrice,
        this.saveBtn,
        this.viewGoodsBtn});

  ModuleList.fromJson(Map<String, dynamic> json) {
    coupon =
    json['coupon'] != null ? new Coupon.fromJson(json['coupon']) : null;
    commission = json['commission'] != null
        ? new Coupon.fromJson(json['commission'])
        : null;
    shopTitle = json['shop_title'] != null
        ? new Coupon.fromJson(json['shop_title'])
        : null;
    couponPrice = json['coupon_price'] != null
        ? new Coupon.fromJson(json['coupon_price'])
        : null;
    couponAfter = json['coupon_after'] != null
        ? new Coupon.fromJson(json['coupon_after'])
        : null;
    couponAfterPrice = json['coupon_after_price'] != null
        ? new Coupon.fromJson(json['coupon_after_price'])
        : null;
    saveBtn = json['save_btn'] != null
        ? new SaveBtn.fromJson(json['save_btn'])
        : null;
    viewGoodsBtn = json['view_goods_btn'] != null
        ? new SaveBtn.fromJson(json['view_goods_btn'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.coupon != null) {
      data['coupon'] = this.coupon.toJson();
    }
    if (this.commission != null) {
      data['commission'] = this.commission.toJson();
    }
    if (this.shopTitle != null) {
      data['shop_title'] = this.shopTitle.toJson();
    }
    if (this.couponPrice != null) {
      data['coupon_price'] = this.couponPrice.toJson();
    }
    if (this.couponAfter != null) {
      data['coupon_after'] = this.couponAfter.toJson();
    }
    if (this.couponAfterPrice != null) {
      data['coupon_after_price'] = this.couponAfterPrice.toJson();
    }
    if (this.saveBtn != null) {
      data['save_btn'] = this.saveBtn.toJson();
    }
    if (this.viewGoodsBtn != null) {
      data['view_goods_btn'] = this.viewGoodsBtn.toJson();
    }
    return data;
  }
}

class Coupon {
  String name;
  String content;
  String bgColor;
  String bgImg;
  String fontColor;

  Coupon({this.name, this.content, this.bgColor, this.bgImg, this.fontColor});

  Coupon.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    content = json['content'];
    bgColor = json['bg_color'];
    bgImg = json['bg_img'];
    fontColor = json['font_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['content'] = this.content;
    data['bg_color'] = this.bgColor;
    data['bg_img'] = this.bgImg;
    data['font_color'] = this.fontColor;
    return data;
  }
}

class SaveBtn {
  String name;
  String content;
  String type;
  String bgColor;
  String bgImg;
  String fontColor;

  SaveBtn(
      {this.name,
        this.content,
        this.type,
        this.bgColor,
        this.bgImg,
        this.fontColor});

  SaveBtn.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    content = json['content'];
    type = json['type'];
    bgColor = json['bg_color'];
    bgImg = json['bg_img'];
    fontColor = json['font_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['content'] = this.content;
    data['type'] = this.type;
    data['bg_color'] = this.bgColor;
    data['bg_img'] = this.bgImg;
    data['font_color'] = this.fontColor;
    return data;
  }
}
