Files
fcs/lib/domain/entities/processing.dart

43 lines
887 B
Dart
Raw Normal View History

2020-12-01 19:02:21 +06:30
import 'package:fcs/domain/entities/package.dart';
class Processing {
2021-09-10 14:27:38 +06:30
String? id;
2020-12-01 19:02:21 +06:30
//for consignee
2021-09-10 14:27:38 +06:30
String? userID;
String? userName;
String? userPhoneNumber;
2020-12-01 19:02:21 +06:30
//for shipper
2021-09-10 14:27:38 +06:30
String? fcsID;
String? shipperName;
String? shipperPhoneNumber;
2020-12-01 19:02:21 +06:30
List<Package> packages;
Processing(
{this.id,
this.userID,
this.userName,
this.userPhoneNumber,
this.fcsID,
this.shipperName,
this.shipperPhoneNumber,
2021-09-10 14:27:38 +06:30
this.packages = const []});
2020-12-01 19:02:21 +06:30
@override
bool operator ==(Object other) => other is Processing && other.id == id;
@override
int get hashCode => id.hashCode;
bool isChangedForEdit(Processing processing) {
return processing.userID != this.userID ||
processing.fcsID != this.fcsID ||
processing.packages != this.packages;
}
2020-12-01 19:02:21 +06:30
@override
String toString() {
return 'Processing{id: $id}';
}
}