APP_NEW/lib/Class/Diagnosis/posture_issue.dart
2025-03-11 21:17:14 +08:00

23 lines
609 B
Dart

import 'package:lamiter/Class/Entity/entity.dart';
class PostureIssue extends Entity {
final List<String> relatedSymptomsIds; // todo db
PostureIssue({
required super.id,
required super.name,
required this.relatedSymptomsIds,
});
// Named constructor from JSON
PostureIssue.fromJson(Map<String, dynamic> json)
: relatedSymptomsIds = (json['relatedSymptomsIds'] as List<dynamic>?)
?.map((item) => item as String)
.toList() ??
[],
super(
id: json['_id'] as String,
name: json['name'] as String,
);
}