退出登录+机器状态+切换设备+历史作业记录+设备信息
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class DeviceRunStatisticsEntity extends Equatable {
|
||||
final String startTime; // 开始时间
|
||||
final String endTime; // 结束时间
|
||||
final double workArea; // 工作面积
|
||||
final double? distance; // 工作距离(可为空)
|
||||
final int time; // 花费时间
|
||||
|
||||
const DeviceRunStatisticsEntity({
|
||||
required this.startTime,
|
||||
required this.endTime,
|
||||
required this.workArea,
|
||||
this.distance,
|
||||
required this.time,
|
||||
});
|
||||
|
||||
factory DeviceRunStatisticsEntity.fromJson(Map<String, dynamic> json) {
|
||||
return DeviceRunStatisticsEntity(
|
||||
startTime: json['startTime'] as String,
|
||||
endTime: json['endTime'] as String,
|
||||
workArea: (json['workArea'] as num).toDouble(),
|
||||
distance: json['distance'] != null ? (json['distance'] as num).toDouble() : null,
|
||||
time: json['time'] as int,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [startTime, endTime, workArea, distance, time];
|
||||
}
|
||||
Reference in New Issue
Block a user