import 'package:job_app/models/company.dart'; class MeetingModel{ int id; int date; int time; int durationmunits; CompanyModel company; String subject; int timestmp; MeetingModel({ this.id, this.date, this.time, this.durationmunits, this.company, this.subject, this.timestmp, }); factory MeetingModel.fromJson(Map json) => MeetingModel( id: json["id"], date: json["date"], time: json["time"], durationmunits: json["durationmunits"], company: CompanyModel.fromJson(json["company"]), subject: json["subject"], timestmp: json["timestmp"], ); Map toJson() => { "id": id, "date": date, "time": time, "durationmunits": durationmunits, "company": company.toJson(), "subject": subject, "timestmp": timestmp, }; }