bookmywages/lib/model/enquriy_list_model.dart
2025-10-16 11:21:52 +05:30

63 lines
1.5 KiB
Dart

class EnquiryListModel {
final int id;
final String name;
final String mobile;
final String email;
final int serviceId;
final int userId;
final String message;
final String createdDate;
final String serviceName;
final String vendorName;
final List<String> images1;
EnquiryListModel({
required this.id,
required this.name,
required this.mobile,
required this.email,
required this.serviceId,
required this.userId,
required this.message,
required this.createdDate,
required this.serviceName,
required this.vendorName,
required this.images1,
});
factory EnquiryListModel.fromJson(Map<String, dynamic> json) {
return EnquiryListModel(
id: json['id'] ?? 0,
name: json['name'] ?? '',
mobile: json['mobile'] ?? '',
email: json['email'] ?? '',
serviceId: json['service_id'] ?? 0,
userId: json['user_id'] ?? 0,
message: json['message'] ?? '',
createdDate: json['created_date'] ?? '',
serviceName: json['service_name'] ?? '',
vendorName: json['vendorname'] ?? '',
images1: List<String>.from(json['images1'] ?? []),
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'mobile': mobile,
'email': email,
'service_id': serviceId,
'user_id': userId,
'message': message,
'created_date': createdDate,
'service_name': serviceName,
'vendorname': vendorName,
'images1': images1,
};
}
}