class EmployeeProfileModel { final bool status; final EmployeeData? data; EmployeeProfileModel({required this.status, this.data}); factory EmployeeProfileModel.fromJson(Map json) { return EmployeeProfileModel( status: json['status'] ?? false, data: json['data'] != null ? EmployeeData.fromJson(json['data']) : null, ); } Map toJson() { return {'status': status, 'data': data?.toJson()}; } } class EmployeeData { final int id; final String name; final String mobile; final String email; final int status; final int generalChat; final int createService; final Company? company; EmployeeData({ required this.id, required this.name, required this.mobile, required this.email, required this.status, required this.generalChat, required this.createService, this.company, }); factory EmployeeData.fromJson(Map json) { return EmployeeData( id: json['id'] ?? 0, name: json['name'] ?? '', mobile: json['mobile'] ?? '', email: json['email'] ?? '', status: json['status'] ?? 0, generalChat: json['general_chat'] ?? 0, createService: json['create_service'] ?? 0, company: json['company'] != null ? Company.fromJson(json['company']) : null, ); } Map toJson() { return { 'id': id, 'name': name, 'mobile': mobile, 'email': email, 'status': status, 'general_chat': generalChat, 'create_service': createService, 'company': company?.toJson(), }; } } class Company { final String? companyName; final String? companyLogo; Company({this.companyName, this.companyLogo}); factory Company.fromJson(Map json) { return Company( companyName: json['company_name'], companyLogo: json['company_logo'], ); } Map toJson() { return {'company_name': companyName, 'company_logo': companyLogo}; } }