/// 设备信息
class DeviceInfo {
  /// 蓝牙名称
  final String bleName;

  /// 产品名称
  final String productName;

  /// MAC地址
  final String mac;

  /// 型号
  final String model;

  /// 设备类型
  final String type;

  DeviceInfo({
    required this.bleName,
    required this.productName,
    required this.mac,
    required this.model,
    required this.type,
  });

  factory DeviceInfo.fromEventData(Map<String, dynamic> jsonMap) {
    return DeviceInfo(
      mac: jsonMap["MAC"],
      model: jsonMap["MODEL"],
      bleName: jsonMap["BLE_NAME"],
      productName: jsonMap["BLE_PRODUCT_NAME"],
      type: jsonMap["TYPE"],
    );
  }
}
