import 'dart:convert'; class TodayMeetingModel { List? meetings; String? note; TodayMeetingModel({ this.meetings, this.note, }); factory TodayMeetingModel.fromRawJson(String str) => TodayMeetingModel.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory TodayMeetingModel.fromJson(Map json) => TodayMeetingModel( meetings: json["meetings"] == null ? [] : List.from(json["meetings"]!.map((x) => Meeting.fromJson(x))), note: json["note"], ); Map toJson() => { "meetings": meetings == null ? [] : List.from(meetings!.map((x) => x.toJson())), "note": note, }; } class Meeting { int? id; int? locationsId; int? subjectId; int? managerId; int? ownerId; String? azHour; String? taHour; dynamic description; int? status; int? accepted; DateTime? dateMeeting; DateTime? endDate; DateTime? createdAt; DateTime? updatedAt; String? dateJalali; String? statusTxt; String? az; String? ta; Location? location; Subject? subject; Meeting({ this.id, this.locationsId, this.subjectId, this.managerId, this.ownerId, this.azHour, this.taHour, this.description, this.status, this.accepted, this.dateMeeting, this.endDate, this.createdAt, this.updatedAt, this.dateJalali, this.statusTxt, this.az, this.ta, this.location, this.subject, }); factory Meeting.fromRawJson(String str) => Meeting.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory Meeting.fromJson(Map json) => Meeting( id: json["id"], locationsId: json["locations_id"], subjectId: json["subject_id"], managerId: json["manager_id"], ownerId: json["owner_id"], azHour: json["az_hour"], taHour: json["ta_hour"], description: json["description"], status: json["status"], accepted: json["accepted"], dateMeeting: json["date_meeting"] == null ? null : DateTime.parse(json["date_meeting"]), endDate: json["end_date"] == null ? null : DateTime.parse(json["end_date"]), createdAt: json["created_at"] == null ? null : DateTime.parse(json["created_at"]), updatedAt: json["updated_at"] == null ? null : DateTime.parse(json["updated_at"]), dateJalali: json["date_jalali"], statusTxt: json["status_txt"], az: json["az"], ta: json["ta"], location: json["location"] == null ? null : Location.fromJson(json["location"]), subject: json["subject"] == null ? null : Subject.fromJson(json["subject"]), ); Map toJson() => { "id": id, "locations_id": locationsId, "subject_id": subjectId, "manager_id": managerId, "owner_id": ownerId, "az_hour": azHour, "ta_hour": taHour, "description": description, "status": status, "accepted": accepted, "date_meeting": dateMeeting?.toIso8601String(), "end_date": endDate?.toIso8601String(), "created_at": createdAt?.toIso8601String(), "updated_at": updatedAt?.toIso8601String(), "date_jalali": dateJalali, "status_txt": statusTxt, "az": az, "ta": ta, "location": location?.toJson(), "subject": subject?.toJson(), }; } class Location { int? id; String? address; String? addressEn; DateTime? createdAt; DateTime? updatedAt; Location({ this.id, this.address, this.addressEn, this.createdAt, this.updatedAt, }); factory Location.fromRawJson(String str) => Location.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory Location.fromJson(Map json) => Location( id: json["id"], address: json["address"], addressEn: json["address_en"], createdAt: json["created_at"] == null ? null : DateTime.parse(json["created_at"]), updatedAt: json["updated_at"] == null ? null : DateTime.parse(json["updated_at"]), ); Map toJson() => { "id": id, "address": address, "address_en": addressEn, "created_at": createdAt?.toIso8601String(), "updated_at": updatedAt?.toIso8601String(), }; } class Subject { int? id; dynamic subject; dynamic subjectEn; DateTime? createdAt; DateTime? updatedAt; Subject({ this.id, this.subject, this.subjectEn, this.createdAt, this.updatedAt, }); factory Subject.fromRawJson(String str) => Subject.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory Subject.fromJson(Map json) => Subject( id: json["id"], subject: json["subject"], subjectEn: json["subject_en"], createdAt: json["created_at"] == null ? null : DateTime.parse(json["created_at"]), updatedAt: json["updated_at"] == null ? null : DateTime.parse(json["updated_at"]), ); Map toJson() => { "id": id, "subject": subject, "subject_en": subjectEn, "created_at": createdAt?.toIso8601String(), "updated_at": updatedAt?.toIso8601String(), }; }