import 'liveConsultation.m.dart'; import 'notification.m.dart'; import 'vitalResidence.m.dart'; import 'device.m.dart'; import 'vitalUserFeature.m.dart'; class CreateUserRequest extends TokenRequest{ String? code; String? userName; String? phone; String? cardNo; String? realName; String? headImageToken; String? organizationCode; String? teamCode; String? roleCode; String? secretPassword; String? rankName; String? signature; CreateUserRequest({ this.code, this.userName, this.phone, this.cardNo, this.realName, this.headImageToken, this.organizationCode, this.teamCode, this.roleCode, this.secretPassword, this.rankName, this.signature, String? token, }) : super( token: token, ); factory CreateUserRequest.fromJson(Map map) { return CreateUserRequest( code: map['Code'], userName: map['UserName'], phone: map['Phone'], cardNo: map['CardNo'], realName: map['RealName'], headImageToken: map['HeadImageToken'], organizationCode: map['OrganizationCode'], teamCode: map['TeamCode'], roleCode: map['RoleCode'], secretPassword: map['SecretPassword'], rankName: map['RankName'], signature: map['Signature'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (userName != null) map['UserName'] = userName; if (phone != null) map['Phone'] = phone; if (cardNo != null) map['CardNo'] = cardNo; if (realName != null) map['RealName'] = realName; if (headImageToken != null) map['HeadImageToken'] = headImageToken; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (teamCode != null) map['TeamCode'] = teamCode; if (roleCode != null) map['RoleCode'] = roleCode; if (secretPassword != null) map['SecretPassword'] = secretPassword; if (rankName != null) map['RankName'] = rankName; if (signature != null) map['Signature'] = signature; return map; } } class UserDTO2 extends BaseDTO{ String? code; String? userName; String? phone; String? cardNo; String? realName; String? headImageToken; String? organizationCode; String? organizationName; String? organizationPhone; String? teamCode; String? teamName; String? roleCode; String? roleName; String? rankName; List? residence; String? principalCode; String? principalName; String? principalPhone; String? provinceCode; String? cityCode; String? districtCode; String? signature; UserDTO2({ this.code, this.userName, this.phone, this.cardNo, this.realName, this.headImageToken, this.organizationCode, this.organizationName, this.organizationPhone, this.teamCode, this.teamName, this.roleCode, this.roleName, this.rankName, this.residence, this.principalCode, this.principalName, this.principalPhone, this.provinceCode, this.cityCode, this.districtCode, this.signature, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory UserDTO2.fromJson(Map map) { return UserDTO2( code: map['Code'], userName: map['UserName'], phone: map['Phone'], cardNo: map['CardNo'], realName: map['RealName'], headImageToken: map['HeadImageToken'], organizationCode: map['OrganizationCode'], organizationName: map['OrganizationName'], organizationPhone: map['OrganizationPhone'], teamCode: map['TeamCode'], teamName: map['TeamName'], roleCode: map['RoleCode'], roleName: map['RoleName'], rankName: map['RankName'], residence: map['Residence'] != null ? (map['Residence'] as List).map((e)=>ResidenceDTO.fromJson(e as Map)).toList() : null, principalCode: map['PrincipalCode'], principalName: map['PrincipalName'], principalPhone: map['PrincipalPhone'], provinceCode: map['ProvinceCode'], cityCode: map['CityCode'], districtCode: map['DistrictCode'], signature: map['Signature'], 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 (userName != null) map['UserName'] = userName; if (phone != null) map['Phone'] = phone; if (cardNo != null) map['CardNo'] = cardNo; if (realName != null) map['RealName'] = realName; if (headImageToken != null) map['HeadImageToken'] = headImageToken; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (organizationName != null) map['OrganizationName'] = organizationName; if (organizationPhone != null) map['OrganizationPhone'] = organizationPhone; if (teamCode != null) map['TeamCode'] = teamCode; if (teamName != null) map['TeamName'] = teamName; if (roleCode != null) map['RoleCode'] = roleCode; if (roleName != null) map['RoleName'] = roleName; if (rankName != null) map['RankName'] = rankName; if (residence != null) map['Residence'] = residence; if (principalCode != null) map['PrincipalCode'] = principalCode; if (principalName != null) map['PrincipalName'] = principalName; if (principalPhone != null) map['PrincipalPhone'] = principalPhone; if (provinceCode != null) map['ProvinceCode'] = provinceCode; if (cityCode != null) map['CityCode'] = cityCode; if (districtCode != null) map['DistrictCode'] = districtCode; if (signature != null) map['Signature'] = signature; return map; } } class GetUserRequest extends TokenRequest{ String? code; GetUserRequest({ this.code, String? token, }) : super( token: token, ); factory GetUserRequest.fromJson(Map map) { return GetUserRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; return map; } } class GetUserByKeyRequest extends TokenRequest{ String? key; String? value; GetUserByKeyRequest({ this.key, this.value, String? token, }) : super( token: token, ); factory GetUserByKeyRequest.fromJson(Map map) { return GetUserByKeyRequest( key: map['Key'], value: map['Value'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (key != null) map['Key'] = key; if (value != null) map['Value'] = value; return map; } } class UserPageRequest extends PageRequest{ UserPageRequest({ int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory UserPageRequest.fromJson(Map map) { return UserPageRequest( pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); return map; } } class RemoveUserRequest extends TokenRequest{ String? code; RemoveUserRequest({ this.code, String? token, }) : super( token: token, ); factory RemoveUserRequest.fromJson(Map map) { return RemoveUserRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; return map; } } class GetUserListRequest2 extends TokenRequest{ List? codes; GetUserListRequest2({ this.codes, String? token, }) : super( token: token, ); factory GetUserListRequest2.fromJson(Map map) { return GetUserListRequest2( codes: map['Codes']?.cast().toList(), token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (codes != null) map['Codes'] = codes; return map; } } class UpdateUserRequest extends TokenRequest{ String? code; String? phone; String? cardNo; String? realName; String? headImageToken; String? organizationCode; String? teamCode; String? roleCode; String? rankName; String? signature; UpdateUserRequest({ this.code, this.phone, this.cardNo, this.realName, this.headImageToken, this.organizationCode, this.teamCode, this.roleCode, this.rankName, this.signature, String? token, }) : super( token: token, ); factory UpdateUserRequest.fromJson(Map map) { return UpdateUserRequest( code: map['Code'], phone: map['Phone'], cardNo: map['CardNo'], realName: map['RealName'], headImageToken: map['HeadImageToken'], organizationCode: map['OrganizationCode'], teamCode: map['TeamCode'], roleCode: map['RoleCode'], rankName: map['RankName'], signature: map['Signature'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (phone != null) map['Phone'] = phone; if (cardNo != null) map['CardNo'] = cardNo; if (realName != null) map['RealName'] = realName; if (headImageToken != null) map['HeadImageToken'] = headImageToken; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (teamCode != null) map['TeamCode'] = teamCode; if (roleCode != null) map['RoleCode'] = roleCode; if (rankName != null) map['RankName'] = rankName; if (signature != null) map['Signature'] = signature; return map; } } class ResetUserNameRequest extends TokenRequest{ String? code; String? userName; ResetUserNameRequest({ this.code, this.userName, String? token, }) : super( token: token, ); factory ResetUserNameRequest.fromJson(Map map) { return ResetUserNameRequest( code: map['Code'], userName: map['UserName'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (userName != null) map['UserName'] = userName; return map; } } class GetUserPageByOrganizationCodeRequest extends PageRequest{ String? organizationCode; GetUserPageByOrganizationCodeRequest({ this.organizationCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetUserPageByOrganizationCodeRequest.fromJson(Map map) { return GetUserPageByOrganizationCodeRequest( organizationCode: map['OrganizationCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (organizationCode != null) map['OrganizationCode'] = organizationCode; return map; } } class SetAreaOfResponsibilityRequest extends TokenRequest{ String? code; List? residenceCodes; SetAreaOfResponsibilityRequest({ this.code, this.residenceCodes, String? token, }) : super( token: token, ); factory SetAreaOfResponsibilityRequest.fromJson(Map map) { return SetAreaOfResponsibilityRequest( code: map['Code'], residenceCodes: map['ResidenceCodes']?.cast().toList(), token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (residenceCodes != null) map['ResidenceCodes'] = residenceCodes; return map; } } class GetAreaOfResponsibilityRequest extends TokenRequest{ String? code; GetAreaOfResponsibilityRequest({ this.code, String? token, }) : super( token: token, ); factory GetAreaOfResponsibilityRequest.fromJson(Map map) { return GetAreaOfResponsibilityRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; return map; } } class GetUserPageByTeamCodeRequest extends PageRequest{ String? teamCode; GetUserPageByTeamCodeRequest({ this.teamCode, int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory GetUserPageByTeamCodeRequest.fromJson(Map map) { return GetUserPageByTeamCodeRequest( teamCode: map['TeamCode'], pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (teamCode != null) map['TeamCode'] = teamCode; return map; } } class SetSignatureRequest extends TokenRequest{ String? code; String? signature; SetSignatureRequest({ this.code, this.signature, String? token, }) : super( token: token, ); factory SetSignatureRequest.fromJson(Map map) { return SetSignatureRequest( code: map['Code'], signature: map['Signature'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (signature != null) map['Signature'] = signature; return map; } } class GetMenuPermissionRequest extends TokenRequest{ ApplicationTypeEnum appType; GetMenuPermissionRequest({ this.appType = ApplicationTypeEnum.Web, String? token, }) : super( token: token, ); factory GetMenuPermissionRequest.fromJson(Map map) { return GetMenuPermissionRequest( appType: ApplicationTypeEnum.values.firstWhere((e) => e.index == map['AppType']), token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['AppType'] = appType.index; return map; } } class GetOperationPermissionRequest extends TokenRequest{ ApplicationTypeEnum appType; GetOperationPermissionRequest({ this.appType = ApplicationTypeEnum.Web, String? token, }) : super( token: token, ); factory GetOperationPermissionRequest.fromJson(Map map) { return GetOperationPermissionRequest( appType: ApplicationTypeEnum.values.firstWhere((e) => e.index == map['AppType']), token: map['Token'], ); } Map toJson() { final map = super.toJson(); map['AppType'] = appType.index; return map; } }