/// 重试同步状态
///
/// 对应 api_retry 表中 synced 字段的值
enum RetryStatus {
  notYet(0),
  success(1),
  failed(-1),
  cancel(2),
  replace(3);

  const RetryStatus(this.value);

  final int value;

  static RetryStatus fromValue(int value) {
    return RetryStatus.values.firstWhere(
      (e) => e.value == value,
      orElse: () => RetryStatus.notYet,
    );
  }
}
