49 lines
1.2 KiB
Dart
49 lines
1.2 KiB
Dart
|
|
import 'package:equatable/equatable.dart';
|
||
|
|
|
||
|
|
class DeviceTaskEntity extends Equatable {
|
||
|
|
final int id;
|
||
|
|
final String deviceId;
|
||
|
|
final String taskStatus;
|
||
|
|
final String taskStatusTranslate;
|
||
|
|
final int? routeId;
|
||
|
|
final int? siteId;
|
||
|
|
final int? orgId;
|
||
|
|
final String? createTime;
|
||
|
|
|
||
|
|
const DeviceTaskEntity({
|
||
|
|
required this.id,
|
||
|
|
required this.deviceId,
|
||
|
|
required this.taskStatus,
|
||
|
|
required this.taskStatusTranslate,
|
||
|
|
this.routeId,
|
||
|
|
this.siteId,
|
||
|
|
this.orgId,
|
||
|
|
this.createTime,
|
||
|
|
});
|
||
|
|
|
||
|
|
factory DeviceTaskEntity.fromJson(Map<String, dynamic> json) {
|
||
|
|
return DeviceTaskEntity(
|
||
|
|
id: json['id'] as int,
|
||
|
|
deviceId: json['deviceId'] as String? ?? '',
|
||
|
|
taskStatus: json['taskStaus'] as String? ?? '',
|
||
|
|
taskStatusTranslate: json['taskStausTranslate'] as String? ?? '',
|
||
|
|
routeId: json['routeId'] as int?,
|
||
|
|
siteId: json['siteId'] as int?,
|
||
|
|
orgId: json['orgId'] as int?,
|
||
|
|
createTime: json['createTime'] as String?,
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
List<Object?> get props => [
|
||
|
|
id,
|
||
|
|
deviceId,
|
||
|
|
taskStatus,
|
||
|
|
taskStatusTranslate,
|
||
|
|
routeId,
|
||
|
|
siteId,
|
||
|
|
orgId,
|
||
|
|
createTime,
|
||
|
|
];
|
||
|
|
}
|