selfprivacy.org.app/lib/logic/models/json/recovery_token_status.dart
NaiJi 2ac8e4366b Linting!
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
2022-06-06 01:40:34 +03:00

34 lines
742 B
Dart

import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'recovery_token_status.g.dart';
@JsonSerializable()
class RecoveryKeyStatus extends Equatable {
factory RecoveryKeyStatus.fromJson(final Map<String, dynamic> json) =>
_$RecoveryKeyStatusFromJson(json);
const RecoveryKeyStatus({
required this.exists,
required this.valid,
this.date,
this.expiration,
this.usesLeft,
});
final bool exists;
final DateTime? date;
final DateTime? expiration;
@JsonKey(name: 'uses_left')
final int? usesLeft;
final bool valid;
@override
List<Object?> get props => [
exists,
date,
expiration,
usesLeft,
valid,
];
}