INFRA: Set Up Project.
This commit is contained in:
21
lib/models/favourite_item_model.dart
Normal file
21
lib/models/favourite_item_model.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
class FavouriteItemModel {
|
||||
String? storeId;
|
||||
String? userId;
|
||||
String? productId;
|
||||
String? sectionId;
|
||||
|
||||
FavouriteItemModel({this.storeId, this.userId, this.productId, this.sectionId});
|
||||
|
||||
factory FavouriteItemModel.fromJson(Map<String, dynamic> parsedJson) {
|
||||
return FavouriteItemModel(
|
||||
storeId: parsedJson["store_id"] ?? "",
|
||||
userId: parsedJson["user_id"] ?? "",
|
||||
productId: parsedJson["product_id"] ?? "",
|
||||
sectionId: parsedJson["section_id"] ?? "",
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {"store_id": storeId, "user_id": userId, "product_id": productId, "section_id": sectionId};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user