class ExportDataItem extends ShellIOBaseData {
  ///下载地址
  final String url;

  ///扩展名
  final String typeName;

  ExportDataItem(
    String id,
    this.url,
    this.typeName,
    String name, {
    double progress = 0,
  }) : super(id, name, progress);
}

class ImportDataItem extends ShellIOBaseData {
  String? sampleDataSize;

  bool? isCheck;

  ImportDataItem({
    String name = "",
    required String id,
    this.sampleDataSize,
    this.isCheck,
    bool isDelete = false,
    double progress = 0,
  }) : super(id, name, progress);

  factory ImportDataItem.fromJson(Map<String, dynamic> map) {
    return ImportDataItem(
      name: map['SampleDataName'],
      id: map['SampleDataID'],
      sampleDataSize: map['SampleDataSize'],
      isCheck: map['IsCheck'],
      progress: map['Progress'],
    );
  }
}

abstract class ShellIOBaseData {
  ///名称
  final String name;

  ///下载进度
  double progress;

  final String id;

  ShellIOBaseData(this.id, this.name, this.progress);
}
