app-starlock/lib/main/lockDetail/checkingIn/checkingInList/checkingInListMonth_entity.dart
2024-05-18 09:37:50 +08:00

81 lines
2.2 KiB
Dart
Executable File

class CheckingInListMonthEntity {
int? errorCode;
String? description;
String? errorMsg;
List<AttendanceRecordMonthList>? data;
CheckingInListMonthEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
CheckingInListMonthEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
if (json['data'] != null) {
data = <AttendanceRecordMonthList>[];
json['data'].forEach((v) {
data!.add(AttendanceRecordMonthList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
return data;
}
}
class AttendanceRecordMonthList {
String? headurl;
int? isSelf;
String? staffName;
int? staffId;
int? attendanceType;
int? countryCode;
int? openingTimeStart;
String? attendanceWay;
int? avgTime;
AttendanceRecordMonthList(
{this.headurl,
this.isSelf,
this.staffName,
this.staffId,
this.attendanceType,
this.countryCode,
this.openingTimeStart,
this.attendanceWay,
this.avgTime});
AttendanceRecordMonthList.fromJson(Map<String, dynamic> json) {
headurl = json['headurl'];
isSelf = json['isSelf'];
staffName = json['staffName'];
staffId = json['staffId'];
attendanceType = json['attendanceType'];
countryCode = json['countryCode'];
openingTimeStart = json['openingTimeStart'];
attendanceWay = json['attendanceWay'];
avgTime = json['avgTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['headurl'] = headurl;
data['isSelf'] = isSelf;
data['staffName'] = staffName;
data['staffId'] = staffId;
data['attendanceType'] = attendanceType;
data['countryCode'] = countryCode;
data['openingTimeStart'] = openingTimeStart;
data['attendanceWay'] = attendanceWay;
data['avgTime'] = avgTime;
return data;
}
}