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

48 lines
1.0 KiB
Dart

class PackageModel {
final int id;
final String name;
final String price;
final int duration;
final String description;
final int type;
final int noOfService;
final String createdDate;
PackageModel({
required this.id,
required this.name,
required this.price,
required this.duration,
required this.description,
required this.type,
required this.noOfService,
required this.createdDate,
});
factory PackageModel.fromJson(Map<String, dynamic> json) {
return PackageModel(
id: json['id'],
name: json['name'],
price: json['price'],
duration: json['duration'],
description: json['description'],
type: json['type'],
noOfService: json['no_of_service'],
createdDate: json['created_date'],
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'price': price,
'duration': duration,
'description': description,
'type': type,
'no_of_service': noOfService,
'created_date': createdDate,
};
}
}