123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- import 'notification.m.dart';
- import 'liveConsultation.m.dart';
- import 'organization.m.dart';
- class GetUpgradeInfoResult {
- UpgradeTypeEnum upgradeType;
- String? upgradeCDNUrl;
- String? upgradeSourceUrl;
- String? backUpCDNUrl;
- String? backUpSourceUrl;
- UpgradeUpdateTypeEnum upgradeUpdateType;
- String? newVersion;
- String? description;
- GetUpgradeInfoResult({
- this.upgradeType = UpgradeTypeEnum.NoUpgrade,
- this.upgradeCDNUrl,
- this.upgradeSourceUrl,
- this.backUpCDNUrl,
- this.backUpSourceUrl,
- this.upgradeUpdateType = UpgradeUpdateTypeEnum.Part,
- this.newVersion,
- this.description,
- });
- factory GetUpgradeInfoResult.fromJson(Map<String, dynamic> map) {
- return GetUpgradeInfoResult(
- upgradeType: UpgradeTypeEnum.values.firstWhere((e) => e.index == map['UpgradeType']),
- upgradeCDNUrl: map['UpgradeCDNUrl'],
- upgradeSourceUrl: map['UpgradeSourceUrl'],
- backUpCDNUrl: map['BackUpCDNUrl'],
- backUpSourceUrl: map['BackUpSourceUrl'],
- upgradeUpdateType: UpgradeUpdateTypeEnum.values.firstWhere((e) => e.index == map['UpgradeUpdateType']),
- newVersion: map['NewVersion'],
- description: map['Description'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['UpgradeType'] = upgradeType.index;
- if (upgradeCDNUrl != null) {
- map['UpgradeCDNUrl'] = upgradeCDNUrl;
- }
- if (upgradeSourceUrl != null) {
- map['UpgradeSourceUrl'] = upgradeSourceUrl;
- }
- if (backUpCDNUrl != null) {
- map['BackUpCDNUrl'] = backUpCDNUrl;
- }
- if (backUpSourceUrl != null) {
- map['BackUpSourceUrl'] = backUpSourceUrl;
- }
- map['UpgradeUpdateType'] = upgradeUpdateType.index;
- if (newVersion != null) {
- map['NewVersion'] = newVersion;
- }
- if (description != null) {
- map['Description'] = description;
- }
- return map;
- }
- }
- enum UpgradePlatformEnum {
- PC,
- Android,
- IOS,
- Mac,
- }
- enum UpgradeSourceTypeEnum {
- Client,
- US,
- SONOPOST,
- FISLib,
- }
- class GetUpgradeInfoRequest {
- UpgradePlatformEnum platform;
- UpgradeSourceTypeEnum sourceType;
- String? currentVersion;
- String? language;
- GetUpgradeInfoRequest({
- this.platform = UpgradePlatformEnum.PC,
- this.sourceType = UpgradeSourceTypeEnum.Client,
- this.currentVersion,
- this.language,
- });
- factory GetUpgradeInfoRequest.fromJson(Map<String, dynamic> map) {
- return GetUpgradeInfoRequest(
- platform: UpgradePlatformEnum.values.firstWhere((e) => e.index == map['Platform']),
- sourceType: UpgradeSourceTypeEnum.values.firstWhere((e) => e.index == map['SourceType']),
- currentVersion: map['CurrentVersion'],
- language: map['Language'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['Platform'] = platform.index;
- map['SourceType'] = sourceType.index;
- if (currentVersion != null) {
- map['CurrentVersion'] = currentVersion;
- }
- if (language != null) {
- map['Language'] = language;
- }
- return map;
- }
- }
- class SetUpgradeInfoRequest {
- UpgradePlatformEnum platform;
- UpgradeSourceTypeEnum sourceType;
- String? currentVersion;
- String? token;
- SetUpgradeInfoRequest({
- this.platform = UpgradePlatformEnum.PC,
- this.sourceType = UpgradeSourceTypeEnum.Client,
- this.currentVersion,
- this.token,
- });
- factory SetUpgradeInfoRequest.fromJson(Map<String, dynamic> map) {
- return SetUpgradeInfoRequest(
- platform: UpgradePlatformEnum.values.firstWhere((e) => e.index == map['Platform']),
- sourceType: UpgradeSourceTypeEnum.values.firstWhere((e) => e.index == map['SourceType']),
- currentVersion: map['CurrentVersion'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['Platform'] = platform.index;
- map['SourceType'] = sourceType.index;
- if (currentVersion != null) {
- map['CurrentVersion'] = currentVersion;
- }
- if (token != null) {
- map['Token'] = token;
- }
- 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']?.cast<String>().toList(),
- 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;
- }
- }
- enum CurrentClientSourceTypeEnum {
- PC,
- Web,
- SONOPOST,
- FISLib,
- Android,
- }
- class GetFlyinsonoVersionRequest {
- CurrentClientSourceTypeEnum currentClientType;
- GetFlyinsonoVersionRequest({
- this.currentClientType = CurrentClientSourceTypeEnum.PC,
- });
- factory GetFlyinsonoVersionRequest.fromJson(Map<String, dynamic> map) {
- return GetFlyinsonoVersionRequest(
- currentClientType: CurrentClientSourceTypeEnum.values.firstWhere((e) => e.index == map['CurrentClientType']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['CurrentClientType'] = currentClientType.index;
- return map;
- }
- }
|