GetDzSellerConfModel.dart 6.71 KB
import 'dart:convert' as convert;

class GetDzSellerConfModel {
  int ret;
  GetDzSellerConfSunModel data;
  String msg;

  GetDzSellerConfModel({this.ret, this.data, this.msg});

  GetDzSellerConfModel.fromJson(Map<String, dynamic> json) {
    ret = json['ret'];
    data = json['data'] != null
        ? new GetDzSellerConfSunModel.fromJson(json['data'])
        : null;
    msg = json['msg'];
  }

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

class GetDzSellerConfSunModel {
  String id;
  String sid;
  String isSms;
  String templateId;
  String isOpenOrder;
  String isOpenWine;
  String dzVersion;
  String isCheckedCall;
  String isCheckedApp;
  String isCheckedLite;
  String reserveMode;
  String isDisplayDish;
  String isNewTemplate;
  AllCookStyle cookStyle;
  String cdate;
  String isStoreSms;
  String storeDate;

  String isShowPrice;
  String isOpenCancel;

  String isNotice;
  String isMarketing;

  String saiyouyun;
  Bookinginfo bookinginfo;
  String isAllowUpdate;
  List<String> isShowRnamePhone;

  String isShowNoticeDeposit;
  String depositPrice;
  String liteStyle;

  String storePushMeg;
  String storePushSms;

  GetDzSellerConfSunModel(
      {this.id,
      this.sid,
      this.isSms,
      this.templateId,
      this.isOpenOrder,
      this.isOpenWine,
      this.dzVersion,
      this.isCheckedCall,
      this.isCheckedApp,
      this.isCheckedLite,
      this.reserveMode,
      this.isDisplayDish,
      this.isNewTemplate,
      this.cookStyle,
      this.cdate,
      this.isStoreSms,
      this.storeDate,
      this.isShowPrice,
      this.isOpenCancel,
      this.isNotice,
      this.isMarketing,
      this.saiyouyun,
      this.bookinginfo,
      this.isAllowUpdate,
      this.isShowRnamePhone,
      this.isShowNoticeDeposit,
      this.depositPrice,
      this.liteStyle,
      this.storePushMeg,
      this.storePushSms});

  GetDzSellerConfSunModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    sid = json['sid'];
    isSms = json['is_sms'];
    templateId = json['template_id'];
    isOpenOrder = json['is_open_order'];
    isOpenWine = json['is_open_wine'];
    dzVersion = json['dz_version'];
    isCheckedCall = json['is_checked_call'];
    isCheckedApp = json['is_checked_app'];
    isCheckedLite = json['is_checked_lite'];
    reserveMode = json['reserve_mode'];
    isDisplayDish = json['is_display_dish'];
    isNewTemplate = json['is_new_template'];
    cookStyle = json['cook_style'] == null
        ? null
        : AllCookStyle.fromJson(convert.json.decode(json['cook_style']));
    cdate = json['cdate'];
    isStoreSms = json['is_store_sms'];
    storeDate = json['store_date'];
    isShowPrice = json['is_show_price'];
    isOpenCancel = json['is_open_cancel_temp'];
    isNotice = json['is_seller_notice'];
    isMarketing = json['is_seller_marketing'];
    saiyouyun = json['saiyouyun'];
    bookinginfo = json['bookinginfo'] != null && json['bookinginfo'] != false
        ? new Bookinginfo.fromJson(json['bookinginfo'])
        : null;
    isAllowUpdate = json['is_allow_update'] ?? '1';

    isShowRnamePhone = [];

    if (json['is_show_ranme_phone'] != null &&
        json['is_show_ranme_phone'] != '') {
      convert.json.decode(json['is_show_ranme_phone']).forEach((v) {
        isShowRnamePhone.add(v);
      });
    }
    isShowNoticeDeposit = json['is_show_notice_deposit'];
    depositPrice = json['deposit_price'];
    liteStyle = json['lite_style'];

    storePushMeg = json['store_push_meg'];
    storePushSms = json['store_push_sms'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['sid'] = this.sid;
    data['is_sms'] = this.isSms;
    data['template_id'] = this.templateId;
    data['is_open_order'] = this.isOpenOrder;
    data['is_open_wine'] = this.isOpenWine;
    data['dz_version'] = this.dzVersion;
    data['is_checked_call'] = this.isCheckedCall;
    data['is_checked_app'] = this.isCheckedApp;
    data['is_checked_lite'] = this.isCheckedLite;
    data['reserve_mode'] = this.reserveMode;
    data['is_display_dish'] = this.isDisplayDish;
    data['is_new_template'] = this.isNewTemplate;
    data['cook_style'] = this.cookStyle;
    data['cdate'] = this.cdate;
    data['is_store_sms'] = this.isStoreSms;
    data['store_date'] = this.storeDate;
    data['is_show_price'] = this.isShowPrice;
    data['is_open_cancel_temp'] = this.isOpenCancel;
    data['is_seller_notice'] = this.isNotice;
    data['is_seller_marketing'] = this.isMarketing;
    data['saiyouyun'] = this.saiyouyun;
    if (this.bookinginfo != null) {
      data['bookinginfo'] = this.bookinginfo.toJson();
    }
    data['is_allow_update'] = this.isAllowUpdate;
    data['is_show_ranme_phone'] = this.isShowRnamePhone;
    data['is_show_notice_deposit'] = this.isShowNoticeDeposit;
    data['deposit_price'] = this.depositPrice;
    data['lite_style'] = this.liteStyle;
    data['store_push_meg'] = this.storePushMeg;
    data['store_push_sms'] = this.storePushSms;
    return data;
  }
}

class InputSetting {
  String uid;
  String isShowName;
  String isShowPhone;

  InputSetting({this.uid, this.isShowName, this.isShowPhone});

  InputSetting.fromJson(Map<String, dynamic> json) {
    uid = json['uid'];
    isShowName = json['is_show_name'];
    isShowPhone = json['is_show_phone'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['uid'] = this.uid;
    data['is_show_name'] = this.isShowName;
    data['is_show_phone'] = this.isShowPhone;
    return data;
  }
}

class Bookinginfo {
  String id;
  String sid;
  String smsCode;
  String content;

  Bookinginfo({this.id, this.sid, this.smsCode, this.content});

  Bookinginfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    sid = json['sid'];
    smsCode = json['sms_code'];
    content = json['content'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['sid'] = this.sid;
    data['sms_code'] = this.smsCode;
    data['content'] = this.content;
    return data;
  }
}

class AllCookStyle {
  String menuThemeColor;
  String index;

  AllCookStyle({
    this.menuThemeColor,
    this.index,
  });

  AllCookStyle.fromJson(Map<String, dynamic> json) {
    menuThemeColor = json['menu_theme_color'];
    index = json['index'] ?? "0";
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['menu_theme_color'] = this.menuThemeColor;
    data['index'] = this.index ?? '0';
    return data;
  }
}