12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808 |
- 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<String, dynamic> map) {
- return GetUserInfoRequest(
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String>? 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<String, dynamic> 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<String>().toList(),
- isAgent: map['IsAgent'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String>? userCodes;
- RemoveUsersFromOrganizationRequest({
- this.userCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory RemoveUsersFromOrganizationRequest.fromJson(Map<String, dynamic> map) {
- return RemoveUsersFromOrganizationRequest(
- userCodes: map['UserCodes']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCodes != null)
- map['UserCodes'] = userCodes;
- return map;
- }
- }
- class SetUserOrganizationInfoRequest extends TokenRequest{
- String? userCode;
- List<String>? roleCodes;
- List<String>? rankCodes;
- List<String>? positionCodes;
- String? organizationCode;
- SetUserOrganizationInfoRequest({
- this.userCode,
- this.roleCodes,
- this.rankCodes,
- this.positionCodes,
- this.organizationCode,
- String? token,
- }) : super(
- token: token,
- );
- factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
- return SetUserOrganizationInfoRequest(
- userCode: map['UserCode'],
- roleCodes: map['RoleCodes']?.cast<String>().toList(),
- rankCodes: map['RankCodes']?.cast<String>().toList(),
- positionCodes: map['PositionCodes']?.cast<String>().toList(),
- organizationCode: map['OrganizationCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return AlterPersonInfoRequest(
- token: map['Token'],
- nickName: map['NickName'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String>? 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<String, dynamic> 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<String>().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<String, dynamic> 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<String, dynamic> map) {
- return GetShareDeviceUsersPageRequest(
- deviceCode: map['DeviceCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return UserFeatureInfoResult(
- featureCode: map['FeatureCode'],
- featureName: map['FeatureName'],
- fatherCode: map['FatherCode'],
- uniqueCode: map['UniqueCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String>? authorityGroups,
- List<String>? bindDevices,
- List<String>? bindDeviceOrganizations,
- String? lastIP,
- int logintimes = 0,
- UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
- List<String>? roleCodes,
- List<String>? rankCodes,
- List<String>? positionCodes,
- ApplyStateEnum applyState = ApplyStateEnum.NotApply,
- String? rankName,
- String? positionName,
- bool isDirector = false,
- List<String>? fieldList,
- List<String>? deletePatientCodes,
- bool isBatchExportDiagnoseData = false,
- String? bindAssistantUserCode,
- String? bindAssistantDoctorUserCode,
- LoginLockInfoDTO? loginLockInfo,
- String? signature,
- String? language,
- bool enableReportLabel = false,
- List<AssociatedInfoDTO>? associatedInfos,
- String? commonPlatformUserId,
- String? bindEmergencyDeviceCode,
- String? bindEmergencyExpertCode,
- List<String>? dashboardOrgCodes,
- String? organizationShortCode,
- String? rootOrganizationShortCode,
- bool isOldAgent = false,
- List<String>? 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<String, dynamic> 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<String>().toList(),
- bindDevices: map['BindDevices']?.cast<String>().toList(),
- bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast<String>().toList(),
- lastIP: map['LastIP'],
- logintimes: map['Logintimes'],
- userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
- roleCodes: map['RoleCodes']?.cast<String>().toList(),
- rankCodes: map['RankCodes']?.cast<String>().toList(),
- positionCodes: map['PositionCodes']?.cast<String>().toList(),
- applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
- rankName: map['RankName'],
- positionName: map['PositionName'],
- isDirector: map['IsDirector'],
- fieldList: map['FieldList']?.cast<String>().toList(),
- deletePatientCodes: map['DeletePatientCodes']?.cast<String>().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<String,dynamic>)).toList() : null,
- commonPlatformUserId: map['CommonPlatformUserId'],
- bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
- bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
- dashboardOrgCodes: map['DashboardOrgCodes']?.cast<String>().toList(),
- organizationShortCode: map['OrganizationShortCode'],
- rootOrganizationShortCode: map['RootOrganizationShortCode'],
- isOldAgent: map['IsOldAgent'],
- userFeatureCodes: map['UserFeatureCodes']?.cast<String>().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<String, dynamic> 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<String, dynamic> map) {
- return GetUserByCodeRequest(
- userCode: map['UserCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return CommonSettingsRequest(
- settingType: CommonSettingsEnum.values.firstWhere((e) => e.index == map['SettingType']),
- value: map['Value'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return RefreshStaticticRecordsRequest(
- userCode: map['UserCode'],
- inExecutor: map['InExecutor'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> map) {
- return SetMessageDeliveryRequest(
- messageCode: map['MessageCode'],
- isReaded: map['IsReaded'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (messageCode != null)
- map['MessageCode'] = messageCode;
- map['IsReaded'] = isReaded;
- return map;
- }
- }
- class SetMessageInfoReqeust extends TokenRequest{
- List<String>? messageCodes;
- SetMessageInfoReqeust({
- this.messageCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory SetMessageInfoReqeust.fromJson(Map<String, dynamic> map) {
- return SetMessageInfoReqeust(
- messageCodes: map['MessageCodes']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> map) {
- return GetAnnouncementRequest(
- announcementCode: map['AnnouncementCode'],
- language: map['Language'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (announcementCode != null)
- map['AnnouncementCode'] = announcementCode;
- if (language != null)
- map['Language'] = language;
- return map;
- }
- }
- class NoReadMessagesDTO {
- int count;
- List<String>? noReadCodes;
- NoReadMessagesDTO({
- this.count = 0,
- this.noReadCodes,
- });
- factory NoReadMessagesDTO.fromJson(Map<String, dynamic> map) {
- return NoReadMessagesDTO(
- count: map['Count'],
- noReadCodes: map['NoReadCodes']?.cast<String>().toList(),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return GetNoReadMessagesRequest(
- transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return RemoveUserSingleTokenRequest(
- wSToken: map['WSToken'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String>? 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<String>? authorityGroups,
- List<String>? bindDevices,
- List<String>? bindDeviceOrganizations,
- String? lastIP,
- int logintimes = 0,
- UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
- List<String>? roleCodes,
- List<String>? rankCodes,
- List<String>? positionCodes,
- ApplyStateEnum applyState = ApplyStateEnum.NotApply,
- String? rankName,
- String? positionName,
- bool isDirector = false,
- List<String>? fieldList,
- List<String>? deletePatientCodes,
- bool isBatchExportDiagnoseData = false,
- String? bindAssistantUserCode,
- String? bindAssistantDoctorUserCode,
- LoginLockInfoDTO? loginLockInfo,
- String? signature,
- String? language,
- bool enableReportLabel = false,
- List<AssociatedInfoDTO>? associatedInfos,
- String? commonPlatformUserId,
- String? bindEmergencyDeviceCode,
- String? bindEmergencyExpertCode,
- List<String>? dashboardOrgCodes,
- String? organizationShortCode,
- String? rootOrganizationShortCode,
- bool isOldAgent = false,
- List<String>? 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<String, dynamic> map) {
- return UserMigratoryInfo(
- isDelete: map['IsDelete'],
- secretPassword: map['SecretPassword'],
- passwordUpdateTime: map['PasswordUpdateTime'] != null ? DateTime.parse(map['PasswordUpdateTime']) : null,
- passwordRecords: map['PasswordRecords']?.cast<String>().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<String>().toList(),
- bindDevices: map['BindDevices']?.cast<String>().toList(),
- bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast<String>().toList(),
- lastIP: map['LastIP'],
- logintimes: map['Logintimes'],
- userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
- roleCodes: map['RoleCodes']?.cast<String>().toList(),
- rankCodes: map['RankCodes']?.cast<String>().toList(),
- positionCodes: map['PositionCodes']?.cast<String>().toList(),
- applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
- rankName: map['RankName'],
- positionName: map['PositionName'],
- isDirector: map['IsDirector'],
- fieldList: map['FieldList']?.cast<String>().toList(),
- deletePatientCodes: map['DeletePatientCodes']?.cast<String>().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<String,dynamic>)).toList() : null,
- commonPlatformUserId: map['CommonPlatformUserId'],
- bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
- bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
- dashboardOrgCodes: map['DashboardOrgCodes']?.cast<String>().toList(),
- organizationShortCode: map['OrganizationShortCode'],
- rootOrganizationShortCode: map['RootOrganizationShortCode'],
- isOldAgent: map['IsOldAgent'],
- userFeatureCodes: map['UserFeatureCodes']?.cast<String>().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<String, dynamic> 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<UserMigratoryInfo>? userMigratorys;
- BatchInsertUserRequest({
- this.syncType = SyncDBEnum.Migrate,
- this.userMigratorys,
- String? token,
- }) : super(
- token: token,
- );
- factory BatchInsertUserRequest.fromJson(Map<String, dynamic> 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<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return QueryMigrateTimeRequest(
- isInitMigreate: map['IsInitMigreate'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return CommonLogOffRequest(
- verificationType: VerificationTypeEnum.values.firstWhere((e) => e.index == map['VerificationType']),
- anyCode: map['AnyCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetUserGroupPagesRequest(
- keyword: map['Keyword'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetUserGroupRequest(
- userGroupCode: map['UserGroupCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetGroupUserInfosRequest(
- keyword: map['Keyword'],
- userGroupCode: map['UserGroupCode'],
- languageCode: map['LanguageCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetGroupDeviceInfosRequest(
- keyword: map['Keyword'],
- userGroupCode: map['UserGroupCode'],
- languageCode: map['LanguageCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> map) {
- return GetGroupOrganizationsRequest(
- keyword: map['Keyword'],
- userGroupCode: map['UserGroupCode'],
- languageCode: map['LanguageCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String>? organizationCodes;
- List<String>? 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<String, dynamic> 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<String>().toList(),
- deviceCodes: map['DeviceCodes']?.cast<String>().toList(),
- recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']),
- language: map['Language'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> map) {
- return GetPackageByUniquedCodeRequest(
- uniquedCode: map['UniquedCode'],
- ipAddress: map['IpAddress'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- 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<String, dynamic> map) {
- return AddOrUpdatePackageRequest(
- packageInfo: map['PackageInfo'] != null ? PackagesDTO.fromJson(map['PackageInfo']) : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (packageInfo != null)
- map['PackageInfo'] = packageInfo;
- return map;
- }
- }
|