/// 离线数据同步状态
enum OfflineDataSyncState {
  /// 待同步
  wait,

  /// 同步成功
  success,

  /// 同步失败
  fail,
}

/// 同步类型
enum OfflineDataSyncType {
  /// 新建
  create,

  /// 更新
  update,
}

extension OfflineDataSyncStateExt on OfflineDataSyncState {
  static final _nameMap = {
    OfflineDataSyncState.wait: "未上传",
    OfflineDataSyncState.success: "已上传",
    OfflineDataSyncState.fail: "上传失败",
  };
  String getDescription() => _nameMap[this]!;
}

extension OfflineDataSyncTypeExt on OfflineDataSyncType {
  static final _nameMap = {
    OfflineDataSyncType.create: "新建",
    OfflineDataSyncType.update: "更新",
  };
  String getDescription() => _nameMap[this]!;
}
