Files
workavia-mail-front/forward/lib/forward/tmail_forward.dart
T
dab246 7b23424e32 TF-1487 Fix run command flutter test
(cherry picked from commit 798b5613d2cc98223c7c236545c244c1499dc982)
2023-03-10 21:10:36 +07:00

43 lines
1.0 KiB
Dart

import 'package:forward/forward/converter/forward_id_nullable_converter.dart';
import 'package:forward/forward/forward.dart';
import 'package:forward/forward/forward_id.dart';
import 'package:json_annotation/json_annotation.dart';
part 'tmail_forward.g.dart';
@ForwardIdNullableConverter()
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class TMailForward extends Forward {
final ForwardId? id;
final bool localCopy;
final Set<String> forwards;
TMailForward({
this.id,
required this.localCopy,
required this.forwards,
});
factory TMailForward.fromJson(Map<String, dynamic> json) =>
_$TMailForwardFromJson(json);
Map<String, dynamic> toJson() => _$TMailForwardToJson(this);
TMailForward copyWith({
ForwardId? id,
bool? localCopy,
Set<String>? forwards,
}) {
return TMailForward(
id: id ?? this.id,
localCopy: localCopy ?? this.localCopy,
forwards: forwards ?? this.forwards,
);
}
@override
List<Object?> get props => [
id,
localCopy,
forwards,
];
}