58 lines
1.7 KiB
Dart
58 lines
1.7 KiB
Dart
import 'package:ftc_mobile_app/models/clients/body_points_category.dart';
|
|
|
|
class HealthIssueDetailsModel {
|
|
String sId = "";
|
|
BodyPointsCategory? bodyPointsCategory;
|
|
bool status = false;
|
|
String healthNote = "";
|
|
String complaint = "";
|
|
String userId = "";
|
|
String createdAt = "";
|
|
String updatedAt = "";
|
|
int iV = -1;
|
|
String id = "";
|
|
|
|
HealthIssueDetailsModel(
|
|
{required this.sId,
|
|
required this.bodyPointsCategory,
|
|
required this.status,
|
|
required this.healthNote,
|
|
required this.complaint,
|
|
required this.userId,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
required this.iV,
|
|
required this.id});
|
|
|
|
HealthIssueDetailsModel.empty();
|
|
|
|
HealthIssueDetailsModel.fromJson(Map<String, dynamic> json) {
|
|
sId = json['_id'] ?? "";
|
|
bodyPointsCategory = json['category'] != null && json['category'] is Map
|
|
? BodyPointsCategory.fromJson(json['category'] ?? <String, dynamic>{} )
|
|
: null;
|
|
status = json['status']??''=="1";
|
|
healthNote = json['healthNote'] ?? "";
|
|
complaint = json['complaint'] ?? "";
|
|
userId = json['userId'] ?? "";
|
|
createdAt = json['createdAt'] ?? "";
|
|
updatedAt = json['updatedAt'] ?? "";
|
|
iV = json['__v'] ?? "";
|
|
id = json['id'] ?? "";
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['_id'] = sId;
|
|
data['category'] = bodyPointsCategory?.toJson();
|
|
data['status'] = status;
|
|
data['healthNote'] = healthNote;
|
|
data['complaint'] = complaint;
|
|
data['userId'] = userId;
|
|
data['createdAt'] = createdAt;
|
|
data['updatedAt'] = updatedAt;
|
|
data['__v'] = iV;
|
|
data['id'] = id;
|
|
return data;
|
|
}
|
|
} |