class WechatTeacherStyleModel {
  String appBarName;
  String appBarNameColor;
  String appBarBgColor;
  String bgColor;
  String bgImg;
  String teacherDialogTitle;
  String teacherDialogTitleColor;
  String teacherDialogBgColor;
  CommStyle commStyle;
  NobindTeacherDialog nobindTeacherDialog;
  MyTeacher myTeacher;
  BindTeacherDialog bindTeacherDialog;
  String chatDialogImg;
  OfficalWxchat officalWxchat;

  WechatTeacherStyleModel({
    this.appBarName,
    this.appBarNameColor,
    this.appBarBgColor,
    this.bgColor,
    this.bgImg,
    this.teacherDialogTitle,
    this.teacherDialogTitleColor,
    this.teacherDialogBgColor,
    this.commStyle,
    this.nobindTeacherDialog,
    this.myTeacher,
    this.bindTeacherDialog,
    this.chatDialogImg,
    this.officalWxchat,
  });

  WechatTeacherStyleModel.fromJson(Map<String, dynamic> json) {
    appBarName = json['app_bar_name'];
    appBarNameColor = json['app_bar_name_color'];
    appBarBgColor = json['app_bar_bg_color'];
    bgColor = json['bg_color'];
    bgImg = json['bg_img'];
    teacherDialogTitle = json['teacher_dialog_title'];
    teacherDialogTitleColor = json['teacher_dialog_title_color'];
    teacherDialogBgColor = json['teacher_dialog_bg_color'];
    commStyle = json['comm_style'] != null ? new CommStyle.fromJson(json['comm_style']) : null;
    nobindTeacherDialog = json['nobind_teacher_dialog'] != null ? new NobindTeacherDialog.fromJson(json['nobind_teacher_dialog']) : null;
    myTeacher = json['my_teacher'] != null ? new MyTeacher.fromJson(json['my_teacher']) : null;
    bindTeacherDialog = json['bind_teacher_dialog'] != null ? new BindTeacherDialog.fromJson(json['bind_teacher_dialog']) : null;
    chatDialogImg = json['chat_dialog_img'];
    officalWxchat = json['offical_wxchat'] != null ? new OfficalWxchat.fromJson(json['offical_wxchat']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['app_bar_name'] = this.appBarName;
    data['app_bar_name_color'] = this.appBarNameColor;
    data['app_bar_bg_color'] = this.appBarBgColor;
    data['bg_color'] = this.bgColor;
    data['bg_img'] = this.bgImg;
    data['teacher_dialog_title'] = this.teacherDialogTitle;
    data['teacher_dialog_title_color'] = this.teacherDialogTitleColor;
    data['teacher_dialog_bg_color'] = this.teacherDialogBgColor;
    if (this.commStyle != null) {
      data['comm_style'] = this.commStyle.toJson();
    }
    if (this.nobindTeacherDialog != null) {
      data['nobind_teacher_dialog'] = this.nobindTeacherDialog.toJson();
    }
    if (this.myTeacher != null) {
      data['my_teacher'] = this.myTeacher.toJson();
    }
    if (this.bindTeacherDialog != null) {
      data['bind_teacher_dialog'] = this.bindTeacherDialog.toJson();
    }
    data['chat_dialog_img'] = this.chatDialogImg;
    if (this.officalWxchat != null) {
      data['offical_wxchat'] = this.officalWxchat.toJson();
    }
    return data;
  }
}

class CommStyle {
  String wechatAccountColor;
  String btnTextColor;
  String btnBgColor;

  CommStyle({
    this.wechatAccountColor,
    this.btnTextColor,
    this.btnBgColor,
  });

  CommStyle.fromJson(Map<String, dynamic> json) {
    wechatAccountColor = json['wechat_account_color'];
    btnTextColor = json['btn_text_color'];
    btnBgColor = json['btn_bg_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['wechat_account_color'] = this.wechatAccountColor;
    data['btn_text_color'] = this.btnTextColor;
    data['btn_bg_color'] = this.btnBgColor;
    return data;
  }
}

class NobindTeacherDialog {
  String inputHintText;
  String inputHintTextColor;
  String inputLineColor;
  String btnText;

  NobindTeacherDialog({
    this.inputHintText,
    this.inputHintTextColor,
    this.inputLineColor,
    this.btnText,
  });

  NobindTeacherDialog.fromJson(Map<String, dynamic> json) {
    inputHintText = json['input_hint_text'];
    inputHintTextColor = json['input_hint_text_color'];
    inputLineColor = json['input_line_color'];
    btnText = json['btn_text'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['input_hint_text'] = this.inputHintText;
    data['input_hint_text_color'] = this.inputHintTextColor;
    data['input_line_color'] = this.inputLineColor;
    data['btn_text'] = this.btnText;
    return data;
  }
}

class MyTeacher {
  String teacherType;
  DefalutTeacher defalutTeacher;

  MyTeacher({this.teacherType, this.defalutTeacher});

  MyTeacher.fromJson(Map<String, dynamic> json) {
    teacherType = json['teacher_type'];
    defalutTeacher = json['defalut_teacher'] != null ? new DefalutTeacher.fromJson(json['defalut_teacher']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['teacher_type'] = this.teacherType;
    if (this.defalutTeacher != null) {
      data['defalut_teacher'] = this.defalutTeacher.toJson();
    }
    return data;
  }
}

class DefalutTeacher {
  String avatar;
  String qrcode;
  String wxAccount;

  DefalutTeacher({this.avatar, this.qrcode, this.wxAccount});

  DefalutTeacher.fromJson(Map<String, dynamic> json) {
    avatar = json['avatar'];
    qrcode = json['qrcode'];
    wxAccount = json['wx_account'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['avatar'] = this.avatar;
    data['qrcode'] = this.qrcode;
    data['wx_account'] = this.wxAccount;
    return data;
  }
}

class BindTeacherDialog {
  List<String> dataKeys;
  String btnText;
  String btnTextColor;
  String btnBgColor;
  String qrcodeText;
  String qrcodeTextColor;

  BindTeacherDialog({
    this.dataKeys,
    this.btnText,
    this.btnTextColor,
    this.btnBgColor,
    this.qrcodeText,
    this.qrcodeTextColor,
  });

  BindTeacherDialog.fromJson(Map<String, dynamic> json) {
    dataKeys = json['data_keys'].cast<String>();
    btnText = json['btn_text'];
    btnTextColor = json['btn_text_color'];
    btnBgColor = json['btn_bg_color'];
    qrcodeText = json['qrcode_text'];
    qrcodeTextColor = json['qrcode_text_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['data_keys'] = this.dataKeys;
    data['btn_text'] = this.btnText;
    data['btn_text_color'] = this.btnTextColor;
    data['btn_bg_color'] = this.btnBgColor;
    data['qrcode_text'] = this.qrcodeText;
    data['qrcode_text_color'] = this.qrcodeTextColor;
    return data;
  }
}

class OfficalWxchat {
  String qrcodeText;
  String qrcodeTextColor;
  String bgColor;
  String title;
  String titleColor;
  String btnText;
  List<OfficalWxchatList> list;

  OfficalWxchat({
    this.qrcodeText,
    this.qrcodeTextColor,
    this.bgColor,
    this.title,
    this.titleColor,
    this.btnText,
    this.list,
  });

  OfficalWxchat.fromJson(Map<String, dynamic> json) {
    qrcodeText = json['qrcode_text'];
    qrcodeTextColor = json['qrcode_text_color'];
    bgColor = json['bg_color'];
    title = json['title'];
    titleColor = json['title_color'];
    btnText = json['btn_text'];
    if (json['list'] != null) {
      list = new List<OfficalWxchatList>();
      json['list'].forEach((v) {
        list.add(new OfficalWxchatList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['qrcode_text'] = this.qrcodeText;
    data['qrcode_text_color'] = this.qrcodeTextColor;
    data['bg_color'] = this.bgColor;
    data['title'] = this.title;
    data['title_color'] = this.titleColor;
    data['btn_text'] = this.btnText;
    if (this.list != null) {
      data['list'] = this.list.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class OfficalWxchatList {
  String index;
  String text;
  String subText;
  String wechatAccount;
  String qrcode;

  OfficalWxchatList({this.index, this.text, this.subText, this.wechatAccount, this.qrcode});

  OfficalWxchatList.fromJson(Map<String, dynamic> json) {
    index = json['index'];
    text = json['text'];
    subText = json['sub_text'];
    wechatAccount = json['wechat_account'];
    qrcode = json['qrcode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['index'] = this.index;
    data['text'] = this.text;
    data['sub_text'] = this.subText;
    data['wechat_account'] = this.wechatAccount;
    data['qrcode'] = this.qrcode;
    return data;
  }
}
