class GoodsShareTempDataModel {
  String shareContent;
  List<GoodsShareTempAddModel> shareTemplate;
  String shareTip;
  String appUrl;
  String title;
  String content;
  String appName;
  String appLogo;
  String imgUrl;

  String miniAppTitle;
  String miniAppUrl;
  String miniAppCode;
  String miniAppDesc;

  GoodsShareTempDataModel(
      {this.shareContent,
      this.shareTemplate,
      this.shareTip,
      this.appUrl,
      this.miniAppUrl});

  GoodsShareTempDataModel.fromJson(Map<String, dynamic> json) {
    shareContent = json['template_content'];
    if (json['share_template'] != null) {
      shareTemplate = new List<GoodsShareTempAddModel>();
      json['share_template'].forEach((v) {
        shareTemplate.add(new GoodsShareTempAddModel.fromJson(v));
      });
    }
    shareTip = json['share_tip'];
    appUrl = json['app_url'];
    miniAppUrl = json['mini_app_url'];
    title = json['title'];
    content = json['content'];
    appName = json['app_name'];
    appLogo = json['app_logo'];
    miniAppTitle = json['mini_app_title'];
    miniAppUrl = json['mini_app_url'];
    miniAppCode = json['mini_app_code'];
    miniAppDesc = json['mini_app_desc'];
    imgUrl = json['image_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['share_content'] = this.shareContent;
    if (this.shareTemplate != null) {
      data['template_content'] =
          this.shareTemplate.map((v) => v.toJson()).toList();
    }
    data['share_tip'] = this.shareTip;
    data['app_url'] = this.appUrl;
    data['mini_app_url'] = this.miniAppUrl;

    data['title'] = this.title;
    data['content'] = this.content;
    data['app_name'] = this.appName;
    data['app_logo'] = this.appLogo;
    data['image_url'] = this.imgUrl;

    data['mini_app_title'] = this.miniAppTitle;
    data['mini_app_url'] = this.miniAppUrl;
    data['mini_app_code'] = this.miniAppCode;
    data['mini_app_desc'] = this.miniAppDesc;
    return data;
  }
}

class GoodsShareTempAddModel {
  String name;
  String val;
  String temp;

  GoodsShareTempAddModel({this.name, this.val, this.temp});

  GoodsShareTempAddModel.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    val = json['val'];
    temp = json['temp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['val'] = this.val;
    data['temp'] = this.temp;
    return data;
  }
}
