GetDzSellerConfModel.dart 3.75 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;

  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});

  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'];
  }

  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;

    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;
  }
}