app-starlock/lib/main/lockDetail/checkingIn/checkingInList/checkingInListDay_entity.dart

109 lines
2.9 KiB
Dart
Raw Normal View History

class CheckingInListDayEntity {
CheckingInListDayEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
CheckingInListDayEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
int? errorCode;
String? description;
String? errorMsg;
Data? data;
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!.toJson();
}
return data;
}
}
class Data {
Data(
{this.noPunchTimes,
this.lateTimes,
this.earlyTimes,
this.attendanceRecordList});
Data.fromJson(Map<String, dynamic> json) {
noPunchTimes = json['noPunchTimes'];
lateTimes = json['lateTimes'];
earlyTimes = json['earlyTimes'];
if (json['attendanceRecordList'] != null) {
attendanceRecordList = <AttendanceRecordDayList>[];
json['attendanceRecordList'].forEach((v) {
attendanceRecordList!.add(AttendanceRecordDayList.fromJson(v));
});
}
}
int? noPunchTimes;
int? lateTimes;
int? earlyTimes;
List<AttendanceRecordDayList>? attendanceRecordList;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['noPunchTimes'] = noPunchTimes;
data['lateTimes'] = lateTimes;
data['earlyTimes'] = earlyTimes;
if (attendanceRecordList != null) {
data['attendanceRecordList'] =
attendanceRecordList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class AttendanceRecordDayList {
AttendanceRecordDayList(
{this.headurl,
this.isSelf,
this.staffName,
this.staffId,
this.attendanceType,
this.openingTimeEnd,
this.openingTimeStart,
this.colorType});
AttendanceRecordDayList.fromJson(Map<String, dynamic> json) {
headurl = json['headurl'];
isSelf = json['isSelf'];
staffName = json['staffName'];
staffId = json['staffId'];
attendanceType = json['attendanceType'];
openingTimeEnd = json['openingTimeEnd'];
openingTimeStart = json['openingTimeStart'];
colorType = json['colorType'];
}
String? headurl;
int? isSelf;
String? staffName;
int? staffId;
int? attendanceType;
int? openingTimeEnd;
int? openingTimeStart;
int? colorType;
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['openingTimeEnd'] = openingTimeEnd;
data['openingTimeStart'] = openingTimeStart;
data['colorType'] = colorType;
return data;
}
}