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

38 lines
769 B
Dart

class EnquiryModel {
String? mobile;
String? name;
String? serviceId;
String? message;
String? email;
EnquiryModel({
this.mobile,
this.name,
this.serviceId,
this.message,
this.email,
});
// Factory method to create an EnquiryModel from a JSON map
factory EnquiryModel.fromJson(Map<String, dynamic> json) {
return EnquiryModel(
mobile: json['mobile'],
name: json['name'],
serviceId: json['service_id'],
message: json['message'],
email: json['email'],
);
}
// Method to convert EnquiryModel to a JSON map
Map<String, dynamic> toJson() {
return {
'mobile': mobile,
'name': name,
'service_id': serviceId,
'message': message,
'email': email,
};
}
}