/// 身份证识别数据
class ICReaderExamData {
  /// 姓名
  final String name;

  /// 性别
  final String gender;

  /// 民族
  final String nation;

  /// 生日
  final String birthday;

  /// 住址
  final String address;

  /// 证件号
  final String cardNo;

  /// 头像Base64
  final String? photo;

  ICReaderExamData({
    required this.name,
    required this.gender,
    required this.nation,
    required this.birthday,
    required this.address,
    required this.cardNo,
    required this.photo,
  });

  factory ICReaderExamData.fromEventData(Map<String, dynamic> jsonMap) {
    return ICReaderExamData(
      name: jsonMap["NAME"],
      gender: jsonMap["GENDER"],
      nation: jsonMap["NATION"],
      birthday: jsonMap["BIRTHDAY"],
      address: jsonMap["ADDRESS"],
      cardNo: jsonMap["CARD_NO"],
      photo: jsonMap["PHOTO"],
    );
  }
}
