|
@@ -1,44 +1,9 @@
|
|
|
-import 'package:fis_jsonrpc/utils.dart';
|
|
|
-
|
|
|
-import 'package:fis_common/json_convert.dart';
|
|
|
-
|
|
|
-class BaseDTO {
|
|
|
- DateTime? createTime;
|
|
|
- DateTime? updateTime;
|
|
|
-
|
|
|
- BaseDTO({
|
|
|
- this.createTime,
|
|
|
- this.updateTime,
|
|
|
- });
|
|
|
-
|
|
|
- factory BaseDTO.fromJson(Map<String, dynamic> map) {
|
|
|
- return BaseDTO(
|
|
|
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = Map<String, dynamic>();
|
|
|
- if(createTime != null)
|
|
|
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
- if(updateTime != null)
|
|
|
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-enum UserInfoStateEnum {
|
|
|
- Nonactivated,
|
|
|
- Activated,
|
|
|
-}
|
|
|
-
|
|
|
-enum ApplyStateEnum {
|
|
|
- NotApply,
|
|
|
- Applying,
|
|
|
- Refused,
|
|
|
- Passed,
|
|
|
-}
|
|
|
+import 'device.m.dart';
|
|
|
+import 'user.m.dart';
|
|
|
+import 'identityApply.m.dart';
|
|
|
+import 'adminDB.m.dart';
|
|
|
+import 'authentication.m.dart';
|
|
|
+import 'organization.m.dart';
|
|
|
|
|
|
class UserPasswordDTO extends BaseDTO{
|
|
|
String? userCode;
|
|
@@ -100,14 +65,14 @@ class UserPasswordDTO extends BaseDTO{
|
|
|
headImageUrl: map['HeadImageUrl'],
|
|
|
organizationCode: map['OrganizationCode'],
|
|
|
rootOrganizationCode: map['RootOrganizationCode'],
|
|
|
- authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
|
|
|
- bindDevices: map['BindDevices'].cast<String>().toList(),
|
|
|
+ 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'].cast<String>().toList(),
|
|
|
- rankCodes: map['RankCodes'].cast<String>().toList(),
|
|
|
- positionCodes: map['PositionCodes'].cast<String>().toList(),
|
|
|
+ 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']),
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
@@ -155,37 +120,6 @@ class UserPasswordDTO extends BaseDTO{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class TableDataItem<T> {
|
|
|
- UserPasswordDTO? data;
|
|
|
- Map<String,String>? platformDatas;
|
|
|
- String? extensionData;
|
|
|
-
|
|
|
- TableDataItem({
|
|
|
- this.data,
|
|
|
- this.platformDatas,
|
|
|
- this.extensionData,
|
|
|
- });
|
|
|
-
|
|
|
- factory TableDataItem.fromJson(Map<String, dynamic> map) {
|
|
|
- return TableDataItem(
|
|
|
- data: map['Data'],
|
|
|
- platformDatas: map['PlatformDatas'].cast<String,String>(),
|
|
|
- extensionData: map['ExtensionData'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = Map<String, dynamic>();
|
|
|
- if(data != null)
|
|
|
- map['Data'] = data;
|
|
|
- if(platformDatas != null)
|
|
|
- map['PlatformDatas'] = platformDatas;
|
|
|
- if(extensionData != null)
|
|
|
- map['ExtensionData'] = extensionData;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
class CreateUserInfoDBRequest extends TableDataItem<UserPasswordDTO>{
|
|
|
UserPasswordDTO? ;
|
|
|
|
|
@@ -202,7 +136,7 @@ class CreateUserInfoDBRequest extends TableDataItem<UserPasswordDTO>{
|
|
|
factory CreateUserInfoDBRequest.fromJson(Map<String, dynamic> map) {
|
|
|
return CreateUserInfoDBRequest(
|
|
|
: map[''],
|
|
|
- platformDatas: map['PlatformDatas'].cast<String,String>(),
|
|
|
+ platformDatas: map['PlatformDatas'] != null ? map['PlatformDatas'].cast<String,String>() : null,
|
|
|
extensionData: map['ExtensionData'],
|
|
|
);
|
|
|
}
|
|
@@ -215,204 +149,6 @@ class CreateUserInfoDBRequest extends TableDataItem<UserPasswordDTO>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class UserDTO extends BaseDTO{
|
|
|
- String? userCode;
|
|
|
- String? userName;
|
|
|
- String? phone;
|
|
|
- String? email;
|
|
|
- String? nickName;
|
|
|
- String? fullName;
|
|
|
- String? headImageUrl;
|
|
|
- String? organizationCode;
|
|
|
- String? rootOrganizationCode;
|
|
|
- List<String>? authorityGroups;
|
|
|
- List<String>? bindDevices;
|
|
|
- String? lastIP;
|
|
|
- int logintimes;
|
|
|
- UserInfoStateEnum userState;
|
|
|
- List<String>? roleCodes;
|
|
|
- List<String>? rankCodes;
|
|
|
- List<String>? positionCodes;
|
|
|
- ApplyStateEnum applyState;
|
|
|
-
|
|
|
- UserDTO({
|
|
|
- this.userCode,
|
|
|
- this.userName,
|
|
|
- this.phone,
|
|
|
- this.email,
|
|
|
- this.nickName,
|
|
|
- this.fullName,
|
|
|
- this.headImageUrl,
|
|
|
- this.organizationCode,
|
|
|
- this.rootOrganizationCode,
|
|
|
- this.authorityGroups,
|
|
|
- this.bindDevices,
|
|
|
- this.lastIP,
|
|
|
- this.logintimes = 0,
|
|
|
- this.userState = UserInfoStateEnum.Nonactivated,
|
|
|
- this.roleCodes,
|
|
|
- this.rankCodes,
|
|
|
- this.positionCodes,
|
|
|
- this.applyState = ApplyStateEnum.NotApply,
|
|
|
- DateTime? createTime,
|
|
|
- DateTime? updateTime,
|
|
|
- }) : super(
|
|
|
- createTime: createTime,
|
|
|
- updateTime: updateTime,
|
|
|
- );
|
|
|
-
|
|
|
- factory UserDTO.fromJson(Map<String, dynamic> map) {
|
|
|
- return UserDTO(
|
|
|
- userCode: map['UserCode'],
|
|
|
- userName: map['UserName'],
|
|
|
- phone: map['Phone'],
|
|
|
- email: map['Email'],
|
|
|
- nickName: map['NickName'],
|
|
|
- fullName: map['FullName'],
|
|
|
- headImageUrl: map['HeadImageUrl'],
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
- rootOrganizationCode: map['RootOrganizationCode'],
|
|
|
- authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
|
|
|
- bindDevices: map['BindDevices'].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']),
|
|
|
- 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(userName != null)
|
|
|
- map['UserName'] = userName;
|
|
|
- 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(rootOrganizationCode != null)
|
|
|
- map['RootOrganizationCode'] = rootOrganizationCode;
|
|
|
- if(authorityGroups != null)
|
|
|
- map['AuthorityGroups'] = authorityGroups;
|
|
|
- if(bindDevices != null)
|
|
|
- map['BindDevices'] = bindDevices;
|
|
|
- if(lastIP != null)
|
|
|
- map['LastIP'] = lastIP;
|
|
|
- map['Logintimes'] = logintimes;
|
|
|
- map['UserState'] = userState.index;
|
|
|
- if(roleCodes != null)
|
|
|
- map['RoleCodes'] = roleCodes;
|
|
|
- if(rankCodes != null)
|
|
|
- map['RankCodes'] = rankCodes;
|
|
|
- if(positionCodes != null)
|
|
|
- map['PositionCodes'] = positionCodes;
|
|
|
- map['ApplyState'] = applyState.index;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class PageCollection<T> {
|
|
|
- int currentPage;
|
|
|
- int pageSize;
|
|
|
- int dataCount;
|
|
|
- List<T>? pageData;
|
|
|
-
|
|
|
- PageCollection({
|
|
|
- this.currentPage = 0,
|
|
|
- this.pageSize = 0,
|
|
|
- this.dataCount = 0,
|
|
|
- this.pageData,
|
|
|
- });
|
|
|
-
|
|
|
- factory PageCollection.fromJson(Map<String, dynamic> map) {
|
|
|
- List<T> pageDataList = [];
|
|
|
- if (map['PageData'] != null) {
|
|
|
- pageDataList.addAll(
|
|
|
- (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
|
|
|
- }
|
|
|
- return PageCollection(
|
|
|
- currentPage: map['CurrentPage'],
|
|
|
- pageSize: map['PageSize'],
|
|
|
- dataCount: map['DataCount'],
|
|
|
- pageData: pageDataList,
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = Map<String, dynamic>();
|
|
|
- map['CurrentPage'] = currentPage;
|
|
|
- map['PageSize'] = pageSize;
|
|
|
- map['DataCount'] = dataCount;
|
|
|
- if(pageData != null)
|
|
|
- map['PageData'] = pageData;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class BaseRequest {
|
|
|
-
|
|
|
- BaseRequest({
|
|
|
- });
|
|
|
-
|
|
|
- factory BaseRequest.fromJson(Map<String, dynamic> map) {
|
|
|
- return BaseRequest(
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = Map<String, dynamic>();
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class PageRequest extends BaseRequest{
|
|
|
- int currentPage;
|
|
|
- int pageSize;
|
|
|
- Map<String,String>? filter;
|
|
|
- bool isFuzzy;
|
|
|
-
|
|
|
- PageRequest({
|
|
|
- this.currentPage = 0,
|
|
|
- this.pageSize = 0,
|
|
|
- this.filter,
|
|
|
- this.isFuzzy = false,
|
|
|
- }) : super(
|
|
|
- );
|
|
|
-
|
|
|
- factory PageRequest.fromJson(Map<String, dynamic> map) {
|
|
|
- return PageRequest(
|
|
|
- currentPage: map['CurrentPage'],
|
|
|
- pageSize: map['PageSize'],
|
|
|
- filter: map['Filter'].cast<String,String>(),
|
|
|
- isFuzzy: map['IsFuzzy'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- map['CurrentPage'] = currentPage;
|
|
|
- map['PageSize'] = pageSize;
|
|
|
- if(filter != null)
|
|
|
- map['Filter'] = filter;
|
|
|
- map['IsFuzzy'] = isFuzzy;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
class UpdateUsersDBRequest {
|
|
|
List<TableDataItem<UserPasswordDTO>>? users;
|
|
|
|
|
@@ -422,7 +158,7 @@ class UpdateUsersDBRequest {
|
|
|
|
|
|
factory UpdateUsersDBRequest.fromJson(Map<String, dynamic> map) {
|
|
|
return UpdateUsersDBRequest(
|
|
|
- users: map['Users'].map((e)=>TableDataItem<UserPasswordDTO>.fromJson(e as Map<String,dynamic>)).toList(),
|
|
|
+ users: map['Users'] != null ? map['Users'].map((e)=>TableDataItem<UserPasswordDTO>.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -481,8 +217,8 @@ class BingDevicesToUsersRequest {
|
|
|
|
|
|
factory BingDevicesToUsersRequest.fromJson(Map<String, dynamic> map) {
|
|
|
return BingDevicesToUsersRequest(
|
|
|
- deviceCodes: map['DeviceCodes'].cast<String>().toList(),
|
|
|
- userCodes: map['UserCodes'].cast<String>().toList(),
|
|
|
+ deviceCodes: map['DeviceCodes'] != null ? map['DeviceCodes'].cast<String>().toList() : null,
|
|
|
+ userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -547,94 +283,6 @@ class ManageDeviceUserDTO {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class PageResult<T> {
|
|
|
- int pageIndex;
|
|
|
- int pageSize;
|
|
|
- int totalCount;
|
|
|
- List<T>? pageData;
|
|
|
-
|
|
|
- PageResult({
|
|
|
- this.pageIndex = 0,
|
|
|
- this.pageSize = 0,
|
|
|
- this.totalCount = 0,
|
|
|
- this.pageData,
|
|
|
- });
|
|
|
-
|
|
|
- factory PageResult.fromJson(Map<String, dynamic> map) {
|
|
|
- List<T> pageDataList = [];
|
|
|
- if (map['PageData'] != null) {
|
|
|
- pageDataList.addAll(
|
|
|
- (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
|
|
|
- }
|
|
|
- return PageResult(
|
|
|
- pageIndex: map['PageIndex'],
|
|
|
- pageSize: map['PageSize'],
|
|
|
- totalCount: map['TotalCount'],
|
|
|
- pageData: pageDataList,
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = Map<String, dynamic>();
|
|
|
- map['PageIndex'] = pageIndex;
|
|
|
- map['PageSize'] = pageSize;
|
|
|
- map['TotalCount'] = totalCount;
|
|
|
- if(pageData != null)
|
|
|
- map['PageData'] = pageData;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class TokenRequest extends BaseRequest{
|
|
|
- String? token;
|
|
|
-
|
|
|
- TokenRequest({
|
|
|
- this.token,
|
|
|
- }) : super(
|
|
|
- );
|
|
|
-
|
|
|
- factory TokenRequest.fromJson(Map<String, dynamic> map) {
|
|
|
- return TokenRequest(
|
|
|
- token: map['Token'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- if(token != null)
|
|
|
- map['Token'] = token;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class PageRequest extends TokenRequest{
|
|
|
- int pageIndex;
|
|
|
- int pageSize;
|
|
|
-
|
|
|
- PageRequest({
|
|
|
- this.pageIndex = 0,
|
|
|
- this.pageSize = 0,
|
|
|
- String? token,
|
|
|
- }) : super(
|
|
|
- token: token,
|
|
|
- );
|
|
|
-
|
|
|
- factory PageRequest.fromJson(Map<String, dynamic> map) {
|
|
|
- return PageRequest(
|
|
|
- pageIndex: map['PageIndex'],
|
|
|
- pageSize: map['PageSize'],
|
|
|
- token: map['Token'],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, dynamic> toJson() {
|
|
|
- final map = super.toJson();
|
|
|
- map['PageIndex'] = pageIndex;
|
|
|
- map['PageSize'] = pageSize;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
class GetDeviceUserPagesRequest extends PageRequest{
|
|
|
String? deviceCode;
|
|
|
String? queryType;
|
|
@@ -731,166 +379,6 @@ class ManageOrganizationUserDTO {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class OrganizationBaseDTO extends BaseDTO{
|
|
|
- String? organizationCode;
|
|
|
- String? organizationName;
|
|
|
-
|
|
|
- OrganizationBaseDTO({
|
|
|
- this.organizationCode,
|
|
|
- this.organizationName,
|
|
|
- DateTime? createTime,
|
|
|
- DateTime? updateTime,
|
|
|
- }) : super(
|
|
|
- createTime: createTime,
|
|
|
- updateTime: updateTime,
|
|
|
- );
|
|
|
-
|
|
|
- factory OrganizationBaseDTO.fromJson(Map<String, dynamic> map) {
|
|
|
- return OrganizationBaseDTO(
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
- organizationName: map['OrganizationName'],
|
|
|
- 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(organizationCode != null)
|
|
|
- map['OrganizationCode'] = organizationCode;
|
|
|
- if(organizationName != null)
|
|
|
- map['OrganizationName'] = organizationName;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-class OrganizationBasicDTO extends OrganizationBaseDTO{
|
|
|
- String? regionCode;
|
|
|
- String? parentCode;
|
|
|
- String? logoUrl;
|
|
|
-
|
|
|
- OrganizationBasicDTO({
|
|
|
- this.regionCode,
|
|
|
- this.parentCode,
|
|
|
- this.logoUrl,
|
|
|
- String? organizationCode,
|
|
|
- String? organizationName,
|
|
|
- DateTime? createTime,
|
|
|
- DateTime? updateTime,
|
|
|
- }) : super(
|
|
|
- organizationCode: organizationCode,
|
|
|
- organizationName: organizationName,
|
|
|
- createTime: createTime,
|
|
|
- updateTime: updateTime,
|
|
|
- );
|
|
|
-
|
|
|
- factory OrganizationBasicDTO.fromJson(Map<String, dynamic> map) {
|
|
|
- return OrganizationBasicDTO(
|
|
|
- regionCode: map['RegionCode'],
|
|
|
- parentCode: map['ParentCode'],
|
|
|
- logoUrl: map['LogoUrl'],
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
- organizationName: map['OrganizationName'],
|
|
|
- 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(regionCode != null)
|
|
|
- map['RegionCode'] = regionCode;
|
|
|
- if(parentCode != null)
|
|
|
- map['ParentCode'] = parentCode;
|
|
|
- if(logoUrl != null)
|
|
|
- map['LogoUrl'] = logoUrl;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-enum OrganizationTypeEnum {
|
|
|
- Corporation,
|
|
|
- Department,
|
|
|
- Section,
|
|
|
-}
|
|
|
-
|
|
|
-enum OrganizationStateEnum {
|
|
|
- WaitAudit,
|
|
|
- Audited,
|
|
|
- Rejected,
|
|
|
-}
|
|
|
-
|
|
|
-class OrganizationDTO extends OrganizationBasicDTO{
|
|
|
- String? description;
|
|
|
- String? rootCode;
|
|
|
- OrganizationTypeEnum organizationType;
|
|
|
- List<String>? authorityGroups;
|
|
|
- String? nautica;
|
|
|
- OrganizationStateEnum state;
|
|
|
- List<String>? directors;
|
|
|
-
|
|
|
- OrganizationDTO({
|
|
|
- this.description,
|
|
|
- this.rootCode,
|
|
|
- this.organizationType = OrganizationTypeEnum.Corporation,
|
|
|
- this.authorityGroups,
|
|
|
- this.nautica,
|
|
|
- this.state = OrganizationStateEnum.WaitAudit,
|
|
|
- this.directors,
|
|
|
- String? regionCode,
|
|
|
- String? parentCode,
|
|
|
- String? logoUrl,
|
|
|
- String? organizationCode,
|
|
|
- String? organizationName,
|
|
|
- DateTime? createTime,
|
|
|
- DateTime? updateTime,
|
|
|
- }) : super(
|
|
|
- regionCode: regionCode,
|
|
|
- parentCode: parentCode,
|
|
|
- logoUrl: logoUrl,
|
|
|
- organizationCode: organizationCode,
|
|
|
- organizationName: organizationName,
|
|
|
- createTime: createTime,
|
|
|
- updateTime: updateTime,
|
|
|
- );
|
|
|
-
|
|
|
- factory OrganizationDTO.fromJson(Map<String, dynamic> map) {
|
|
|
- return OrganizationDTO(
|
|
|
- description: map['Description'],
|
|
|
- rootCode: map['RootCode'],
|
|
|
- organizationType: OrganizationTypeEnum.values.firstWhere((e) => e.index == map['OrganizationType']),
|
|
|
- authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
|
|
|
- nautica: map['Nautica'],
|
|
|
- state: OrganizationStateEnum.values.firstWhere((e) => e.index == map['State']),
|
|
|
- directors: map['Directors'].cast<String>().toList(),
|
|
|
- regionCode: map['RegionCode'],
|
|
|
- parentCode: map['ParentCode'],
|
|
|
- logoUrl: map['LogoUrl'],
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
- organizationName: map['OrganizationName'],
|
|
|
- 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(description != null)
|
|
|
- map['Description'] = description;
|
|
|
- if(rootCode != null)
|
|
|
- map['RootCode'] = rootCode;
|
|
|
- map['OrganizationType'] = organizationType.index;
|
|
|
- if(authorityGroups != null)
|
|
|
- map['AuthorityGroups'] = authorityGroups;
|
|
|
- if(nautica != null)
|
|
|
- map['Nautica'] = nautica;
|
|
|
- map['State'] = state.index;
|
|
|
- if(directors != null)
|
|
|
- map['Directors'] = directors;
|
|
|
- return map;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
class GetOrganizationUserPagesRequest extends PageRequest{
|
|
|
String? organizationCode;
|
|
|
String? queryType;
|
|
@@ -933,4 +421,3 @@ class GetOrganizationUserPagesRequest extends PageRequest{
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|