1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051 |
- import 'liveConsultation.m.dart';
- import 'notification.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;
- AlterUserInfoRequest({
- this.phone,
- this.email,
- this.nickName,
- this.fullName,
- this.headImageUrl,
- this.organizationCode,
- this.extensionData,
- 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'],
- 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;
- return map;
- }
- }
- enum OrganizationQueryTypeEnum {
- Wait,
- Single,
- AllDep,
- All,
- }
- class GetUserListRequest extends TokenRequest{
- String? keyword;
- OrganizationQueryTypeEnum organizationQueryType;
- String? organizationCode;
- String? rankCode;
- String? positionCode;
- bool exceptSelf;
- String? language;
- List<String >? roleCodes;
- GetUserListRequest({
- this.keyword,
- this.organizationQueryType = OrganizationQueryTypeEnum.Wait,
- this.organizationCode,
- this.rankCode,
- this.positionCode,
- this.exceptSelf = false,
- this.language,
- this.roleCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory GetUserListRequest.fromJson(Map<String, dynamic> map) {
- return GetUserListRequest(
- 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'] != null ? map['RoleCodes'].cast<String>().toList() : null,
- 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;
- 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'] != null ? map['UserCodes'].cast<String>().toList() : null,
- 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'] != null ? map['RoleCodes'].cast<String>().toList() : null,
- rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
- positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
- 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? phone;
- String? headImageUrl;
- List<String >? rankNames;
- String? rootOrganizationCode;
- String? rootOrganizationName;
- ShareDeviceUserDTO({
- this.userCode,
- this.fullName,
- 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'],
- phone: map['Phone'],
- headImageUrl: map['HeadImageUrl'],
- rankNames: map['RankNames'] != null ? map['RankNames'].cast<String>().toList() : null,
- 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(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? phone,
- String? email,
- String? nickName,
- String? fullName,
- String? organizationCode,
- String? organizationName,
- String? rootOrganizationCode,
- String? rootOrganizationName,
- List<String >? authorityGroups,
- List<String >? bindDevices,
- 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? userCode,
- String? userName,
- String? headImageUrl,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- phone: phone,
- email: email,
- nickName: nickName,
- fullName: fullName,
- organizationCode: organizationCode,
- organizationName: organizationName,
- rootOrganizationCode: rootOrganizationCode,
- rootOrganizationName: rootOrganizationName,
- authorityGroups: authorityGroups,
- bindDevices: bindDevices,
- 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,
- userCode: userCode,
- userName: userName,
- headImageUrl: headImageUrl,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory UserInfoByCodeDTO.fromJson(Map<String, dynamic> map) {
- return UserInfoByCodeDTO(
- bindAssistantUserName: map['BindAssistantUserName'],
- bindAssistantDoctorUserName: map['BindAssistantDoctorUserName'],
- phone: map['Phone'],
- email: map['Email'],
- nickName: map['NickName'],
- fullName: map['FullName'],
- organizationCode: map['OrganizationCode'],
- organizationName: map['OrganizationName'],
- rootOrganizationCode: map['RootOrganizationCode'],
- rootOrganizationName: map['RootOrganizationName'],
- authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
- bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
- lastIP: map['LastIP'],
- logintimes: map['Logintimes'],
- userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
- roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
- rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
- positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
- applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
- rankName: map['RankName'],
- positionName: map['PositionName'],
- isDirector: map['IsDirector'],
- fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
- deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
- 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'],
- userCode: map['UserCode'],
- userName: map['UserName'],
- headImageUrl: map['HeadImageUrl'],
- 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;
- }
- }
- enum TransactionTypeEnum {
- placeHolder_0,
- Consultion,
- Chat,
- Announcement,
- Session,
- RemoteDia,
- ControlParameter,
- Education,
- Upgrade,
- Live,
- RemoteControl,
- }
- 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'] != null ? map['MessageCodes'].cast<String>().toList() : null,
- 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'] != null ? map['NoReadCodes'].cast<String>().toList() : null,
- );
- }
- 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;
- }
- }
|