From bcbcc0982d1c302e9fd1cab3b6e27463531e9f03 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Wed, 7 Aug 2024 13:22:15 +0200 Subject: [PATCH] create business object --- .../patient_manager/lib/objects/business.dart | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Frontend/patient_manager/lib/objects/business.dart diff --git a/Frontend/patient_manager/lib/objects/business.dart b/Frontend/patient_manager/lib/objects/business.dart new file mode 100644 index 00000000..e901347d --- /dev/null +++ b/Frontend/patient_manager/lib/objects/business.dart @@ -0,0 +1,32 @@ +// ignore: file_names +class Business { + final String business_id; + final String Name; + final String type; + final String registration_no; + final String logo_name; + final String logo_path; + final String app_id; + + const Business( + this.business_id, + this.Name, + this.type, + this.registration_no, + this.logo_name, + this.logo_path, + this.app_id, + ); + + factory Business.fromJson(dynamic json) { + return Business( + json['business_id'], + json['Name'], + json['type'], + json['registration_no'], + json['logo_name'], + json['logo_path'], + json['app_id'], + ); + } +}