import 'image.dart'; class CompanyModel { int id; int employeecount; String location; String expeditorname; String description; String country; String city; String zip; String phone; String mail; String name; ImageModel image; int timestmp; CompanyModel({ this.id, this.employeecount, this.location, this.expeditorname, this.description, this.country, this.city, this.zip, this.phone, this.mail, this.name, this.image, this.timestmp, }); factory CompanyModel.fromJson(Map json) => CompanyModel( id: json["id"], employeecount: json["employeecount"], location: json["location"], expeditorname: json["expeditorname"], description: json["description"], country: json["country"], city: json["city"], zip: json["zip"], phone: json["phone"], mail: json["mail"], name: json["name"], image: json["image"] == null ? null : ImageModel.fromJson(json["image"]), timestmp: json["timestmp"], ); Map toJson() => { "id": id, "employeecount": employeecount, "location": location, "expeditorname": expeditorname, "description": description, "country": country, "city": city, "zip": zip, "phone": phone, "mail": mail, "name": name, "image": image == null ? null : image.toJson(), "timestmp": timestmp, }; }