class AppVersionInfo {
  /// 对客户端版本信息的整体描述
  final String versionInfoStr;

  ///壳子和客户端混合版本号
  final String mixedVersion;

  ///Flutter编译的web应用版本号
  final String flyinsonoVersion;

  /// Avalonia壳子的版本号
  final String shellVersion;

  /// 主版本号
  /// 对于新版杏聆荟来讲，主版本号为2.0.0
  final String mainVersion;

  AppVersionInfo({
    required this.versionInfoStr,
    required this.mixedVersion,
    required this.flyinsonoVersion,
    required this.shellVersion,
    required this.mainVersion,
  });

  factory AppVersionInfo.fromJson(Map<String, dynamic> json) {
    return AppVersionInfo(
      versionInfoStr: json['VersionInfoStr'],
      mixedVersion: json['MixedVersion'],
      flyinsonoVersion: json['FlyinsonoVersion'],
      shellVersion: json['ShellVersion'],
      mainVersion: json['MainVersion'],
    );
  }
}

class PatientModel {
  final String key;
  final String label;

  final bool required;
  String? showType;
  String? value;

  /// 数据是dynamic格式的
  final List<dynamic>? source;

  PatientModel({
    required this.key,
    required this.label,
    required this.required,
    this.showType,
    this.value = '',
    this.source,
  });

  factory PatientModel.fromJson(Map<String, dynamic> json) {
    return PatientModel(
      key: json['key'],
      label: json['label'],
      showType: json['ShowType'],
      required: json['Required'],
      source: json['Source'],
    );
  }
}
