Files
fcs/lib/domain/vo/shipment_status.dart

26 lines
623 B
Dart
Raw Normal View History

2020-09-17 06:02:48 +06:30
import 'package:cloud_firestore/cloud_firestore.dart';
2020-09-15 07:13:41 +06:30
class ShipmentStatus {
String status;
2025-02-17 20:13:30 +06:30
DateTime? date;
2021-09-10 14:27:38 +06:30
bool? done;
String? staffId;
String? staffName;
2020-12-10 20:06:15 +06:30
ShipmentStatus(
2021-09-10 14:27:38 +06:30
{required this.status,
2025-02-17 20:13:30 +06:30
this.date,
2021-09-10 14:27:38 +06:30
this.done,
this.staffId,
this.staffName});
2020-09-17 06:02:48 +06:30
factory ShipmentStatus.fromMap(Map<String, dynamic> map) {
2025-02-17 20:13:30 +06:30
var _date = map['date'] != null ? (map['date'] as Timestamp) : null;
2020-09-17 06:02:48 +06:30
return ShipmentStatus(
2020-12-10 20:06:15 +06:30
status: map['status'],
2025-02-17 20:13:30 +06:30
date: _date?.toDate(),
2020-12-10 20:06:15 +06:30
done: map['done'],
staffId: map['staff_id'],
staffName: map['staff_name']);
2020-09-17 06:02:48 +06:30
}
2020-09-15 07:13:41 +06:30
}