/// 设备实体
class DeviceModel {
  /// 蓝牙名称
  final String bleName;

  /// 产品名称
  final String productName;

  /// MAC地址
  final String mac;

  /// 型号
  final String model;

  /// 设备类型
  final String type;

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

  factory DeviceModel.fromJson(Map<String, dynamic> jsonMap) {
    return DeviceModel(
      bleName: jsonMap["BleName"],
      productName: jsonMap["ProductName"],
      mac: jsonMap["Mac"],
      model: jsonMap["Model"],
      type: jsonMap["Type"],
    );
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> jsonMap = {
      "BleName": bleName,
      "ProductName": productName,
      "Mac": mac,
      "Model": model,
      "Type": type,
    };
    return jsonMap;
  }
}
