fbmobile/lib/core/models/rest/rest_error.dart
2023-01-16 01:44:51 +01:00

24 lines
508 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'rest_error.g.dart';
@JsonSerializable()
class RestError {
final String status;
final String message;
@JsonKey(name: "error_id")
final String errorId;
RestError({
required this.status,
required this.message,
required this.errorId,
}); // JSON Init
factory RestError.fromJson(Map<String, dynamic> json) =>
_$RestErrorFromJson(json);
// JSON Export
Map<String, dynamic> toJson() => _$RestErrorToJson(this);
}