38 lines
769 B
Dart
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,
|
|
};
|
|
}
|
|
}
|