2022-12-27 05:13:07 +00:00
|
|
|
import 'package:equatable/equatable.dart';
|
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
|
|
|
|
part 'courier.g.dart';
|
|
|
|
|
|
|
|
@JsonSerializable()
|
|
|
|
class Courier extends Equatable {
|
|
|
|
factory Courier.fromJson(final Map<String, dynamic> json) =>
|
|
|
|
_$CourierFromJson(json);
|
|
|
|
|
2022-12-27 03:19:49 +00:00
|
|
|
Courier({
|
|
|
|
required this.name,
|
|
|
|
required this.surname,
|
|
|
|
required this.id,
|
|
|
|
required this.phone,
|
|
|
|
});
|
|
|
|
|
|
|
|
final String name;
|
|
|
|
final String surname;
|
|
|
|
final String phone;
|
|
|
|
final int id;
|
2022-12-27 05:13:07 +00:00
|
|
|
|
|
|
|
// tojson
|
|
|
|
Map<String, dynamic> toJson() => _$CourierToJson(this);
|
|
|
|
|
|
|
|
@override
|
|
|
|
List<Object?> get props => [
|
|
|
|
name,
|
|
|
|
surname,
|
|
|
|
phone,
|
|
|
|
id,
|
|
|
|
];
|
2022-12-27 03:19:49 +00:00
|
|
|
}
|