import 'notification.m.dart'; import 'liveConsultation.m.dart'; class IdentityApplyDTO extends BaseDTO{ String? identityApplyCode; String? userCode; String? applyRoleCode; List? identityCard; List? licenseCard; ApplyStateEnum applyState; String? applyNote; List? fieldList; IdentityApplyDTO({ this.identityApplyCode, this.userCode, this.applyRoleCode, this.identityCard, this.licenseCard, this.applyState = ApplyStateEnum.NotApply, this.applyNote, this.fieldList, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory IdentityApplyDTO.fromJson(Map map) { return IdentityApplyDTO( identityApplyCode: map['IdentityApplyCode'], userCode: map['UserCode'], applyRoleCode: map['ApplyRoleCode'], identityCard: map['IdentityCard']?.cast().toList(), licenseCard: map['LicenseCard']?.cast().toList(), applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']), applyNote: map['ApplyNote'], fieldList: map['FieldList']?.cast().toList(), createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (identityApplyCode != null) map['IdentityApplyCode'] = identityApplyCode; if (userCode != null) map['UserCode'] = userCode; if (applyRoleCode != null) map['ApplyRoleCode'] = applyRoleCode; if (identityCard != null) map['IdentityCard'] = identityCard; if (licenseCard != null) map['LicenseCard'] = licenseCard; map['ApplyState'] = applyState.index; if (applyNote != null) map['ApplyNote'] = applyNote; if (fieldList != null) map['FieldList'] = fieldList; return map; } } class GetLastIdentityApplyRequest extends TokenRequest{ String? applyRoleCode; GetLastIdentityApplyRequest({ this.applyRoleCode, String? token, }) : super( token: token, ); factory GetLastIdentityApplyRequest.fromJson(Map map) { return GetLastIdentityApplyRequest( applyRoleCode: map['ApplyRoleCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (applyRoleCode != null) map['ApplyRoleCode'] = applyRoleCode; return map; } } class ApplyForRequest { String? token; String? extensionData; String? applyRoleCode; List? identityCard; List? licenseCard; List? fieldList; ApplyForRequest({ this.token, this.extensionData, this.applyRoleCode, this.identityCard, this.licenseCard, this.fieldList, }); factory ApplyForRequest.fromJson(Map map) { return ApplyForRequest( token: map['Token'], extensionData: map['ExtensionData'], applyRoleCode: map['ApplyRoleCode'], identityCard: map['IdentityCard']?.cast().toList(), licenseCard: map['LicenseCard']?.cast().toList(), fieldList: map['FieldList']?.cast().toList(), ); } Map toJson() { final map = Map(); if (token != null) { map['Token'] = token; } if (extensionData != null) { map['ExtensionData'] = extensionData; } if (applyRoleCode != null) { map['ApplyRoleCode'] = applyRoleCode; } if (identityCard != null) { map['IdentityCard'] = identityCard; } if (licenseCard != null) { map['LicenseCard'] = licenseCard; } if (fieldList != null) { map['FieldList'] = fieldList; } return map; } }