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