class PatientAppointmentJourneyModel { int totalItemsCount; List data; int messageStatus; String message; PatientAppointmentJourneyModel( {this.totalItemsCount, this.data, this.messageStatus, this.message}); PatientAppointmentJourneyModel.fromJson(Map json) { totalItemsCount = json['totalItemsCount']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data.add(new Data.fromJson(v)); }); } messageStatus = json['messageStatus']; message = json['message']; } Map toJson() { final Map data = new Map(); data['totalItemsCount'] = this.totalItemsCount; if (this.data != null) { data['data'] = this.data.map((v) => v.toJson()).toList(); } data['messageStatus'] = this.messageStatus; data['message'] = this.message; return data; } } class Data { int id; int callType; String calledOn; dynamic servedStartOn; dynamic servedEndOn; bool isAppeared; bool isServed; dynamic roomNo; Data( {this.id, this.callType, this.calledOn, this.servedStartOn, this.servedEndOn, this.isAppeared, this.isServed, this.roomNo}); Data.fromJson(Map json) { id = json['id']; callType = json['callType']; calledOn = json['calledOn']; servedStartOn = json['servedStartOn']; servedEndOn = json['servedEndOn']; isAppeared = json['isAppeared']; isServed = json['isServed']; roomNo = json['roomNo']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['callType'] = this.callType; data['calledOn'] = this.calledOn; data['servedStartOn'] = this.servedStartOn; data['servedEndOn'] = this.servedEndOn; data['isAppeared'] = this.isAppeared; data['isServed'] = this.isServed; data['roomNo'] = this.roomNo; return data; } }