import 'liveConsultation.m.dart'; import 'notification.m.dart'; import 'upgrade.m.dart'; import 'education.m.dart'; import 'organization.m.dart'; import 'patient.m.dart'; import 'recordInfo.m.dart'; import 'package:fis_jsonrpc/utils.dart'; class GetUserInfoRequest extends TokenRequest{ GetUserInfoRequest({ String? token, }) : super( token: token, ); factory GetUserInfoRequest.fromJson(Map map) { return GetUserInfoRequest( token: map['Token'], ); } Map toJson() { final map = super.toJson(); return map; } } class AlterUserInfoRequest extends TokenRequest{ String? phone; String? email; String? nickName; String? fullName; String? headImageUrl; String? organizationCode; String? extensionData; String? shortCode; String? languageCode; AlterUserInfoRequest({ this.phone, this.email, this.nickName, this.fullName, this.headImageUrl, this.organizationCode, this.extensionData, this.shortCode, this.languageCode, String? token, }) : super( token: token, ); factory AlterUserInfoRequest.fromJson(Map map) { return AlterUserInfoRequest( phone: map['Phone'], email: map['Email'], nickName: map['NickName'], fullName: map['FullName'], headImageUrl: map['HeadImageUrl'], organizationCode: map['OrganizationCode'], extensionData: map['ExtensionData'], shortCode: map['ShortCode'], languageCode: map['LanguageCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (phone != null) map['Phone'] = phone; if (email != null) map['Email'] = email; if (nickName != null) map['NickName'] = nickName; if (fullName != null) map['FullName'] = fullName; if (headImageUrl != null) map['HeadImageUrl'] = headImageUrl; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (extensionData != null) map['ExtensionData'] = extensionData; if (shortCode != null) map['ShortCode'] = shortCode; if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetUserPageRequest extends PageRequest{ String? keyword; OrganizationQueryTypeEnum organizationQueryType; String? organizationCode; String? rankCode; String? positionCode; bool exceptSelf; String? language; List? roleCodes; bool? isAgent; GetUserPageRequest({ this.keyword, this.organizationQueryType = OrganizationQueryTypeEnum.Wait, this.organizationCode, this.rankCode, this.positionCode, this.exceptSelf = false, this.language, this.roleCodes, this.isAgent, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetUserPageRequest.fromJson(Map map) { return GetUserPageRequest( keyword: map['Keyword'], organizationQueryType: OrganizationQueryTypeEnum.values.firstWhere((e) => e.index == map['OrganizationQueryType']), organizationCode: map['OrganizationCode'], rankCode: map['RankCode'], positionCode: map['PositionCode'], exceptSelf: map['ExceptSelf'], language: map['Language'], roleCodes: map['RoleCodes']?.cast().toList(), isAgent: map['IsAgent'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; map['OrganizationQueryType'] = organizationQueryType.index; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (rankCode != null) map['RankCode'] = rankCode; if (positionCode != null) map['PositionCode'] = positionCode; map['ExceptSelf'] = exceptSelf; if (language != null) map['Language'] = language; if (roleCodes != null) map['RoleCodes'] = roleCodes; if (isAgent != null) map['IsAgent'] = isAgent; return map; } } class RemoveUsersFromOrganizationRequest extends TokenRequest{ List? userCodes; RemoveUsersFromOrganizationRequest({ this.userCodes, String? token, }) : super( token: token, ); factory RemoveUsersFromOrganizationRequest.fromJson(Map map) { return RemoveUsersFromOrganizationRequest( userCodes: map['UserCodes']?.cast().toList(), token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (userCodes != null) map['UserCodes'] = userCodes; return map; } } class SetUserOrganizationInfoRequest extends TokenRequest{ String? userCode; List? roleCodes; List? rankCodes; List? positionCodes; String? organizationCode; SetUserOrganizationInfoRequest({ this.userCode, this.roleCodes, this.rankCodes, this.positionCodes, this.organizationCode, String? token, }) : super( token: token, ); factory SetUserOrganizationInfoRequest.fromJson(Map map) { return SetUserOrganizationInfoRequest( userCode: map['UserCode'], roleCodes: map['RoleCodes']?.cast().toList(), rankCodes: map['RankCodes']?.cast().toList(), positionCodes: map['PositionCodes']?.cast().toList(), organizationCode: map['OrganizationCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (userCode != null) map['UserCode'] = userCode; if (roleCodes != null) map['RoleCodes'] = roleCodes; if (rankCodes != null) map['RankCodes'] = rankCodes; if (positionCodes != null) map['PositionCodes'] = positionCodes; if (organizationCode != null) map['OrganizationCode'] = organizationCode; return map; } } class AlterPersonInfoRequest { String? token; String? nickName; String? headImageUrl; AlterPersonInfoRequest({ this.token, this.nickName, this.headImageUrl, }); factory AlterPersonInfoRequest.fromJson(Map map) { return AlterPersonInfoRequest( token: map['Token'], nickName: map['NickName'], headImageUrl: map['HeadImageUrl'], ); } Map toJson() { final map = Map(); if (token != null) { map['Token'] = token; } if (nickName != null) { map['NickName'] = nickName; } if (headImageUrl != null) { map['HeadImageUrl'] = headImageUrl; } return map; } } class ShareDeviceUserDTO extends BaseDTO{ String? userCode; String? fullName; String? userName; String? displayName; String? phone; String? headImageUrl; List? rankNames; String? rootOrganizationCode; String? rootOrganizationName; ShareDeviceUserDTO({ this.userCode, this.fullName, this.userName, this.displayName, this.phone, this.headImageUrl, this.rankNames, this.rootOrganizationCode, this.rootOrganizationName, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory ShareDeviceUserDTO.fromJson(Map map) { return ShareDeviceUserDTO( userCode: map['UserCode'], fullName: map['FullName'], userName: map['UserName'], displayName: map['DisplayName'], phone: map['Phone'], headImageUrl: map['HeadImageUrl'], rankNames: map['RankNames']?.cast().toList(), rootOrganizationCode: map['RootOrganizationCode'], rootOrganizationName: map['RootOrganizationName'], 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 (userCode != null) map['UserCode'] = userCode; if (fullName != null) map['FullName'] = fullName; if (userName != null) map['UserName'] = userName; if (displayName != null) map['DisplayName'] = displayName; if (phone != null) map['Phone'] = phone; if (headImageUrl != null) map['HeadImageUrl'] = headImageUrl; if (rankNames != null) map['RankNames'] = rankNames; if (rootOrganizationCode != null) map['RootOrganizationCode'] = rootOrganizationCode; if (rootOrganizationName != null) map['RootOrganizationName'] = rootOrganizationName; return map; } } class GetShareDeviceUsersPageRequest extends PageRequest{ String? deviceCode; GetShareDeviceUsersPageRequest({ this.deviceCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetShareDeviceUsersPageRequest.fromJson(Map map) { return GetShareDeviceUsersPageRequest( deviceCode: map['DeviceCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (deviceCode != null) map['DeviceCode'] = deviceCode; return map; } } class UserFeatureInfoResult { String? featureCode; String? featureName; String? fatherCode; String? uniqueCode; UserFeatureInfoResult({ this.featureCode, this.featureName, this.fatherCode, this.uniqueCode, }); factory UserFeatureInfoResult.fromJson(Map map) { return UserFeatureInfoResult( featureCode: map['FeatureCode'], featureName: map['FeatureName'], fatherCode: map['FatherCode'], uniqueCode: map['UniqueCode'], ); } Map toJson() { final map = Map(); if (featureCode != null) { map['FeatureCode'] = featureCode; } if (featureName != null) { map['FeatureName'] = featureName; } if (fatherCode != null) { map['FatherCode'] = fatherCode; } if (uniqueCode != null) { map['UniqueCode'] = uniqueCode; } return map; } } class UserInfoByCodeDTO extends UserDTO{ String? bindAssistantUserName; String? bindAssistantDoctorUserName; UserInfoByCodeDTO({ this.bindAssistantUserName, this.bindAssistantDoctorUserName, String? nickName, String? organizationCode, String? organizationName, String? departmentCode, String? departmentName, String? departmentShortCode, String? rootOrganizationCode, String? rootOrganizationName, List? authorityGroups, List? bindDevices, List? bindDeviceOrganizations, String? lastIP, int logintimes = 0, UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated, List? roleCodes, List? rankCodes, List? positionCodes, ApplyStateEnum applyState = ApplyStateEnum.NotApply, String? rankName, String? positionName, bool isDirector = false, List? fieldList, List? deletePatientCodes, bool isBatchExportDiagnoseData = false, String? bindAssistantUserCode, String? bindAssistantDoctorUserCode, LoginLockInfoDTO? loginLockInfo, String? signature, String? language, bool enableReportLabel = false, List? associatedInfos, String? commonPlatformUserId, String? bindEmergencyDeviceCode, String? bindEmergencyExpertCode, List? dashboardOrgCodes, String? organizationShortCode, String? rootOrganizationShortCode, bool isOldAgent = false, List? userFeatureCodes, String? openId, String? phone, String? email, String? userCode, String? userName, String? fullName, String? headImageUrl, String? displayName, DateTime? createTime, DateTime? updateTime, }) : super( nickName: nickName, organizationCode: organizationCode, organizationName: organizationName, departmentCode: departmentCode, departmentName: departmentName, departmentShortCode: departmentShortCode, rootOrganizationCode: rootOrganizationCode, rootOrganizationName: rootOrganizationName, authorityGroups: authorityGroups, bindDevices: bindDevices, bindDeviceOrganizations: bindDeviceOrganizations, lastIP: lastIP, logintimes: logintimes, userState: userState, roleCodes: roleCodes, rankCodes: rankCodes, positionCodes: positionCodes, applyState: applyState, rankName: rankName, positionName: positionName, isDirector: isDirector, fieldList: fieldList, deletePatientCodes: deletePatientCodes, isBatchExportDiagnoseData: isBatchExportDiagnoseData, bindAssistantUserCode: bindAssistantUserCode, bindAssistantDoctorUserCode: bindAssistantDoctorUserCode, loginLockInfo: loginLockInfo, signature: signature, language: language, enableReportLabel: enableReportLabel, associatedInfos: associatedInfos, commonPlatformUserId: commonPlatformUserId, bindEmergencyDeviceCode: bindEmergencyDeviceCode, bindEmergencyExpertCode: bindEmergencyExpertCode, dashboardOrgCodes: dashboardOrgCodes, organizationShortCode: organizationShortCode, rootOrganizationShortCode: rootOrganizationShortCode, isOldAgent: isOldAgent, userFeatureCodes: userFeatureCodes, openId: openId, phone: phone, email: email, userCode: userCode, userName: userName, fullName: fullName, headImageUrl: headImageUrl, displayName: displayName, createTime: createTime, updateTime: updateTime, ); factory UserInfoByCodeDTO.fromJson(Map map) { return UserInfoByCodeDTO( bindAssistantUserName: map['BindAssistantUserName'], bindAssistantDoctorUserName: map['BindAssistantDoctorUserName'], nickName: map['NickName'], organizationCode: map['OrganizationCode'], organizationName: map['OrganizationName'], departmentCode: map['DepartmentCode'], departmentName: map['DepartmentName'], departmentShortCode: map['DepartmentShortCode'], rootOrganizationCode: map['RootOrganizationCode'], rootOrganizationName: map['RootOrganizationName'], authorityGroups: map['AuthorityGroups']?.cast().toList(), bindDevices: map['BindDevices']?.cast().toList(), bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast().toList(), lastIP: map['LastIP'], logintimes: map['Logintimes'], userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']), roleCodes: map['RoleCodes']?.cast().toList(), rankCodes: map['RankCodes']?.cast().toList(), positionCodes: map['PositionCodes']?.cast().toList(), applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']), rankName: map['RankName'], positionName: map['PositionName'], isDirector: map['IsDirector'], fieldList: map['FieldList']?.cast().toList(), deletePatientCodes: map['DeletePatientCodes']?.cast().toList(), isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'], bindAssistantUserCode: map['BindAssistantUserCode'], bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'], loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null, signature: map['Signature'], language: map['Language'], enableReportLabel: map['EnableReportLabel'], associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map)).toList() : null, commonPlatformUserId: map['CommonPlatformUserId'], bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'], bindEmergencyExpertCode: map['BindEmergencyExpertCode'], dashboardOrgCodes: map['DashboardOrgCodes']?.cast().toList(), organizationShortCode: map['OrganizationShortCode'], rootOrganizationShortCode: map['RootOrganizationShortCode'], isOldAgent: map['IsOldAgent'], userFeatureCodes: map['UserFeatureCodes']?.cast().toList(), openId: map['OpenId'], phone: map['Phone'], email: map['Email'], userCode: map['UserCode'], userName: map['UserName'], fullName: map['FullName'], headImageUrl: map['HeadImageUrl'], displayName: map['DisplayName'], 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 (bindAssistantUserName != null) map['BindAssistantUserName'] = bindAssistantUserName; if (bindAssistantDoctorUserName != null) map['BindAssistantDoctorUserName'] = bindAssistantDoctorUserName; return map; } } class GetUserByCodeRequest extends TokenRequest{ String? userCode; GetUserByCodeRequest({ this.userCode, String? token, }) : super( token: token, ); factory GetUserByCodeRequest.fromJson(Map map) { return GetUserByCodeRequest( userCode: map['UserCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (userCode != null) map['UserCode'] = userCode; return map; } } enum CommonSettingsEnum { Signature, Language, EnableReportLabel, } class CommonSettingsRequest extends TokenRequest{ CommonSettingsEnum settingType; String? value; CommonSettingsRequest({ this.settingType = CommonSettingsEnum.Signature, this.value, String? token, }) : super( token: token, ); factory CommonSettingsRequest.fromJson(Map map) { return CommonSettingsRequest( settingType: CommonSettingsEnum.values.firstWhere((e) => e.index == map['SettingType']), value: map['Value'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['SettingType'] = settingType.index; if (value != null) map['Value'] = value; return map; } } class RefreshStaticticRecordsRequest { String? userCode; bool inExecutor; RefreshStaticticRecordsRequest({ this.userCode, this.inExecutor = false, }); factory RefreshStaticticRecordsRequest.fromJson(Map map) { return RefreshStaticticRecordsRequest( userCode: map['UserCode'], inExecutor: map['InExecutor'], ); } Map toJson() { final map = Map(); if (userCode != null) { map['UserCode'] = userCode; } map['InExecutor'] = inExecutor; return map; } } enum ScheduleTypeEnum { Consultation, Training, } class ClientScheduleDTO { String? title; TransactionStatusEnum status; ScheduleTypeEnum scheduleType; DateTime? startTime; DateTime? endTime; String? relevanceCode; ClientScheduleDTO({ this.title, this.status = TransactionStatusEnum.Applied, this.scheduleType = ScheduleTypeEnum.Consultation, this.startTime, this.endTime, this.relevanceCode, }); factory ClientScheduleDTO.fromJson(Map map) { return ClientScheduleDTO( title: map['Title'], status: TransactionStatusEnum.values.firstWhere((e) => e.index == map['Status']), scheduleType: ScheduleTypeEnum.values.firstWhere((e) => e.index == map['ScheduleType']), startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, relevanceCode: map['RelevanceCode'], ); } Map toJson() { final map = Map(); if (title != null) { map['Title'] = title; } map['Status'] = status.index; map['ScheduleType'] = scheduleType.index; if (startTime != null) { map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); } if (endTime != null) { map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); } if (relevanceCode != null) { map['RelevanceCode'] = relevanceCode; } return map; } } class FindSchedulesRequest extends TokenRequest{ DateTime? startTime; DateTime? endTime; FindSchedulesRequest({ this.startTime, this.endTime, String? token, }) : super( token: token, ); factory FindSchedulesRequest.fromJson(Map map) { return FindSchedulesRequest( startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (startTime != null) map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); if (endTime != null) map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); return map; } } enum ApplicantTypeEnum { Client, Device, Management, ThirdParty, Server, } class MessageExtendInfoDTO extends BaseDTO{ String? messageCode; NotificationTypeEnum notificationType; String? content; DateTime? notifyTime; ApplicantTypeEnum receiverType; String? relevanceCode; bool isReaded; DateTime? deliveryTime; DateTime? readTime; MessageExtendInfoDTO({ this.messageCode, this.notificationType = NotificationTypeEnum.Unknown, this.content, this.notifyTime, this.receiverType = ApplicantTypeEnum.Client, this.relevanceCode, this.isReaded = false, this.deliveryTime, this.readTime, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory MessageExtendInfoDTO.fromJson(Map map) { return MessageExtendInfoDTO( messageCode: map['MessageCode'], notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']), content: map['Content'], notifyTime: map['NotifyTime'] != null ? DateTime.parse(map['NotifyTime']) : null, receiverType: ApplicantTypeEnum.values.firstWhere((e) => e.index == map['ReceiverType']), relevanceCode: map['RelevanceCode'], isReaded: map['IsReaded'], deliveryTime: map['DeliveryTime'] != null ? DateTime.parse(map['DeliveryTime']) : null, readTime: map['ReadTime'] != null ? DateTime.parse(map['ReadTime']) : null, 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 (messageCode != null) map['MessageCode'] = messageCode; map['NotificationType'] = notificationType.index; if (content != null) map['Content'] = content; if (notifyTime != null) map['NotifyTime'] = JsonRpcUtils.dateFormat(notifyTime!); map['ReceiverType'] = receiverType.index; if (relevanceCode != null) map['RelevanceCode'] = relevanceCode; map['IsReaded'] = isReaded; if (deliveryTime != null) map['DeliveryTime'] = JsonRpcUtils.dateFormat(deliveryTime!); if (readTime != null) map['ReadTime'] = JsonRpcUtils.dateFormat(readTime!); return map; } } class QueryMessageListRequest extends PageRequest{ TransactionTypeEnum transactionType; String? keyword; QueryMessageListRequest({ this.transactionType = TransactionTypeEnum.Consultion, this.keyword, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory QueryMessageListRequest.fromJson(Map map) { return QueryMessageListRequest( transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']), keyword: map['Keyword'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['TransactionType'] = transactionType.index; if (keyword != null) map['Keyword'] = keyword; return map; } } class SetMessageDeliveryRequest extends TokenRequest{ String? messageCode; bool isReaded; SetMessageDeliveryRequest({ this.messageCode, this.isReaded = false, String? token, }) : super( token: token, ); factory SetMessageDeliveryRequest.fromJson(Map map) { return SetMessageDeliveryRequest( messageCode: map['MessageCode'], isReaded: map['IsReaded'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (messageCode != null) map['MessageCode'] = messageCode; map['IsReaded'] = isReaded; return map; } } class SetMessageInfoReqeust extends TokenRequest{ List? messageCodes; SetMessageInfoReqeust({ this.messageCodes, String? token, }) : super( token: token, ); factory SetMessageInfoReqeust.fromJson(Map map) { return SetMessageInfoReqeust( messageCodes: map['MessageCodes']?.cast().toList(), token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (messageCodes != null) map['MessageCodes'] = messageCodes; return map; } } class AnnouncementExtendInfoDTO extends BaseDTO{ String? announcementCode; AnnouncementTypeEnum announcementType; String? language; String? title; String? content; AnnouncementExtendInfoDTO({ this.announcementCode, this.announcementType = AnnouncementTypeEnum.Broadcast, this.language, this.title, this.content, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory AnnouncementExtendInfoDTO.fromJson(Map map) { return AnnouncementExtendInfoDTO( announcementCode: map['AnnouncementCode'], announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']), language: map['Language'], title: map['Title'], content: map['Content'], 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 (announcementCode != null) map['AnnouncementCode'] = announcementCode; map['AnnouncementType'] = announcementType.index; if (language != null) map['Language'] = language; if (title != null) map['Title'] = title; if (content != null) map['Content'] = content; return map; } } class QueryAnnouncementListRequest extends PageRequest{ AnnouncementTypeEnum announcementType; String? language; String? keyword; DateTime? startTime; DateTime? endTime; QueryAnnouncementListRequest({ this.announcementType = AnnouncementTypeEnum.Broadcast, this.language, this.keyword, this.startTime, this.endTime, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory QueryAnnouncementListRequest.fromJson(Map map) { return QueryAnnouncementListRequest( announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']), language: map['Language'], keyword: map['Keyword'], startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['AnnouncementType'] = announcementType.index; if (language != null) map['Language'] = language; if (keyword != null) map['Keyword'] = keyword; if (startTime != null) map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); if (endTime != null) map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); return map; } } class GetAnnouncementRequest extends TokenRequest{ String? announcementCode; String? language; GetAnnouncementRequest({ this.announcementCode, this.language, String? token, }) : super( token: token, ); factory GetAnnouncementRequest.fromJson(Map map) { return GetAnnouncementRequest( announcementCode: map['AnnouncementCode'], language: map['Language'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (announcementCode != null) map['AnnouncementCode'] = announcementCode; if (language != null) map['Language'] = language; return map; } } class NoReadMessagesDTO { int count; List? noReadCodes; NoReadMessagesDTO({ this.count = 0, this.noReadCodes, }); factory NoReadMessagesDTO.fromJson(Map map) { return NoReadMessagesDTO( count: map['Count'], noReadCodes: map['NoReadCodes']?.cast().toList(), ); } Map toJson() { final map = Map(); map['Count'] = count; if (noReadCodes != null) { map['NoReadCodes'] = noReadCodes; } return map; } } class GetNoReadMessagesRequest extends TokenRequest{ TransactionTypeEnum transactionType; GetNoReadMessagesRequest({ this.transactionType = TransactionTypeEnum.Consultion, String? token, }) : super( token: token, ); factory GetNoReadMessagesRequest.fromJson(Map map) { return GetNoReadMessagesRequest( transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']), token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['TransactionType'] = transactionType.index; return map; } } class RemoveUserSingleTokenRequest extends TokenRequest{ String? wSToken; RemoveUserSingleTokenRequest({ this.wSToken, String? token, }) : super( token: token, ); factory RemoveUserSingleTokenRequest.fromJson(Map map) { return RemoveUserSingleTokenRequest( wSToken: map['WSToken'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (wSToken != null) map['WSToken'] = wSToken; return map; } } enum UserMigratoryRoleEnum { Role_ExpertAssistant, Role_CertifiedExpert, Role_CertifiedPhysician, Role_RemoteManager, Role_UnSet, } class UserMigratoryInfo extends UserDTO{ bool isDelete; String? secretPassword; DateTime? passwordUpdateTime; List? passwordRecords; UserMigratoryRoleEnum userRole; String? remoteMainFeature; bool isCertifiedInstructor; UserMigratoryInfo({ this.isDelete = false, this.secretPassword, this.passwordUpdateTime, this.passwordRecords, this.userRole = UserMigratoryRoleEnum.Role_ExpertAssistant, this.remoteMainFeature, this.isCertifiedInstructor = false, String? nickName, String? organizationCode, String? organizationName, String? departmentCode, String? departmentName, String? departmentShortCode, String? rootOrganizationCode, String? rootOrganizationName, List? authorityGroups, List? bindDevices, List? bindDeviceOrganizations, String? lastIP, int logintimes = 0, UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated, List? roleCodes, List? rankCodes, List? positionCodes, ApplyStateEnum applyState = ApplyStateEnum.NotApply, String? rankName, String? positionName, bool isDirector = false, List? fieldList, List? deletePatientCodes, bool isBatchExportDiagnoseData = false, String? bindAssistantUserCode, String? bindAssistantDoctorUserCode, LoginLockInfoDTO? loginLockInfo, String? signature, String? language, bool enableReportLabel = false, List? associatedInfos, String? commonPlatformUserId, String? bindEmergencyDeviceCode, String? bindEmergencyExpertCode, List? dashboardOrgCodes, String? organizationShortCode, String? rootOrganizationShortCode, bool isOldAgent = false, List? userFeatureCodes, String? openId, String? phone, String? email, String? userCode, String? userName, String? fullName, String? headImageUrl, String? displayName, DateTime? createTime, DateTime? updateTime, }) : super( nickName: nickName, organizationCode: organizationCode, organizationName: organizationName, departmentCode: departmentCode, departmentName: departmentName, departmentShortCode: departmentShortCode, rootOrganizationCode: rootOrganizationCode, rootOrganizationName: rootOrganizationName, authorityGroups: authorityGroups, bindDevices: bindDevices, bindDeviceOrganizations: bindDeviceOrganizations, lastIP: lastIP, logintimes: logintimes, userState: userState, roleCodes: roleCodes, rankCodes: rankCodes, positionCodes: positionCodes, applyState: applyState, rankName: rankName, positionName: positionName, isDirector: isDirector, fieldList: fieldList, deletePatientCodes: deletePatientCodes, isBatchExportDiagnoseData: isBatchExportDiagnoseData, bindAssistantUserCode: bindAssistantUserCode, bindAssistantDoctorUserCode: bindAssistantDoctorUserCode, loginLockInfo: loginLockInfo, signature: signature, language: language, enableReportLabel: enableReportLabel, associatedInfos: associatedInfos, commonPlatformUserId: commonPlatformUserId, bindEmergencyDeviceCode: bindEmergencyDeviceCode, bindEmergencyExpertCode: bindEmergencyExpertCode, dashboardOrgCodes: dashboardOrgCodes, organizationShortCode: organizationShortCode, rootOrganizationShortCode: rootOrganizationShortCode, isOldAgent: isOldAgent, userFeatureCodes: userFeatureCodes, openId: openId, phone: phone, email: email, userCode: userCode, userName: userName, fullName: fullName, headImageUrl: headImageUrl, displayName: displayName, createTime: createTime, updateTime: updateTime, ); factory UserMigratoryInfo.fromJson(Map map) { return UserMigratoryInfo( isDelete: map['IsDelete'], secretPassword: map['SecretPassword'], passwordUpdateTime: map['PasswordUpdateTime'] != null ? DateTime.parse(map['PasswordUpdateTime']) : null, passwordRecords: map['PasswordRecords']?.cast().toList(), userRole: UserMigratoryRoleEnum.values.firstWhere((e) => e.index == map['UserRole']), remoteMainFeature: map['RemoteMainFeature'], isCertifiedInstructor: map['IsCertifiedInstructor'], nickName: map['NickName'], organizationCode: map['OrganizationCode'], organizationName: map['OrganizationName'], departmentCode: map['DepartmentCode'], departmentName: map['DepartmentName'], departmentShortCode: map['DepartmentShortCode'], rootOrganizationCode: map['RootOrganizationCode'], rootOrganizationName: map['RootOrganizationName'], authorityGroups: map['AuthorityGroups']?.cast().toList(), bindDevices: map['BindDevices']?.cast().toList(), bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast().toList(), lastIP: map['LastIP'], logintimes: map['Logintimes'], userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']), roleCodes: map['RoleCodes']?.cast().toList(), rankCodes: map['RankCodes']?.cast().toList(), positionCodes: map['PositionCodes']?.cast().toList(), applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']), rankName: map['RankName'], positionName: map['PositionName'], isDirector: map['IsDirector'], fieldList: map['FieldList']?.cast().toList(), deletePatientCodes: map['DeletePatientCodes']?.cast().toList(), isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'], bindAssistantUserCode: map['BindAssistantUserCode'], bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'], loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null, signature: map['Signature'], language: map['Language'], enableReportLabel: map['EnableReportLabel'], associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map)).toList() : null, commonPlatformUserId: map['CommonPlatformUserId'], bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'], bindEmergencyExpertCode: map['BindEmergencyExpertCode'], dashboardOrgCodes: map['DashboardOrgCodes']?.cast().toList(), organizationShortCode: map['OrganizationShortCode'], rootOrganizationShortCode: map['RootOrganizationShortCode'], isOldAgent: map['IsOldAgent'], userFeatureCodes: map['UserFeatureCodes']?.cast().toList(), openId: map['OpenId'], phone: map['Phone'], email: map['Email'], userCode: map['UserCode'], userName: map['UserName'], fullName: map['FullName'], headImageUrl: map['HeadImageUrl'], displayName: map['DisplayName'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); map['IsDelete'] = isDelete; if (secretPassword != null) map['SecretPassword'] = secretPassword; if (passwordUpdateTime != null) map['PasswordUpdateTime'] = JsonRpcUtils.dateFormat(passwordUpdateTime!); if (passwordRecords != null) map['PasswordRecords'] = passwordRecords; map['UserRole'] = userRole.index; if (remoteMainFeature != null) map['RemoteMainFeature'] = remoteMainFeature; map['IsCertifiedInstructor'] = isCertifiedInstructor; return map; } } class BatchInsertUserRequest extends TokenRequest{ SyncDBEnum syncType; List? userMigratorys; BatchInsertUserRequest({ this.syncType = SyncDBEnum.Migrate, this.userMigratorys, String? token, }) : super( token: token, ); factory BatchInsertUserRequest.fromJson(Map map) { return BatchInsertUserRequest( syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']), userMigratorys: map['UserMigratorys'] != null ? (map['UserMigratorys'] as List).map((e)=>UserMigratoryInfo.fromJson(e as Map)).toList() : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['SyncType'] = syncType.index; if (userMigratorys != null) map['UserMigratorys'] = userMigratorys; return map; } } enum MigrateRecordType { Default, MigrateDataCenter, } class MigrateRecordDTO { DateTime? startTime; DateTime? endTime; MigrateRecordType type; MigrateRecordDTO({ this.startTime, this.endTime, this.type = MigrateRecordType.Default, }); factory MigrateRecordDTO.fromJson(Map map) { return MigrateRecordDTO( startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null, endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null, type: MigrateRecordType.values.firstWhere((e) => e.index == map['Type']), ); } Map toJson() { final map = Map(); if (startTime != null) { map['StartTime'] = JsonRpcUtils.dateFormat(startTime!); } if (endTime != null) { map['EndTime'] = JsonRpcUtils.dateFormat(endTime!); } map['Type'] = type.index; return map; } } class QueryMigrateTimeRequest extends TokenRequest{ bool isInitMigreate; QueryMigrateTimeRequest({ this.isInitMigreate = false, String? token, }) : super( token: token, ); factory QueryMigrateTimeRequest.fromJson(Map map) { return QueryMigrateTimeRequest( isInitMigreate: map['IsInitMigreate'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['IsInitMigreate'] = isInitMigreate; return map; } } enum VerificationTypeEnum { Password, PhoneVerificationCode, EmailVerificationCode, } class CommonLogOffRequest extends TokenRequest{ VerificationTypeEnum verificationType; String? anyCode; CommonLogOffRequest({ this.verificationType = VerificationTypeEnum.Password, this.anyCode, String? token, }) : super( token: token, ); factory CommonLogOffRequest.fromJson(Map map) { return CommonLogOffRequest( verificationType: VerificationTypeEnum.values.firstWhere((e) => e.index == map['VerificationType']), anyCode: map['AnyCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['VerificationType'] = verificationType.index; if (anyCode != null) map['AnyCode'] = anyCode; return map; } } class GetUserGroupPagesRequest extends PageRequest{ String? keyword; GetUserGroupPagesRequest({ this.keyword, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetUserGroupPagesRequest.fromJson(Map map) { return GetUserGroupPagesRequest( keyword: map['Keyword'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; return map; } } class GetUserGroupRequest extends TokenRequest{ String? userGroupCode; GetUserGroupRequest({ this.userGroupCode, String? token, }) : super( token: token, ); factory GetUserGroupRequest.fromJson(Map map) { return GetUserGroupRequest( userGroupCode: map['UserGroupCode'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (userGroupCode != null) map['UserGroupCode'] = userGroupCode; return map; } } class GetGroupUserInfosRequest extends PageRequest{ String? keyword; String? userGroupCode; String? languageCode; GetGroupUserInfosRequest({ this.keyword, this.userGroupCode, this.languageCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetGroupUserInfosRequest.fromJson(Map map) { return GetGroupUserInfosRequest( keyword: map['Keyword'], userGroupCode: map['UserGroupCode'], languageCode: map['LanguageCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; if (userGroupCode != null) map['UserGroupCode'] = userGroupCode; if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetGroupDeviceInfosRequest extends PageRequest{ String? keyword; String? userGroupCode; String? languageCode; GetGroupDeviceInfosRequest({ this.keyword, this.userGroupCode, this.languageCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetGroupDeviceInfosRequest.fromJson(Map map) { return GetGroupDeviceInfosRequest( keyword: map['Keyword'], userGroupCode: map['UserGroupCode'], languageCode: map['LanguageCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; if (userGroupCode != null) map['UserGroupCode'] = userGroupCode; if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetGroupOrganizationsRequest extends PageRequest{ String? keyword; String? userGroupCode; String? languageCode; GetGroupOrganizationsRequest({ this.keyword, this.userGroupCode, this.languageCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetGroupOrganizationsRequest.fromJson(Map map) { return GetGroupOrganizationsRequest( keyword: map['Keyword'], userGroupCode: map['UserGroupCode'], languageCode: map['LanguageCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; if (userGroupCode != null) map['UserGroupCode'] = userGroupCode; if (languageCode != null) map['LanguageCode'] = languageCode; return map; } } class GetUserGroupRecordPagesRequest extends PageRequest{ String? keyword; String? userGroupCode; DateTime? startDate; DateTime? endDate; List? organizationCodes; List? deviceCodes; RecordProcessStateEnum recordProcessState; String? language; GetUserGroupRecordPagesRequest({ this.keyword, this.userGroupCode, this.startDate, this.endDate, this.organizationCodes, this.deviceCodes, this.recordProcessState = RecordProcessStateEnum.All, this.language, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetUserGroupRecordPagesRequest.fromJson(Map map) { return GetUserGroupRecordPagesRequest( keyword: map['Keyword'], userGroupCode: map['UserGroupCode'], startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null, endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null, organizationCodes: map['OrganizationCodes']?.cast().toList(), deviceCodes: map['DeviceCodes']?.cast().toList(), recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']), language: map['Language'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (keyword != null) map['Keyword'] = keyword; if (userGroupCode != null) map['UserGroupCode'] = userGroupCode; if (startDate != null) map['StartDate'] = JsonRpcUtils.dateFormat(startDate!); if (endDate != null) map['EndDate'] = JsonRpcUtils.dateFormat(endDate!); if (organizationCodes != null) map['OrganizationCodes'] = organizationCodes; if (deviceCodes != null) map['DeviceCodes'] = deviceCodes; map['RecordProcessState'] = recordProcessState.index; if (language != null) map['Language'] = language; return map; } } class PackagesDTO extends BaseDTO{ String? code; String? name; String? version; String? uniquedCode; String? description; String? fileUrl; int fileSize; String? uploadUserCode; String? uploadUserName; PackagesDTO({ this.code, this.name, this.version, this.uniquedCode, this.description, this.fileUrl, this.fileSize = 0, this.uploadUserCode, this.uploadUserName, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory PackagesDTO.fromJson(Map map) { return PackagesDTO( code: map['Code'], name: map['Name'], version: map['Version'], uniquedCode: map['UniquedCode'], description: map['Description'], fileUrl: map['FileUrl'], fileSize: map['FileSize'], uploadUserCode: map['UploadUserCode'], uploadUserName: map['UploadUserName'], 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 (code != null) map['Code'] = code; if (name != null) map['Name'] = name; if (version != null) map['Version'] = version; if (uniquedCode != null) map['UniquedCode'] = uniquedCode; if (description != null) map['Description'] = description; if (fileUrl != null) map['FileUrl'] = fileUrl; map['FileSize'] = fileSize; if (uploadUserCode != null) map['UploadUserCode'] = uploadUserCode; if (uploadUserName != null) map['UploadUserName'] = uploadUserName; return map; } } class GetPackageByUniquedCodeRequest { String? uniquedCode; String? ipAddress; GetPackageByUniquedCodeRequest({ this.uniquedCode, this.ipAddress, }); factory GetPackageByUniquedCodeRequest.fromJson(Map map) { return GetPackageByUniquedCodeRequest( uniquedCode: map['UniquedCode'], ipAddress: map['IpAddress'], ); } Map toJson() { final map = Map(); if (uniquedCode != null) { map['UniquedCode'] = uniquedCode; } if (ipAddress != null) { map['IpAddress'] = ipAddress; } return map; } } class AddOrUpdatePackageRequest extends TokenRequest{ PackagesDTO? packageInfo; AddOrUpdatePackageRequest({ this.packageInfo, String? token, }) : super( token: token, ); factory AddOrUpdatePackageRequest.fromJson(Map map) { return AddOrUpdatePackageRequest( packageInfo: map['PackageInfo'] != null ? PackagesDTO.fromJson(map['PackageInfo']) : null, token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (packageInfo != null) map['PackageInfo'] = packageInfo; return map; } }