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