today_overview_model.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'today_overview_model.g.dart';
  3. /// 今日概况模型
  4. @JsonSerializable()
  5. class TodayOverviewModel {
  6. @JsonKey(name: 'today_arrived_total')
  7. final int? todayArrivedTotal; // 预约到诊人数
  8. @JsonKey(name: 'today_appointment_total')
  9. final int todayAppointmentTotal; // 今日预约人数
  10. @JsonKey(name: 'today_registration_total')
  11. final int? todayRegistrationTotal; // 今日挂号人数
  12. @JsonKey(name: 'today_visit_total')
  13. final int? todayVisitTotal; // 今日就诊人数
  14. @JsonKey(name: 'today_new_patient_total')
  15. final int? todayNewPatientTotal; // 今日新增患者
  16. @JsonKey(name: 'today_revenue_total')
  17. final int? todayRevenueTotal; // 今日收入
  18. @JsonKey(name: 'today_average_order_price')
  19. final int? todayAverageOrderPrice; // 今日客单价
  20. @JsonKey(name: 'inventory_warning_count')
  21. final int? inventoryWarningCount; // 库存预警品种数量
  22. @JsonKey(name: 'validity_warning_count')
  23. final int? validityWarningCount; // 效期预警品种数量
  24. TodayOverviewModel({
  25. this.todayArrivedTotal,
  26. required this.todayAppointmentTotal,
  27. this.todayRegistrationTotal,
  28. this.todayVisitTotal,
  29. this.todayNewPatientTotal,
  30. this.todayRevenueTotal,
  31. this.todayAverageOrderPrice,
  32. this.inventoryWarningCount,
  33. this.validityWarningCount
  34. });
  35. /// 从 JSON 创建 TodayOverviewModel
  36. factory TodayOverviewModel.fromJson(Map<String, dynamic> json) =>
  37. _$TodayOverviewModelFromJson(json);
  38. /// 转换为 JSON
  39. Map<String, dynamic> toJson() => _$TodayOverviewModelToJson(this);
  40. }