From 81410f6f15eb86d7684f41259dba0f9a19fb57cb Mon Sep 17 00:00:00 2001 From: minhhieu2312 Date: Thu, 26 Feb 2026 14:28:55 +0700 Subject: [PATCH] =?UTF-8?q?API=20t=E1=BB=B1=20=C4=91=E1=BB=99ng=20Swagger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api_automatic/CHANGELOG.md | 488 + api_automatic/LICENSE | 201 + api_automatic/README.md | 153 + api_automatic/analysis_options.yaml | 15 + api_automatic/assets/lib_full_logo.png | Bin 0 -> 10946 bytes api_automatic/assets/lib_logo.png | Bin 0 -> 12221 bytes api_automatic/assets/overview_image.png | Bin 0 -> 83473 bytes api_automatic/build.yaml | 14 + .../lib/src/code_generators/constants.dart | 67 + .../swagger_additions_generator.dart | 225 + .../swagger_converter_generator.dart | 96 + .../swagger_enums_generator.dart | 381 + .../swagger_models_generator.dart | 1114 + .../swagger_requests_generator.dart | 866 + .../v2/swagger_enums_generator_v2.dart | 13 + .../v2/swagger_models_generator_v2.dart | 102 + .../v3/swagger_enums_generator_v3.dart | 25 + .../v3/swagger_models_generator_v3.dart | 256 + api_automatic/lib/src/definitions.dart | 1 + api_automatic/lib/src/exception_words.dart | 57 + .../src/extensions/file_name_extensions.dart | 19 + .../src/extensions/parameter_extensions.dart | 42 + .../lib/src/extensions/string_extension.dart | 52 + .../lib/src/models/generator_options.dart | 204 + .../lib/src/models/generator_options.g2.dart | 131 + .../lib/src/swagger_code_generator.dart | 90 + .../requests/parameter_item.dart | 23 + .../requests/parameter_item.g2.dart | 24 + .../requests/swagger_request.dart | 94 + .../requests/swagger_request.g2.dart | 74 + .../requests/swagger_request_items.dart | 26 + .../requests/swagger_request_items.g2.dart | 25 + .../requests/swagger_request_parameter.dart | 60 + .../swagger_request_parameter.g2.dart | 44 + .../responses/swagger_response.dart | 80 + .../responses/swagger_response.g2.dart | 55 + .../responses/swagger_schema.dart | 61 + .../responses/swagger_schema.g2.dart | 52 + .../swagger_models/swagger_components.dart | 60 + .../swagger_models/swagger_components.g2.dart | 33 + .../lib/src/swagger_models/swagger_info.dart | 29 + .../src/swagger_models/swagger_info.g2.dart | 24 + .../lib/src/swagger_models/swagger_path.dart | 25 + .../src/swagger_models/swagger_path.g2.dart | 28 + .../lib/src/swagger_models/swagger_root.dart | 84 + .../src/swagger_models/swagger_root.g2.dart | 52 + .../lib/src/swagger_models/swagger_tag.dart | 20 + .../src/swagger_models/swagger_tag.g2.dart | 20 + .../lib/swagger_dart_code_generator.dart | 222 + api_automatic/pubspec.yaml | 33 + api_automatic/test/code_examples.dart | 1350 ++ .../test/converter_generator_definitions.dart | 95 + .../test/file_name_extensions_test.dart | 13 + .../additions_generator_test.dart | 69 + .../converter_generator_test.dart | 47 + .../generator_tests/enums_generator_test.dart | 150 + .../models_generator_test.dart | 704 + .../requests_generator_test.dart | 57 + .../test/generator_tests/test_data.dart | 796 + build.yaml | 80 +- lib/core/common/index.dart | 13 + lib/core/common/injection.dart | 7 + lib/core/components/constants_widget.dart | 93 + lib/core/components/index.dart | 4 + lib/core/constants/api_path.dart | 7 + lib/core/constants/index.dart | 4 + lib/core/theme/custom_color.dart | 2 + lib/features/model/index.dart | 1 + lib/features/model/login_dto.dart | 27 + .../presentation/account/login_screen.dart | 157 + lib/features/repositories/hra_repository.dart | 1444 ++ .../repositories/hra_repository.g.dart | 6462 ++++++ .../repositories/hra_repository_enums.dart | 913 + .../repositories/hra_repository_models.dart | 17441 ++++++++++++++++ .../repositories/hra_repository_models.g.dart | 11446 ++++++++++ lib/features/usecases/user_use_cases.dart | 35 + pubspec.yaml | 13 +- update_open_api.ps1 | 14 + update_open_api.sh | 4 + 79 files changed, 47302 insertions(+), 6 deletions(-) create mode 100644 api_automatic/CHANGELOG.md create mode 100644 api_automatic/LICENSE create mode 100644 api_automatic/README.md create mode 100644 api_automatic/analysis_options.yaml create mode 100644 api_automatic/assets/lib_full_logo.png create mode 100644 api_automatic/assets/lib_logo.png create mode 100644 api_automatic/assets/overview_image.png create mode 100644 api_automatic/build.yaml create mode 100644 api_automatic/lib/src/code_generators/constants.dart create mode 100644 api_automatic/lib/src/code_generators/swagger_additions_generator.dart create mode 100644 api_automatic/lib/src/code_generators/swagger_converter_generator.dart create mode 100644 api_automatic/lib/src/code_generators/swagger_enums_generator.dart create mode 100644 api_automatic/lib/src/code_generators/swagger_models_generator.dart create mode 100644 api_automatic/lib/src/code_generators/swagger_requests_generator.dart create mode 100644 api_automatic/lib/src/code_generators/v2/swagger_enums_generator_v2.dart create mode 100644 api_automatic/lib/src/code_generators/v2/swagger_models_generator_v2.dart create mode 100644 api_automatic/lib/src/code_generators/v3/swagger_enums_generator_v3.dart create mode 100644 api_automatic/lib/src/code_generators/v3/swagger_models_generator_v3.dart create mode 100644 api_automatic/lib/src/definitions.dart create mode 100644 api_automatic/lib/src/exception_words.dart create mode 100644 api_automatic/lib/src/extensions/file_name_extensions.dart create mode 100644 api_automatic/lib/src/extensions/parameter_extensions.dart create mode 100644 api_automatic/lib/src/extensions/string_extension.dart create mode 100644 api_automatic/lib/src/models/generator_options.dart create mode 100644 api_automatic/lib/src/models/generator_options.g2.dart create mode 100644 api_automatic/lib/src/swagger_code_generator.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/parameter_item.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/parameter_item.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request_items.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request_items.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.dart create mode 100644 api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/responses/swagger_response.dart create mode 100644 api_automatic/lib/src/swagger_models/responses/swagger_response.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/responses/swagger_schema.dart create mode 100644 api_automatic/lib/src/swagger_models/responses/swagger_schema.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_components.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_components.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_info.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_info.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_path.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_path.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_root.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_root.g2.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_tag.dart create mode 100644 api_automatic/lib/src/swagger_models/swagger_tag.g2.dart create mode 100644 api_automatic/lib/swagger_dart_code_generator.dart create mode 100644 api_automatic/pubspec.yaml create mode 100644 api_automatic/test/code_examples.dart create mode 100644 api_automatic/test/converter_generator_definitions.dart create mode 100644 api_automatic/test/file_name_extensions_test.dart create mode 100644 api_automatic/test/generator_tests/additions_generator_test.dart create mode 100644 api_automatic/test/generator_tests/converter_generator_test.dart create mode 100644 api_automatic/test/generator_tests/enums_generator_test.dart create mode 100644 api_automatic/test/generator_tests/models_generator_test.dart create mode 100644 api_automatic/test/generator_tests/requests_generator_test.dart create mode 100644 api_automatic/test/generator_tests/test_data.dart create mode 100644 lib/core/common/index.dart create mode 100644 lib/core/constants/api_path.dart create mode 100644 lib/core/constants/index.dart create mode 100644 lib/features/model/index.dart create mode 100644 lib/features/model/login_dto.dart create mode 100644 lib/features/presentation/account/login_screen.dart create mode 100644 lib/features/repositories/hra_repository.dart create mode 100644 lib/features/repositories/hra_repository.g.dart create mode 100644 lib/features/repositories/hra_repository_enums.dart create mode 100644 lib/features/repositories/hra_repository_models.dart create mode 100644 lib/features/repositories/hra_repository_models.g.dart create mode 100644 lib/features/usecases/user_use_cases.dart create mode 100644 update_open_api.ps1 create mode 100644 update_open_api.sh diff --git a/api_automatic/CHANGELOG.md b/api_automatic/CHANGELOG.md new file mode 100644 index 0000000..05f16b8 --- /dev/null +++ b/api_automatic/CHANGELOG.md @@ -0,0 +1,488 @@ +# 2.2.3 + +* Fixed Issue ([#138](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/138)) +* Fixed Issue ([#269](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/269)) +* Fixed generation of fields with type int32, int64. Parsing it like int + +* Fixed Issue ([#265](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/265)) +* Fixed generation of responses and request bodies in separate file + +# 2.2.1 + +* Added ability to generated models to separate file +* **BREAKING** Removed generation of client_index if generate only models +* Fixed Issue ([#244](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/244)) + +# 2.2.0+1 + +* Updated changelog (see previous version changes) + +# 2.2.0 + +* **BREAKING** Upgraded to support json_serializable 5.0.0 + +# 2.1.3+2 + +* Fixed Issue ([#245](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/245)) +* Fixed ability to set exclude_path and include_path + +# 2.1.3+1 + +* Fixed Issue ([#248](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/248)) +* Fix cases when responses was named like numbers + +# 2.1.3 + +* Fixed cases when swagger has not put post get requests +* Added validation for requests names generation + +# 2.1.2 + +* Updated packages json_serializable, json_annotation, build_runner + +# 2.1.1+4 + +* Fix for default value for named parameters + +# 2.1.1+3 + +* Fixed Issue ([#240](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/240)) +* Fixed Issue ([#211](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/211)) +* Fixed cases when parameters named by keywords, for example In, For, Class etx +* Added generation of parameters from, path (not only from requests) + +# 2.1.1+2 + +* Fixed issues when content has no application/json child + +# 2.1.1+1 + +* Fixed Issue ([#235](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/235)) +* Fixed cases when field number 'number' generated as $num +* Fixed cases when field 'num' generated ad 'num' (basic dart type) + +# 2.1.1 + +* Stabilized generator +* Fixed issue when parameters named like int, double etc. +* Fixed Issue ([#108](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/108)) + +# 2.1.0-prerelease.9 + +* Fixed Issue ([#228](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/228)) +* Fixed Issue ([#206](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/206)) +* Fixed cases when file names like some_file.extension.swagger.json.dart.json +* Removed generation of converter when build_only_models is true + + +# 2.1.0-prerelease.8 + +* Fixed Issue ([#221](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/221)) +* Added generation of int get hashCode +* Added example + +# 2.1.0-prerelease.7 + +* Fixed Issue ([#186](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/186)) +* Fixed Issue ([#204](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/204)) + +# 2.1.0-prerelease.6 + +* **BREAKING**: Added dollar signs to generated converter and mappings + +# 2.1.0-prerelease.5 + +* Fixed Issue ([#212](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/212)) +* Fixed border cases with parameters with duplicated names (for ex 'book' and 'book[]') +* Fixed cases when Parameters contains forbidden characters + +# 2.1.0-prerelease.4 + +* Fixed Issue ([#208](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/208)) +* Fixed cases with dashes in request named +* Fixed models from responses names generation + +# 2.1.0-prerelease.3 + +* **BREAKING**: includeIfNull now just bool? value. Needs update of build.yaml if this feature used + +# 2.1.0-prerelease.2 + +* Fixed Issue ([#201](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/201)) + +* Fixed Issue ([#202](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/202)) + +* Added support .json files instead .swagger (.swagger are supported too) + +* Fixed errors when models has symbols, dots, numbers... + + +# 2.1.0-prerelease.1 + +* Fully refactored requests generator + +# 2.0.8+1 + +* Fixed Issue ([#187](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/187)) It's about request parameters named "client" + +* Fixed Issue ([#188](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/188)) It's about isses with enum names generation. + +# 2.0.8 + +* Fix case when enum in model has name with underscores. +* Updated logo design + +# 2.0.7+1 + +* Fixed Issue ([#190](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/190)) +* Fixed case when request does not have type specified. Made it Object. + +# 2.0.7 + +* Fixed models generator in cases of List of Lists of Lists of... of some type +* Formatted code + +# 2.0.6+1 + +* Fixed Issue ([#72](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/72)) + +# 2.0.6 + +* Fixed Issue ([#163](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/163)) +* Updated logo design + +# 2.0.5+2 + +* Fixed issue with list of enums in request parameter + +# 2.0.5 + +* Added new generator_options + +# 2.0.4 + +* Added equals override method to all Models + +# 2.0.3 + +* Removed meta dependency + +# 2.0.2 + +* Fixed meta version to 1.3.0 + +# 2.0.1 + +* Updated dependencies +* Added possibility to made postfix for models + +# 2.0.0-nullsafety.9 + +* Removed ..RemoveWhere spike on generated models + +# 2.0.0-nullsafety.8 + +* Fixed Issues #167 and #168 + +# 2.0.0-nullsafety.7+2 + +* Fixed critical error + +# 2.0.0-nullsafety.7+1 + +* Made header default values not sensative + +# 2.0.0-nullsafety.7 + +* Added build option to set default values for headers + +# 2.0.0-nullsafety.6 + +* Made ALL models parameter not required + +# 2.0.0-nullsafety.5 + +* Fixed generation of Lists of Strings for models + +# 2.0.0-nullsafety.4 + +* Fixed issues with null-safety + +# 2.0.0-nullsafety.3+3 + +* Fixed analyser issues + +# 2.0.0-nullsafety.3+2 + +* Updated documentation + +# 2.0.0-nullsafety.3+1 + +* Updated dependencies + +# 2.0.0-nullsafety.3 + +* Implemented generation of models from responses injected + +# 2.0.0-nullsafety.2+1 + +* Improve documentation + +# 2.0.0-nullsafety.2 + +* Made generated enums not nullable + +# 2.0.0-nullsafety.1 + +* Removed nullable from fields with default values + +# 2.0.0-nullsafety.0 + +* Added support for null safety + +# 1.7.1 + +* Generate models for 201 HTTP Responses too + +# 1.7.0 + +* Added support of requestBody field for POST requests + +# 1.6.8 + +* Fixed issue with usage of KEY instead of NAME on defined parametets + +# 1.6.7 + +* Fixed issue with basic types in array elements + +# 1.6.6+2 + +* Added null-check for _formatDate method + +# 1.6.6+1 + +* Removed dependency to intl +* Removed support of template of date +* Setted Date parsing to yyyy-MM-dd + +# 1.6.6 + +* Added generation of custom Date to json mapping. +* Added build parameter with Date format date_formatter (String) + +# 1.6.5+2 + +* Hotfix for body generation + +# 1.6.5+1 + +* Hotfix of using meta + +# 1.6.5 + +* Fix issue with requestBody parameter. It was not used, currently it adds 'body' parameter to requests + +# 1.6.4 + +* Added support of default value per item for bool properties. For ex. "name": bool, "defalut": true => defaultValue: true + +# 1.6.3 + +* Fixed issue with allOf exception + +# 1.6.2 + +* Fixed issue with datetime in refs + +# 1.6.1 + +* Fixed issue with enums in definitions and Date time + +# 1.6.0 + +* Added new build option use_inheritance to enable/disable inheritance support for v3 +* Fixed issue with basic types (String, int...) used as definitions + +# 1.5.1 + +* Added 'export file_name.swagger.enums.dart' to main generated file + +# 1.5.0 + +* Fixed issue with pre-defined parameters on V3 version + +# 1.4.9 + +* Fixed issue with Lists of enums in definitions +* Fixed issue with defined parameters on v2 + +# 1.4.8 + +* Introduced new flag to manage @required attribute of Headers + +# 1.4.7 + +* Fixed Issue ([#102](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/102)) + +# 1.4.6 + +* Added generation of copyWith method for models + +# 1.4.5 + +* Fixed Issue ([#99](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/99)) +* **BREAKING**: Fixed enums naming. Enums with _ are replaced by PascalCase. For example, Response_type replaced by ResponseType. + +# 1.4.4 + +* Fixed issue with build_only_models flag +* **BREAKING**: fix misspelling with `overridden` word. If you use it, please add additional `d`. + +# 1.4.3 + +* Fixed error with ref in allOf and bool values in enums + +# 1.4.2 + +* Fixed issue with adding responses to JsonSerializableConverter mapping + +# 1.4.1 + +* Fixed issue with enum names in requests +* Fixed reusable Components - Parameters map + +# 1.4.0 + +* Added support of int in request fields and models fields (Previously was only integer) + +# 1.3.9 + +* Added ignoring of request parameters with empty IN parameter + +# 1.3.8 + +* Added includeIfEmpty option to build options +* Added support of requestBody parameter (And enums as requestBody parameter) +* Fixed some minor bugs + +# 1.3.7 + +* Fixed case when empty Enums generated from models + +# 1.3.6 + +* Removed generation of empty Enums files + +# 1.3.5 + +* Fixed commas in request parameters +* Removed defaultValue property for generated Lists of Enums +* Added new flag use_path_for_request_names. Read README to learn more about it +* Fixed extends+ClassName structure for Swagger v3 + +# 1.3.4 + +* Fixed not valid strings in FromJson method + +# 1.3.3 + +* Added new property to build config named enums_case_sensitive + +# 1.3.2 + +* Fixed issue when parsing List of Enums + +# 1.3.0 + +# 1.3.1 + +* Code refactoring +* Removed swaggerGeneratedUnknown for Enums + +# 1.3.0 + +* Fixed Issue ([#68](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/68)) + +# 1.2.2 + +* Fixed enums names + +# 1.2.1 + +* Added sorting of imports and exports in alphabetical order + +# 1.2.0 + +* Enums become being generated in separate file +* Fixed Issue ([#58](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/58)) +* Fixed some bugs + +## 1.1.0 + +* Fixed issues with Enums usage +* Fixed issues with enum naming name +* Fixed some bugs + +## 1.0.10 + +* Fixed issue with enums in request bodies + +## 1.0.9 + +* Implemented possibility to have enums in request body + +## 1.0.8 + +* Fixed not standard request parameter Type names +* Added output message in case of formatting error + +## 1.0.7 + +* Fixed a lot of issues with Enums in request parameters +* Changed naming approach for Enums in request parameters +* Fixed issue with key words in Enum/Model names + +## 1.0.6 + +* Added support of unknownEnumValue: MyClass.swaggerGeneratedUnknown + +## 1.0.5 + +* Added usage of auto formatting code + +## 1.0.4 + +* Fixed build error on Example +* Removed empty lines in pubspec.yaml +* Added defined type to generated converters + +## 1.0.3 + +* Remove unnecessary braces +* Fixed client_index.dart file + +## 1.0.2 + +* Implemented inheritance support. Models can extend others. +* Fixed bug with build_only_models flag +* Added missing tests for models_generator + +## 1.0.1 + +* Fixed bug with request parameter and result type, when schema.ref used +* Added real example of usage with Pet Store + +## 1.0.0+2 + +* Fix score on pub.dev + +## 1.0.0+1 + +* Add more info to readme +* Fix warnings +* Add code coverage(codecov) + +## 1.0.0 + +* First release diff --git a/api_automatic/LICENSE b/api_automatic/LICENSE new file mode 100644 index 0000000..c9a6960 --- /dev/null +++ b/api_automatic/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 EPAM Systems, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/api_automatic/README.md b/api_automatic/README.md new file mode 100644 index 0000000..fab19b5 --- /dev/null +++ b/api_automatic/README.md @@ -0,0 +1,153 @@ +

+Swagger dart code generator +

+ +Code partially generated with [chopper](https://pub.dev/packages/chopper) + +# :mega: **Build dart types from Swagger/OpenAPI schemas** + +[![pub package](https://img.shields.io/pub/v/swagger_dart_code_generator.svg)](https://pub.dartlang.org/packages/swagger_dart_code_generator) +![GitHub issues](https://img.shields.io/github/issues-raw/epam-cross-platform-lab/swagger-dart-code-generator?style=flat-square) +![GitHub last commit](https://img.shields.io/github/last-commit/epam-cross-platform-lab/swagger-dart-code-generator?style=flat-square) +build +Discord +[![codecov](https://codecov.io/gh/epam-cross-platform-lab/swagger-dart-code-generator/branch/master/graph/badge.svg)](https://codecov.io/gh/epam-cross-platform-lab/swagger-dart-code-generator) +Discord + +SwaggerDartCodeGenerator is a code generator that looks for `*.swagger` files and builds `.swagger.dart` files, based on the schema. Code generation based on Chopper and JsonAnnotation models and can be configured for your needs. + +--- + +## **Overview** +In general case for each .swagger file three outputs will be created.
+.dart generated by Swagger dart code generator, contains all models, requests, converters, etc.
+[Since v1.2.0] .enums.dart generated by Swagger dart code generator, contains all enums and enums mappings.
+.chopper.dart - generated by chopper.
+.g.dart - generated by json_serializable.
+ +Bloc + +## **Installation** +The generated code uses the following packages in run-time: +```yaml +dependencies: + chopper: ^4.0.1 + json_annotation: ^4.1.0 +``` + +Add the following to your `pubspec.yaml` file to be able to do code generation: +```yaml +dev_dependencies: + build_runner: ^2.1.4 + chopper_generator: ^4.0.2 + json_serializable: ^5.0.0 + swagger_dart_code_generator: any +``` + +Then run: +```shell +pub packages get +``` +or +```shell +flutter packages get +``` + +Now SwaggerGenerator will generate the API files for you by running: +```shell +pub run build_runner build +``` +or +```shell +flutter pub run build_runner build +``` + +## **Configuration** +Swagger generator offers some configuration options to generate code. All options should be included on `build.yaml` file on the root of the project: + +```yaml +targets: + $default: + builders: + swagger_dart_code_generator: + options: + # custom configuration options! +``` + +| Option |Default value | Is required | Description | +| - | - | - | - | +| `use_inheritance` | `true` | `false` | Enables and disables extends keyword. | +| `with_base_url` | `true` | `false` | If this option is false, generator will ignore base url in swagger file. | +| `use_required_attribute_for_headers` | `true` | `false` | If this option is false, generator will not add @required attribute to headers. | +| `with_converter` | `true` | `false` | If option is true, combination of all mappings will be generated. | +| `ignore_headers` | `false` | `false` | If option is true, headers will not be generated. | +| `enums_case_sensitive` | `true` | `false` | If value is false, 'enumValue' will be defined like Enum.enumValue even it's json key equals 'ENUMVALUE' | +| `include_paths` | `[]` | `false` | List of Regex If not empty - includes only paths matching reges | +| `exclude_paths` | `[]` | `false` | List of Regex If not empty -exclude paths matching reges | +| `use_default_null_for_lists` | `false` | `false` | If option is true, default value for lists will be null, otherwise - [] | +| `build_only_models` | `false` | `false` | If option is true, chopper classes will not be generated. | +| `separate_models` | `false` | `false` | If option true, generates models into separate file. | +| `include_if_null` | `null` | `false` | Sets includeIfNull JsonAnnotation feature and sets value for it. If null - not set anything. | +| `default_values_map` | `[]` | `false` | Contains map of types and theirs default values. See [DefaultValueMap](#default-value-map-for-model-generation). | +| `response_override_value_map` | `[]` | `false` | Contains map of responses and theirs overridden values. See [ResponseOverrideValueMap](#response-override-value-map-for-requests-generation). | +| `input_folder` | `-` | `true` | Path to folder with .swagger files (for ex. swagger_examples, or lib/swaggers). | +| `output_folder` | `-` | `true` | Path to output folder (for ex. lib/generated). | + +It's important to remember that, by default, [build](https://github.com/dart-lang/build) will follow [Dart's package layout conventions](https://dart.dev/tools/pub/package-layout), meaning that only some folders will be considered to parse the input files. So, if you want to reference files from a folder other than `lib/`, make sure you've included it on `sources`: + +```yaml +targets: + $default: + sources: + - lib/** + - swagger_examples/** + - swaggers/** +``` + +### **Default Value Map for model generation** + +If you want to add defaultValue: attribute to fields with concrete type you can use default value map. Please see next example: + +```yaml +targets: + $default: + builders: + swagger_dart_code_generator: + options: + input_folder: 'lib/swaggers' + output_folder: 'lib/generated_code/' + default_values_map: + - type_name: int + default_value: '36' + - type_name: String + default_value: 'default' + - type_name: 'List' + default_value: '[]' + exclude_paths: + - '\/cars\/get' + include_paths: + - '\/popular\/cars' +``` + +### **Response Override Value Map for requests generation** + +If you want to override response for concrete request, you can use response_override_value_map. For example: + +```yaml +targets: + $default: + builders: + swagger_dart_code_generator: + options: + input_folder: 'lib/swaggers' + output_folder: 'lib/generated_code/' + response_override_value_map: + - url: '/store/inventory' + method: get + overridden_value: 'List' + - url: '/news/latest' + method: put + overridden_value: 'MyPerfectType' +``` + +Check the [examples](https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/tree/master/example) to see how to use it in details. diff --git a/api_automatic/analysis_options.yaml b/api_automatic/analysis_options.yaml new file mode 100644 index 0000000..b429b96 --- /dev/null +++ b/api_automatic/analysis_options.yaml @@ -0,0 +1,15 @@ +# https://www.dartlang.org/guides/language/analysis-options + +include: package:pedantic/analysis_options.yaml + +analyzer: + strong-mode: + implicit-casts: false + exclude: + - example/**/*.dart + - lib/**/*.g2.dart +linter: + rules: + - type_annotate_public_apis + - void_checks + - unnecessary_new \ No newline at end of file diff --git a/api_automatic/assets/lib_full_logo.png b/api_automatic/assets/lib_full_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e34b7b7daee33ad2a5607160250639b5e6b7422e GIT binary patch literal 10946 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 literal 0 HcmV?d00001 diff --git a/api_automatic/assets/lib_logo.png b/api_automatic/assets/lib_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..162b25a1a7f7663310b87c8b04655604ced9e804 GIT binary patch literal 12221 zcmb_?cUV)|7H<%haS(8ZQR&Q#j*N=Ziy)xaf>=N)0Sr|-NE1Uz2%w102!T;XK&4nl zkt7h1UP2HgsGz8L2puH?V`u_~PI&7i@qY7t@1J|`dw(e3$=Q4Lz1BMWw|+lqX)g7x z!nYUH8fxaPp*Y z@cG~{-{6oREe;&`G2~pZx8GSW3?{NGKe^~=!^t1^wI<#hIJt9mXh>x0ufLXY-B^F^ zI<$d?{Pev2ue(S6zISm!VlLgsNo=Kg z_+0lt-8TdvK}K(R(R&u3uD8LwURV4ss8kv=ur+z^$?(oq@1xoZjHURj=!_jw$K%F= z{!I9B$G(++cWOOdy z-;p@7q*E~5+|!q`AX$h~~*-I_JC z9F01b)$-q`t<~$FINgeCv2w*|w)(u^=?%jqm#JW|eK7&RA?*Q+l#|B{F8PajTK~ z>?S6WNoVg-x~FFTYW`$-Ot6Y6bGWmxq~r$-rf~GfEgIzKS}=QhWNjQB7>3tXXD24 z#@)8Kz0j|jJ8&68vpA+f80Ggj>DyX8D!>umc$oQWgRk6Pto#vs9#6n~fQHghD(jLN!PIYAZ#>UkMeNqK|F$%~V)9Kdy_4D;wU= z`hD^f;!G9?TOCKf+tu&4w3>qkpH1nCC8t;+LZSb~5rGK3`Jp+Jl2oFi1Vmj1bE-9gR2 zLLp${@~Td7fDNTdQ3AxvphzL>iZx@fARWjf8=k`2(FiQ%g)d(s?X0}Xwy<0+bZw!z zUhSpXi#>kpL7r`+mWUr2|80Z5*dxc6EC^-ru2P%BV{G%8=Isc70_C zN}_hn?s3SSo9Ak75d)4k_|~)uUDI~a%YvAKBFo8lUs=2X(PHp84jNZB_+jolpz}Gv|j$Go)p_N!A4)cP}wWVv7s8v3%Mk)vRFQL zDcaJg1a^yHL~7`<#%)`~z~wghvz+j&z*8gIaKS_F9qv;{xs|gXj8*7Hi`ndiNqM9QoFS0uf^AxGkSa@HWHVIs4bST?Dcds&LvttJhy-dU8g3FzRNWyoy-if9Zbi@j z^za8XoGIOk611xixXN%0>`Fa89ZJ#L2x4SbHb8=*sdy_D`kOjtxjH*I2SKj6Fkf6$ zbT}02kzb$1Dm1EfcJ49MN`dWmV@l;9@F~}Ld_B3kj1e* zY{k|CIj+wB0`8@Ejocwmy#O!2E%2L<`n!BM%6H$^2B&Isi1W>;@%@e=)jsY^SN*H6 zLFyP{4?&WRA&l!@zAs4&X--#yMmU3geTs=#& z>RF}2d*SxMzQCmSFeKWHiJY6NaO$lVxoxFtCZa(ynvXnQ}*6kcxDE*-i6m!u7}U35>t|o7 zy;Fq!ATUhkl}Trcjd$qMkFpmw7TYp%2Z!&{wZ8|GMPHfx2|dJ=n78x@hf_I$pr{5~ z{M`ARxeHKW^-z~BEP~X-_OX7b`AcP=%|0@9{~kov%}y{4o*8yVE#p9x)?VfCT`V#+ z{kmUNhFwwTScwX)G8wo1RX~q*QLCUT{4hrCGnM2t`sZFllX6~F$>i&%1cXf%hx30N zxv|SkX4ycLp}V+xkO7W?5g?h$&SbNU8k?yTqB_v3XPKlys}*JF+HT;lD$3AAs)26% zc9)#tyJ)4kM2g(R(#Wd~6z1~X;KntGnuuRA_XgR7!+bXV8Z9;VX6z1 z$G`29BqUi$1*=2if+r$s@(Um?`s5$XOJj}wKu2{!i-c(xB*2P=hr+_NaJsqmKy1B` ziF0q{^7s-fAQJoo)=Dk0Wdv+u(IJTlcXm#d2Bs@YpyE-2?KN&DOkNRHmvL?>_|-TFw=Ifrx`OM>29VHb+kyt#w{>N(__WDqLvGvqAPF%2b1)N?%O-o%ke-gZmXM zPEqZJE1h3qRNLjIi$+wHGf#suYcO+t8SNp( zQ6vxNmg~3cqNOr5!j~6@P!$)OS0>c&pqp&V=`lq`S0_7J{wzk)8noHy$({U#*=kVx zWwy1LxgM-FSIeQUq%C`asC8y%V&!4c=Pezss5O?pVfVYn1oI@3i$$1_Fr~Ar>x`zJ zcB;lYFv_Y52_B_Qz7E0qP77(cFLY+fpl7VC13PnT!%^aEJ^V1kUh(NJ?rZKawUNc2 zQngFb+XO6ntdl$Jnz{vc*pBW zW7f*cy@mw~FS(MPs6-9B{(eOqxirShppJY~wAVb_Vc7!j#hc>#P!0&xqq;Z9%ul3r z*;w_uq;xozcllUOH}JK=T-e?x$IOiGOcYgT$Jhl{KGb(~%+^_X$Dh(-L9cW{oR=Cg z;fx=!uHY8ISs*2N6|%1?EzoC`hj_JmLovw8n+{igA~*IKUmMl&8K1pq`GwH0z&DQk7jGCbprqTG z-4y6IGM(%Hscz*5A|p7z+sP!CK*As5Ng(%8nhgs@lbaSs2#jDxg$+-G%A}YIH_9FV22Gc_*96{HJaYhV1)_yT6!7hM*G4tOL4w2lLmlSHZdmIVsvzO_1v|>`mx237Q ze}ym$Oiz>UEtGPDSZHCXF0%`!j!MujH_RgU!;`6;nm&V#GBkb|?*>;Hk)&=(TH`RG zufEG~UHb=((ao`ct03~lGGBtwKSCnkK-lJRT7kA3!Sp^jYDlXr<{l0&hwVD5lZtAV{v;0AA z8pEyj1bilIn#Giw8gx|!Rw-87D_Q64rGZHx^6fqsu#8wcsbhzKzP^8JL)XFrjg+^KuOD5AG>MRj=Sr&X8fG-@z#hdxQk0 z3^m6x-_Bj^e}K@j=8BR~`p4!*xar=i+}7ZwfHU}rFr_M6nc9ch<2+LeA%xeB*egcd z&NP&eDT&fQ(h6&WOY|qj^FES zy}h^^J~IQJ+EZ6-dvil)r=pNov7bYk-5Ei5a70E*>_;pjNipz=l?U?;soPEX)eJ>= z^31Rk25GndE@LB{f&$gY+9I*i;Y?jAUAWEVAk4tM(yJlP@hu~yo)DS5 znB35+rFL!!90fR@Y*3!O7;Ri+#9TOx-w#;^Xa%@Ta9De4jP!(@KcGiqZ2$K`8-&jT z?Tf4%p;n!y1%JdVviNZ2b75V@7@ni`J$*KmVTYM6l5zctAstb(>>ta}MyS1uE z#)(|XEA2i8?4XDyG4$6FQq!2ilcmZNy!jKQ_Uht2)=SkUaZ%@a2R#tv#us*d`$2} zj|ylyr2nTzKN|ammSo0|6&KIyqe6S8hT?wd1*xm0q==F z%$xCl9^z2i|0bo^4%!0=XPYYv57vg*%oB8#GTi!3Ww~bcw+BX0E%PnuDsF}}Loi{_ zSLjKIckNyp-n3c8!K7+|j+9GX-Z;!NMKhOfhS}SJdL|{AlI_U2*A=Kqd$bJE z-#bFW82pKs%t&$QvtbkvoN?v5Y+D0q9!kN6v5ZF%7Ft)QW~z!MEKrLu-1tt3k}I`U5zzFsQmE@MZ~P#XVsBdd zX{X5GL`mk!-Umg=ldPkiA=3~s?^TOZ*9T~1(DQfa?e-fftF~Q?y-sJ zv`JSzozvxHZ)`61uz4b`uq=N5#iq?M%*F(BTbY8G@`YPZLQ;VaR9_>>A*+&#&s6eo zp;f_dO1Q#$gZVZ=?it{jx}B!s>J}0QM=0gk;J}eGoV}TA7S`k!gOBGtoZ)b^22nI3 z88Xlfb;%4VBb7*HU~l+rT24bP^FzperN_21HQ_Zqv!7n_9-Q!!6?bR?a_2A3Q^D%k zL`j)PDmKezNW}Wfie7EjCQnC5aJbujG-E3o6ILEn1(cQ&?6Mn%SRHVLZOYlFh%Mp{ z5kR5DBg%?*i>n8`s<~0*<-sOJX#=#is;w^CZA_~j^jPDdnz>bcF@C-pIE5xkHrdbS zyEu`ayH)HDif}e@Z<^zTt87JE4Ac1eVpubQFetJVv(~VVo(&OQIJL9%CKnUSo9GH@ zkEp!HgjujrD`kr!eUXu8ZMNha(W^6aL$xvt@;OZ_ttn1Xp@nU$k?+#g9tdocxOXo% znEAmGFrQGdXOX;ZoJY>Cbx>RiTGR8V8~-pkls!=2K)GVO@?fFr$>#%Re&c%3O##TB3J!I-VcDWnxke-+j-8u1j*i5ZkFOIb{- zyteYLe~7!8Dr29HWm@+>cYD8$e`Jq^_ggcJ<@MkwTzPNpq|(eM#6#-R#A5psPTt5w zkZz*lnPxrwg!9U0W-pFWV3Zr$G=Fuu?MkZWLG9l>rJXeUBQ`bXVrO+XP>NzgJBNyr zpODEPN2(tiG2y&yzXk>B;8a)QpcEOWWl7C;R(AhYw%pb^#upChSjqNC*)8)6{Krt6 z-v$k&PX85z(*tdHVdC zD*!pQbR`X*fD@_X9c%jZ4LP^uU7EPLU>N+=NzjVffVc79a+;az~4m(B_0S`XE zJ2+gZ>R~w2lQq-6u6rclN>Y{=d^xOjy?qcml6W`1CC?mDEyZ^)pN^4URJmN7tX!Hq zUX@!*@Fl%~j1kKfpF8zr=@X>4`$lDiqxhiG2DkP+Da0h4-A1Qeak9BhQ(pD6{Co4p zsaiNw_Zky)sMWebO_2c{Ezfq2+IvPg^1D5`I!)%g<~r?>O_-JQniI6$1-pYFuj*qV zYRcqZ5f-;PQ5IcrP2-f-vjrMTT%Kv2g?63PH$(LDiqDW`_WnhP5l;?MI^k>)9-nT5wut|nh@K~2NY_Vxu{`u%Z`SV-HM`6@0M zQS7c7D}&qm5jiXEO#HxS67N|SzNcW4&~M;Gm4Z${QMRR@%CA|NE(HN_rFKRZ%p zj1`ocu8?+3`s|acAvJ~fb!(@~AzB-tj@poM&Ny)$UH(&=J8t|j9j zPQzhn`3`+J#$7_g=$_GG-FB^PU&DYn_M+R%kn8IU!{g_Pu-`FJ(hS>6U64VBrM#s+ z6I8*R(nmC7i=cWrDBGLdU1;;a{iJ1&fa&|Vr&HF6lB&L;A94%|Qi+zls=ZfC`jfxj zq+F?7D?W6=>(@A*VoNn8-CiRYOkKL9G;@EwkMtO{V9>56-sbAu4oDx-e4jS3Ro)HS zw|ofbfJDiZpq|R5Ze-(Ho!p!jXw?9%6O$QgKJ7FYftXNasnb-dl=mwr)PNM0A5oux z25W5B?o7CwFl7*k4_HIb(R+y=m!{E~=V*+H%e5GvcB;73m>^57wqGfzYH=HS2DdAP zSsY$%HS`TYN5UwB4$6SzBTsUU#ejjE-G-jR>OE_% zpnEDoyQkSaz6Wnjd}Tt^rPbJXmmmD%dgd~2RO0j7a=BF_L+N20+xaBc_US;f=ecBO zNH^(87kKp++L)d0d4yQFV{@hqV}qZCbwHC5M+vusnnWy@@jq<#F0Tfg^;6nOWMzbmhdTLN*TL4zCDLin7**o{4UMa{w? z3F4`d)0f9_%ig?S(CZJ(`kZ_|2~X!*Ak?JQ4i*xMVwiw;54mcTHlJAZvitbk%iKw_ zaasr=5TZpN43MhEC$_YMN zKp0ROF~Rle)aD3)-Mp$m-ZY?OYIcfAf_wWnKOq)y#qEQ=ExO0QuV`Simsyo6T;9d> zi9U^w6<*_e3CR9o;(=Ou)`Svz=B(hC<6XUqu64%wgg6n86FeH=59@@&$nr_kf5AXQ zyFg!M*s}EYgBF&47J!*OB%jjqq~_tOH16{D756md%+#$ z_Cl-XqWwL*TYBuXo;ng=tXcb46~!O6JcLi~i~}=C?s(FDBf3%ULP;pNW+>gn!@-$I zVZW@OJAvR2ql;W+ZYNAiQnsML+XFKGswBiX3Q5K&_d*=x6ADqJ5bOL7&{Y7K0mG!@ z3}%w7^0U)`79elk-tJ3W|MY9%(4jUK_Y?W{_A+d__V*5^;_T>#C7Hq-vTD9Xfi=v+pMstL}Z-LA?uIZ!vf zOxH5W%8!P{P&piMm7!4Hx6ahfEdz6RSz^?o2}K!F=51s0{;lF+pFaBsaH9Us^=XyE zHrI0VA=cS~37oo~BA@jVuZ9&MQt4Io0y8ybYbnXu+ouB|l8{>j827?-t)rZ)^_V7# zaYt9$LBJ)!&;E<2J#GwSa*GAvyatRm_+`qOQ71o36dHxw(*d)=!E6aAGrso`9RBSH zi~vx%9w2hXLbAY5&DW4=pU@>uPMjSt%khUC=Vh`0m2BplaM~!TXf*n{a{T@-Rs%K1F$bVDZ*oyE&*ENC-vPQfOrW0LE10(# z+L0s^5Y;;O5f#1qo>6%yy+|;^67~a2!cGm03aG04jzUVfeIg7P)d1vpZT<9cI>k(L ztpi>)U{v1KX<3jOhi>2a*1@DdZ}+Xn$tF=!t>wOisAuc9?}SfxOzM|TINYf-6+ocTr}HLFd{Lb+vkB^M7dE+(PPbAxGc(wE{wCA znnVz)SL_=A$Pbma2{SOM6!fb^Hj9#X0SqPJuSR@?Nfv;`+*Kh=j!^sA%VePhha?L%&qEMgWM1e$`Dao1VQ-)I@|p62tIJ^>_7l8#qo}Gm>3xz1iL^& zaA)gUCW6&|7LDU9o&?7~_`322z``~tER60$`nWuJGWfa^zWU@`JJ5+NpkvWbb@cKfGcUnd5oHET4}c*O#$mu1VIXM&=IZwIb_t6YkHH;)!e}m%&YG7D(-B5r^*Dnc zA5Edl2~prIL1^@4iKdE3A)8p~Xb_8Q9MnGE@c;#^A-qA( zjKaXL0S%BveHx|wWqqU;u!Gykb&K`tNv+gcerSR;RW?iuyz8S%cx#>6bktH<-F6BzAl&t zs}?OCriS^%It6{@sSyleY#nMXRIQuAB*E9V*>1Z&9yTCcgi z8duvk_Y!`GfJ52QQlPAAxOAO+42FVxypPMz-=?L;_RC@10=o-KK1%X1m=KbLyx9NC zKreKAps0`nnEbyO1^(ww=2Ip0y1=qiZFwK zB8cLHoIN^t-sk=P{`mcSKIic0N9XaLeeb>ETGv{8?H!||r9w(fPYgj2DO^=i4}#7T zLJ)xl;TiCM5*qq#!5>84s-}JrL_&f4eFDnNriGvrVlD~_IyyJK5MF*ay}X&>3JT2L zzFtl)?v4-?I9Humul7QRQg$@1@SP4Xfsc1!3O9EP)}{}|uS8Zg$ucm7Do}GFx3ZeN z9a&_4mL}lovjJUioqtXq$@*a5lCj*oN0^IQc(LmHyllq5)HcT1S8dm*z`<|Vur~c$(Pc>32%121}RoLk({)qAuu5bxG=PrHz%5+C~ zM;1Y{6qBO_y@T(K^Au^E6-7k?50B11v+JJml<=)~H4WMLN4REfXkjUdEW#w1&rI&R z!P+t`K4*FDU0)#Gc`w^wy{1LpC$kYz8->+I1)Zn&-wQtL(>`1`)3yU*Wwuw<(}bX4 z4hV|42SGoMz@O_7q(=yypfZ6Vi3|v$@tQWf{17^!Xb4x7GYFjfbQlzxJsYh_rCVeOhP>vZ@y{PULE_mlS+49m|#^ z-H<+mtln}Eig{1u;KA=-x$jgNAey!4z6Ax46X?SztE!9}%*X^2dLN^6!w5o&5WWG%|wh z?}wYr1d)F~$evUVQ&g5eLM-={4#W7-ICmW@mkeDbV&jU@kEX(FW3pRPoF)}L>7s=ka&e&1nzEGo` zgnCMya{F1r6H9dKJ?8H>cuq$IlM~2klM(C^$xU5!-$QqT*%urwEhX(Ny$U0-BbcI zXq^H&h}{21gv>qoa{1^>`zA$SUti!mo3XmPe_+d?_xtznqP64G)5e(LB|3uV<_0tn z_|A`m$ol%LU``Tvw2P>C^ytx(kN#pFbEq8209eX^f$zA299d`@@hM0)?}~Na6)`bo zAWOWIAOj^zrRmN@M^o(fwsClPc=5HPF=oQ^dLW#xQ-BqLiL6sZ5FZcEF+Dw9I-GTl zH%-k@$Xy!94a(OBa(kvGZ?l4j%V)^1Vb(8Ryr5@dO81ygJ9l`Kj6hIV?q36*{-bUP z8Y-!*RKIuco=~5Gkh?J%!Ot=#2nh4*9+ADhJ+KSW<2O6L56W$EpDkpRyk*dyFr!LF zaN)nkto%D>O>M1qSXfxv`FRS0=W-QiAtf|=2YikkfOe5?Bz!+B4!cIDqpS%%| zk1G?Yxw%ZFq@)8r*=qL_2;@GKPo4sg*>=m=y1T~%XF7)uEM+|1+ingHisr4JY1=>3 z&Mo%dDuRHKTa;_tbm+ci#7{1tb8mOIthTlmZ5sj%SalBqat3}t%fL{i4JqP7k!z~Q zJdpBKBBNyLfCG%KJvR+Rwm*Y$u*e=i^$0vgORIy^uEIWnoOcBA$^Wp0i2KUN4_aAU z=K;$xz?dp90Oz`oJ@K#Sl#ZXv-Tpb(06E&Bn$y*X))d^jL#KAsW2@!GF#3I074G zcX!L|?d=샑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 literal 0 HcmV?d00001 diff --git a/api_automatic/build.yaml b/api_automatic/build.yaml new file mode 100644 index 0000000..feca356 --- /dev/null +++ b/api_automatic/build.yaml @@ -0,0 +1,14 @@ +targets: + swagger_dart_code_generator:swagger_dart_code_generator: + builders: + swagger_dart_code_generator: + enabled: True +builders: + swagger_dart_code_generator: + import: "package:swagger_dart_code_generator/swagger_dart_code_generator.dart" + builder_factories: ["swaggerCodeBuilder"] + build_extensions: + "$lib$": [".swagger.dart", ".models.dart", ".converter.dart"] + build_to: source + auto_apply: dependents + runs_before: [ "json_serializable"] diff --git a/api_automatic/lib/src/code_generators/constants.dart b/api_automatic/lib/src/code_generators/constants.dart new file mode 100644 index 0000000..367ac77 --- /dev/null +++ b/api_automatic/lib/src/code_generators/constants.dart @@ -0,0 +1,67 @@ +const List successResponseCodes = [ + '200', + '201', +]; + +const List kKeyClasses = ['Response', 'Request']; +const kBasicTypes = [ + 'string', + 'int', + 'integer', + 'double', + 'float', + 'bool', + 'boolean', + 'num', +]; + +const kChopperService = 'ChopperService'; +const kRetrofitApi = 'RestApi'; +const kResponse = 'Response'; +const kFutureResponse = 'Future'; +const kString = 'string'; +const kUndefinedParameter = 'undefinedParameter'; + +const kResponses = '/responses/'; + +//Request types +const kPath = 'path'; +const kOptionalBody = 'optionalBody'; +const kFormData = 'formData'; + +const kDefaultBodyParameter = 'Object'; +const kField = 'Field'; +const kRequestTypeOptions = 'options'; + +const successDescriptions = ['Success', 'OK', 'default response']; + +const kBasicTypesMap = { + 'integer': 'int', + 'int': 'int', + 'int32': 'int', + 'int64': 'int', + 'boolean': 'bool', + 'bool': 'bool', + 'string': 'String', + 'file': 'List', + 'number': 'num', + 'object': 'Object', +}; + +const kObject = 'object'; +const kBinary = 'binary'; +const kHeader = 'header'; +const kCookie = 'cookie'; +const kArray = 'array'; +const kEnum = 'enum'; +const kBody = 'body'; + +const kDynamic = 'dynamic'; + +const supportedRequestTypes = ['get', 'post', 'put', 'delete', 'head', 'patch']; + +const kServiceHeader = ''' +// ************************************************************************** +// The file is generated automatically. Do not edit files +// ************************************************************************** + '''; diff --git a/api_automatic/lib/src/code_generators/swagger_additions_generator.dart b/api_automatic/lib/src/code_generators/swagger_additions_generator.dart new file mode 100644 index 0000000..3693f45 --- /dev/null +++ b/api_automatic/lib/src/code_generators/swagger_additions_generator.dart @@ -0,0 +1,225 @@ +import 'package:swagger_dart_code_generator/src/definitions.dart'; +import 'package:recase/recase.dart'; +import 'package:swagger_dart_code_generator/src/extensions/file_name_extensions.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; + +///Generates index file content, converter and additional methods +class SwaggerAdditionsGenerator { + static const mappingVariableName = 'generatedMapping'; + + ///Generates index.dart for all generated services + String generateIndexes(Map> buildExtensions) { + final importsList = buildExtensions.keys.map((String key) { + final fileName = key.split('/').last.replaceAll('-', '_').replaceAll('.json', '.swagger'); + final className = getClassNameFromFileName(key.split('/').last); + + return 'export \'$fileName.dart\' show $className;'; + }).toList(); + + importsList.sort(); + + return importsList.join('\n'); + } + + ///Generated Map of all models generated by generator + String generateConverterMappings( + Map> buildExtensions, bool hasModels, GeneratorOptions options) { + if (!hasModels) { + return ''; + } + + final maps = StringBuffer(); + final imports = []; + buildExtensions.keys.forEach((String key) { + final className = "${getClassNameFromFileName(key.split('/').last)}$converterClassEnding"; + + final fileName = getFileNameBase(className); + maps.writeln(' ...$className,'); + imports.add("import '$fileName.swagger.dart';"); + }); + + imports.sort(); + + final mapping = + ''' +${imports.join('\n')} + +final Map)> $mappingVariableName = { +$maps}; +'''; + + return mapping; + } + + ///Generated imports for concrete service + String generateImportsContent( + String swaggerFileName, + bool hasModels, + bool buildOnlyModels, + bool hasEnums, + bool separateModels, + List customModelPath, + ) { + final result = StringBuffer(); + + final chopperPartImport = buildOnlyModels ? '' : "part '$swaggerFileName.g.dart';"; + + final chopperImports = + buildOnlyModels ? '' : '''import 'package:dio/dio.dart'; +import 'package:retrofit/retrofit.dart';'''; + + final enumsImport = hasEnums ? "import '${swaggerFileName}_enums.dart';" : ''; + + final enumsExport = hasEnums ? "export '${swaggerFileName}_enums.dart';" : ''; + + if (hasModels && !separateModels) { + result.writeln( + """ +import 'package:json_annotation/json_annotation.dart'; +import 'package:collection/collection.dart'; +"""); + } + + if (customModelPath.isNotEmpty) { + for (var item in customModelPath) { + result.write("import '$item';"); + } + } + + if (hasModels && separateModels) { + result.write("import '${swaggerFileName}_models.dart';"); + } + + if (chopperImports.isNotEmpty) { + result.write(chopperImports); + } + if (enumsImport.isNotEmpty) { + result.write(enumsImport); + } + + if (enumsExport.isNotEmpty) { + result.write(enumsExport); + } + + if (hasModels && separateModels) { + result.write("export '${swaggerFileName}_models.dart';"); + } + + result.write('\n\n'); + + if (chopperPartImport.isNotEmpty) { + result.write(chopperPartImport); + } + if (hasModels && !separateModels) { + result.write("part '$swaggerFileName.swagger.g.dart';"); + } + + return result.toString(); + } + + ///Additional method to convert date to json + String generateDateToJson() { + return ''' +// ignore: unused_element +String? _dateToJson(DateTime? date) { + if(date == null) + { + return null; + } + + final year = date.year.toString(); + final month = date.month < 10 ? '0\${date.month}' : date.month.toString(); + final day = date.day < 10 ? '0\${date.day}' : date.day.toString(); + + return '\$year-\$month-\$day'; + } +'''; + } + + ///Copy-pasted converter from internet + String generateCustomJsonConverter(String fileName, GeneratorOptions options) { + if (!options.withConverter) { + return ''; + } + return ''' +typedef \$JsonFactory = T Function(Map json); + +class \$CustomJsonDecoder { + \$CustomJsonDecoder(this.factories); + + final Map factories; + + dynamic decode(dynamic entity) { + if (entity is Iterable) { + return _decodeList(entity); + } + + if (entity is T) { + return entity; + } + + if (entity is Map) { + return _decodeMap(entity); + } + + return entity; + } + + T _decodeMap(Map values) { + final jsonFactory = factories[T]; + if (jsonFactory == null || jsonFactory is! \$JsonFactory) { + return throw "Could not find factory for type \$T. Is '\$T: \$T.fromJsonFactory' included in the CustomJsonDecoder instance creation in bootstrapper.dart?"; + } + + return jsonFactory(values); + } + + List _decodeList(Iterable values) => + values.where((v) => v != null).map((v) => decode(v) as T).toList(); +} + +class \$JsonSerializableConverter extends chopper.JsonConverter { + @override + chopper.Response convertResponse(chopper.Response response) { + if (response.bodyString.isEmpty) { + // In rare cases, when let's say 204 (no content) is returned - + // we cannot decode the missing json with the result type specified + return chopper.Response(response.base, null, error: response.error); + } + + final jsonRes = super.convertResponse(response); + return jsonRes.copyWith( + body: \$jsonDecoder.decode(jsonRes.body) as ResultType); + } +} + +final \$jsonDecoder = \$CustomJsonDecoder(${fileName.pascalCase}JsonDecoderMappings); + '''; + } + + static String getClientContent( + String className, + String host, + String basePath, + GeneratorOptions options, + ) { + final baseUrlString = options.withBaseUrl ? "baseUrl: 'https://$host$basePath'" : '/*baseUrl: YOUR_BASE_URL*/'; + + final converterString = + options.withConverter ? 'converter: \$JsonSerializableConverter(),' : 'converter: chopper.JsonConverter(),'; + + final chopperClientBody = + ''' + if(client!=null){ + return _\$$className(client); + } + + final newClient = ChopperClient( + services: [_\$$className()], + $converterString + $baseUrlString); + return _\$$className(newClient); +'''; + return chopperClientBody; + } +} diff --git a/api_automatic/lib/src/code_generators/swagger_converter_generator.dart b/api_automatic/lib/src/code_generators/swagger_converter_generator.dart new file mode 100644 index 0000000..ea1561e --- /dev/null +++ b/api_automatic/lib/src/code_generators/swagger_converter_generator.dart @@ -0,0 +1,96 @@ +import 'dart:convert'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/definitions.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:recase/recase.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'constants.dart'; + +class SwaggerConverterGenerator { + String generate(String dartCode, String fileName, GeneratorOptions options) { + return ''; + + return ''' +final Map)> ${fileName.pascalCase}$converterClassEnding = +{ +${_generateModelsMapping(dartCode, options)}};'''; + } + + String _generateModelsMapping(String dartCode, GeneratorOptions options) { + final result = []; + final dynamic map = jsonDecode(dartCode); + + final classes = getDefinitions(map); + + final classesFromResponses = SwaggerModelsGenerator.getClassesFromResponses(dartCode, options); + + classes.addAll(classesFromResponses); + + if (classes.isNotEmpty) { + for (var i = 0; i < classes.keys.length; i++) { + final key = classes.keys.elementAt(i).toString(); + + final definition = classes[key]; + + if (definition['enum'] != null) { + continue; + } + + if (kBasicTypes.contains(definition['type'].toString().toLowerCase())) { + continue; + } + + if (definition['type'] == 'array' && definition['items'] != null && definition['items']['type'] == 'enum') { + continue; + } + + final validatedName = SwaggerModelsGenerator.getValidatedClassName(key) + options.modelPostfix; + + result.add('\t$validatedName: $validatedName.fromJsonFactory,'); + } + } + + final responses = getResponses(map); + if (responses.isNotEmpty) { + responses.keys.forEach((key) { + if (!result.contains(key)) { + final response = responses[key] as Map?; + + final content = response == null ? null : response['content'] as Map?; + + final firstContent = + content == null || content.entries.isEmpty ? null : content.entries.first.value as Map?; + + final schema = firstContent == null ? null : firstContent['schema'] as Map?; + + if (schema != null && content!.entries.length == 1 && !schema.containsKey('\$ref')) { + final validatedName = SwaggerModelsGenerator.getValidatedClassName(key.capitalize + options.modelPostfix); + result.add('\t$validatedName: $validatedName.fromJsonFactory,'); + } + } + }); + } + + return result.join('\n'); + } + + Map getDefinitions(dynamic map) { + if (map['definitions'] != null) { + return map['definitions'] as Map? ?? {}; + } + + if (map['components'] != null) { + return map['components']['schemas'] as Map? ?? {}; + } + + return {}; + } + + Map getResponses(dynamic map) { + if (map['components'] != null) { + return map['components']['responses'] as Map? ?? {}; + } + + return {}; + } +} diff --git a/api_automatic/lib/src/code_generators/swagger_enums_generator.dart b/api_automatic/lib/src/code_generators/swagger_enums_generator.dart new file mode 100644 index 0000000..4f28f1d --- /dev/null +++ b/api_automatic/lib/src/code_generators/swagger_enums_generator.dart @@ -0,0 +1,381 @@ +import 'dart:convert'; +import 'package:recase/recase.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/exception_words.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_path.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_root.dart'; +import 'package:collection/collection.dart'; + +abstract class SwaggerEnumsGenerator { + static const String defaultEnumFieldName = 'value_'; + static const String defaultEnumValueName = 'swaggerGeneratedUnknown'; + + String generate(String swagger, String fileName); + + String generateFromMap(String dartCode, String fileName, Map definitions, + Map responses, Map requestBodies) { + final enumsFromRequests = generateEnumsContentFromRequests(dartCode, fileName); + + final enumsFromResponses = generateEnumsFromResponses(responses); + + final enumsFromRequestBodies = generateEnumsFromRequestBodies(requestBodies); + + if (definitions.isEmpty) { + return '$enumsFromRequests$enumsFromResponses$enumsFromRequestBodies'; + } + + final enumsFromClasses = definitions.keys + .map((String className) { + return generateEnumsFromClasses(SwaggerModelsGenerator.getValidatedClassName(className.pascalCase), + definitions[className] as Map); + }) + .where((element) => element.isNotEmpty) + .join('\n'); + + if (enumsFromClasses.isEmpty && + enumsFromRequests.isEmpty && + enumsFromResponses.isEmpty && + enumsFromRequestBodies.isEmpty) { + return ''; + } + + return ''' +import 'package:json_annotation/json_annotation.dart'; +$enumsFromClasses + +$enumsFromRequests + +$enumsFromResponses + +$enumsFromRequestBodies +'''; + } + + String generateEnumsFromResponses(Map responses) { + if (responses.isEmpty) { + return ''; + } + + final enumsFromResponses = responses.keys + .map((String className) { + final response = responses[className]; + final content = response['content'] as Map?; + final firstContent = content != null && content.entries.isNotEmpty ? content.entries.first.value : null; + final schema = firstContent == null ? null : firstContent['schema']; + + if (schema == null) { + return ''; + } + + return generateEnumsFromClasses( + SwaggerModelsGenerator.getValidatedClassName(className.pascalCase), schema as Map); + }) + .where((element) => element.isNotEmpty) + .join('\n'); + + return enumsFromResponses; + } + + String generateEnumsFromRequestBodies(Map requestBodies) { + if (requestBodies.isEmpty) { + return ''; + } + + final enumsFromRequestBodies = requestBodies.keys + .map((String className) { + final response = requestBodies[className]; + final content = response['content'] as Map?; + final firstContent = content != null && content.entries.isNotEmpty ? content.entries.first.value : null; + final schema = firstContent == null ? null : firstContent['schema']; + + if (schema == null) { + return ''; + } + + return generateEnumsFromClasses( + SwaggerModelsGenerator.getValidatedClassName(className.pascalCase), schema as Map); + }) + .where((element) => element.isNotEmpty) + .join('\n'); + + return enumsFromRequestBodies; + } + + static SwaggerRequestParameter getOriginalOrOverriddenRequestParameter( + SwaggerRequestParameter swaggerRequestParameter, List definedParameters) { + if (swaggerRequestParameter.ref.isEmpty || definedParameters.isEmpty) { + return swaggerRequestParameter; + } + + final parameterClassName = swaggerRequestParameter.ref.split('/').last; + + final neededParameter = definedParameters.firstWhere( + (SwaggerRequestParameter element) => element.name == parameterClassName || element.key == parameterClassName, + orElse: () => swaggerRequestParameter); + + return neededParameter; + } + + String generateEnumsContentFromRequests(String swagger, String fileName) { + final enumNames = []; + final result = StringBuffer(); + final map = jsonDecode(swagger) as Map; + final swaggerRoot = SwaggerRoot.fromJson(map); + + //Link defined parameters with requests + swaggerRoot.paths.forEach((String path, SwaggerPath swaggerPath) { + swaggerPath.requests.forEach((String requestType, SwaggerRequest swaggerRequest) { + swaggerRequest.parameters = swaggerRequest.parameters + .map((SwaggerRequestParameter parameter) => getOriginalOrOverriddenRequestParameter( + parameter, swaggerRoot.components?.parameters.values.toList() ?? [])) + .toList(); + }); + }); + + swaggerRoot.paths.forEach((String path, SwaggerPath swaggerPath) { + swaggerPath.requests.forEach((String requestType, SwaggerRequest swaggerRequest) { + if (swaggerRequest.parameters.isEmpty) { + return; + } + + for (var p = 0; p < swaggerRequest.parameters.length; p++) { + final swaggerRequestParameter = swaggerRequest.parameters[p]; + + var name = SwaggerModelsGenerator.generateRequestEnumName(path, requestType, swaggerRequestParameter.name); + + name = SwaggerModelsGenerator.getValidatedClassName(name); + + if (enumNames.contains(name)) { + continue; + } + + final enumValues = + swaggerRequestParameter.schema?.enumValues ?? swaggerRequestParameter.items?.enumValues ?? []; + + if (enumValues.isNotEmpty) { + final enumContent = generateEnumContent(name, enumValues); + + result.writeln(enumContent); + enumNames.add(swaggerRequestParameter.name); + } + } + }); + }); + + return result.toString(); + } + + String generateEnumContent(String enumName, List enumValues) { + final enumValuesContent = getEnumValuesContent(enumValues); + + final enumMap = + ''' +\n\tconst \$${enumName}Map = { +\t${getEnumValuesMapContent(enumName, enumValues)} + }; + '''; + + final result = + """ +enum $enumName{ +\t@JsonValue('swaggerGeneratedUnknown') +\tswaggerGeneratedUnknown, +$enumValuesContent +} + +$enumMap + """; + + return result; + } + + String getEnumValuesContent(List enumValues) { + final result = enumValues + .map((String enumFieldName) => + "\t@JsonValue('${enumFieldName.replaceAll("\$", "\\\$")}')\n\t${getValidatedEnumFieldName(enumFieldName)}") + .join(',\n'); + + return result; + } + + String getEnumValuesMapContent(String enumName, List enumValues) { + final neededValues = []; + neededValues.addAll(enumValues); + + final unknownEnumPart = ',\n\t$enumName.swaggerGeneratedUnknown: \'\''; + + final result = neededValues + .map((String enumFieldName) => + '\t$enumName.${getValidatedEnumFieldName(enumFieldName)}: \'${enumFieldName.replaceAll('\$', '\\\$')}\'') + .join(',\n') + + unknownEnumPart; + + return result; + } + + static String getValidatedEnumFieldName(String name) { + if (name.isEmpty) { + name = 'null'; + } + + var result = name + .replaceAll(RegExp(r'[^\w|\_|)]'), '_') + .split('_') + .where((element) => element.isNotEmpty) + .map((String word) => word.toLowerCase().capitalize) + .join(); + + if (result.startsWith(RegExp('[0-9]+'))) { + result = defaultEnumFieldName + result; + } + + if (exceptionWords.contains(result.toLowerCase())) { + return '\$' + result.lower; + } + + return result.lower; + } + + static List getEnumNamesFromRequests(String swagger) { + final enumNames = []; + final map = jsonDecode(swagger) as Map; + final swaggerRoot = SwaggerRoot.fromJson(map); + + //Link defined parameters with requests + swaggerRoot.paths.forEach((String path, SwaggerPath swaggerPath) { + swaggerPath.requests.forEach((String req, SwaggerRequest swaggerRequest) { + swaggerRequest.parameters = swaggerRequest.parameters + .map((SwaggerRequestParameter parameter) => getOriginalOrOverriddenRequestParameter( + parameter, swaggerRoot.components?.parameters.values.toList() ?? [])) + .toList(); + }); + }); + + swaggerRoot.paths.forEach((String path, SwaggerPath swaggerPath) { + swaggerPath.requests.forEach((String requestType, SwaggerRequest swaggerRequest) { + if (swaggerRequest.parameters.isEmpty) { + return; + } + + for (var p = 0; p < swaggerRequest.parameters.length; p++) { + final swaggerRequestParameter = swaggerRequest.parameters[p]; + + var name = SwaggerModelsGenerator.generateRequestEnumName(path, requestType, swaggerRequestParameter.name); + + if (enumNames.contains(name)) { + continue; + } + + final enumValues = + swaggerRequestParameter.schema?.enumValues ?? swaggerRequestParameter.items?.enumValues ?? []; + + if (enumValues.isNotEmpty) { + enumNames.add(name); + } + } + }); + }); + + return enumNames; + } + + String generateEnumsContentFromModelProperties(Map map, String className) { + if (map.isEmpty) { + return ''; + } + + final gemeratedEnumsContent = map.keys + .map((String key) { + final enumValuesMap = map[key] as Map; + + if (enumValuesMap.containsKey('type')) { + return generateEnumContentIfPossible(enumValuesMap, generateEnumName(className, key)); + } + + return ''; + }) + .where((String generatedEnum) => generatedEnum.isNotEmpty) + .join('\n'); + + return gemeratedEnumsContent; + } + + String generateEnumContentIfPossible(Map map, String enumName) { + enumName = SwaggerModelsGenerator.getValidatedClassName(enumName); + + if (map['enum'] != null) { + final enumValues = map['enum'] as List; + final stringValues = enumValues.map((e) => e.toString()).toList(); + final enumMap = + ''' +\n\tconst \$${enumName}Map = { +\t${getEnumValuesMapContent(enumName, stringValues)} + }; + '''; + + return """ +enum ${enumName.capitalize} { +\t@JsonValue('$defaultEnumValueName')\n $defaultEnumValueName, +${generateEnumValuesContent(enumValues)} +} + +$enumMap +"""; + } else if (map['items'] != null) { + return generateEnumContentIfPossible(map['items'] as Map, enumName); + } else { + return ''; + } + } + + String generateEnumName(String className, String enumName) { + final validatedEnumName = SwaggerModelsGenerator.getValidatedClassName(enumName); + return '${className.capitalize}$validatedEnumName'; + } + + String generateEnumValuesContent(List values) { + return values + .map((dynamic e) => + "\t@JsonValue('${e.toString().replaceAll("\$", "\\\$")}')\n ${getValidatedEnumFieldName(e.toString())}") + .join(',\n'); + } + + String generateEnumsFromClasses( + String className, + Map map, + ) { + if (map['enum'] != null) { + return generateEnumContentIfPossible(map, className); + } + + if (map['items'] != null && map['items']['enum'] != null) { + return generateEnumContentIfPossible(map['items'] as Map, className); + } + Map properties; + + if (map.containsKey('allOf')) { + final allOf = map['allOf'] as List; + var propertiesContainer = allOf.firstWhereOrNull( + (e) => (e as Map).containsKey('properties'), + ) as Map? ?? + {}; + + if (propertiesContainer.isNotEmpty) { + properties = propertiesContainer['properties'] as Map? ?? {}; + } else { + properties = map['properties'] as Map? ?? {}; + } + } else { + properties = map['properties'] as Map? ?? {}; + } + + if (properties.isEmpty) { + return ''; + } + + return generateEnumsContentFromModelProperties(properties, className); + } +} diff --git a/api_automatic/lib/src/code_generators/swagger_models_generator.dart b/api_automatic/lib/src/code_generators/swagger_models_generator.dart new file mode 100644 index 0000000..cdc942b --- /dev/null +++ b/api_automatic/lib/src/code_generators/swagger_models_generator.dart @@ -0,0 +1,1114 @@ +import 'dart:convert'; + +import 'package:collection/src/iterable_extensions.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/constants.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:recase/recase.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_enums_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:swagger_dart_code_generator/src/exception_words.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +import 'constants.dart'; + +abstract class SwaggerModelsGenerator { + static const List keyClasses = ['Response', 'Request']; + + String generate(String dartCode, String fileName, GeneratorOptions options, Map requestClass); + String generateResponses(String dartCode, String fileName, GeneratorOptions options); + + String generateRequestBodies(String dartCode, String fileName, GeneratorOptions options); + String getExtendsString(Map map); + List getAllEnumNames(String swaggerFile); + List getAllListEnumNames(String swaggerFile); + + String generateModelClassContent( + String className, + Map map, + Map schemas, + List defaultValues, + bool useDefaultNullForLists, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options) { + if (map['enum'] != null) { + return ''; + } + + if (kBasicTypes.contains(map['type'].toString().toLowerCase())) { + return ''; + } + + if (map['type'] == 'array' && map['items'] != null && map['items']['type'] == 'enum') { + return ''; + } + + if (map.containsKey('\$ref')) { + return 'class $className {}'; + } + + return generateModelClassString( + className, + map, + schemas, + defaultValues, + useDefaultNullForLists, + allEnumNames, + allEnumListNames, + options, + ); + } + + static Map getClassesFromInnerClasses( + Map classes, + GeneratorOptions options, + ) { + final result = {}; + + classes.forEach((classKey, classValue) { + final properties = classValue['properties'] as Map?; + + if (properties == null) { + return; + } + + properties.forEach((propertyKey, propertyValue) { + final innerClassName = '${getValidatedClassName(classKey)}\$${getValidatedClassName(propertyKey)}'; + + if (propertyValue['properties'] != null) { + result[innerClassName] = propertyValue; + } + + final items = propertyValue['items'] as Map?; + + if (items != null && items['properties'] != null) { + result[innerClassName] = propertyValue; + } + }); + }); + + if (result.isNotEmpty) { + result.addAll(getClassesFromInnerClasses(result, options)); + } + + return result; + } + + static Map getClassesFromResponses(String dartCode, GeneratorOptions options) { + final swagger = jsonDecode(dartCode); + + final results = {}; + + final paths = swagger['paths'] as Map?; + if (paths == null) { + return results; + } + + paths.forEach((path, pathValue) { + final requests = pathValue as Map; + + requests.removeWhere((key, value) => key == 'parameters' || key == 'summary'); + + requests.forEach((request, requestValue) { + if (!supportedRequestTypes.contains(request.toLowerCase())) { + return; + } + + if (options.excludePaths.isNotEmpty && + options.excludePaths.any((exclPath) => RegExp(exclPath).hasMatch(request))) { + return; + } + + if (options.includePaths.isNotEmpty && + !options.includePaths.any((inclPath) => RegExp(inclPath).hasMatch(request))) { + return; + } + final responses = requestValue['responses'] as Map; + + final neededResponse = responses['200']; + + if (neededResponse != null && + neededResponse['schema'] != null && + neededResponse['schema']['type'] == 'object' && + neededResponse['schema']['properties'] != null) { + final pathText = path.split('/').map((e) => e.pascalCase).join(); + final requestText = request.pascalCase; + + results['$pathText$requestText\$Response'] = neededResponse['schema']; + } + }); + }); + + return results; + } + + String generateBase(String dartCode, String fileName, GeneratorOptions options, Map classes, + bool generateFromJsonToJsonForRequests, Map requestClass) { + final allEnumsNames = getAllEnumNames(dartCode); + final allEnumListNames = getAllListEnumNames(dartCode); + + final generatedEnumFromJsonToJson = generateFromJsonToJsonForRequests + ? genetateEnumFromJsonToJsonMethods(allEnumsNames, options.enumsCaseSensitive) + : ''; + + final classesFromResponses = getClassesFromResponses(dartCode, options); + classes.addAll(classesFromResponses); + + final classesFromInnerClasses = getClassesFromInnerClasses(classes, options); + + classes.addAll(classesFromInnerClasses); + + // requestClass[requestClass.keys.first] = { + // 'type': 'object', + // }; + + classes.addAll(requestClass); + + if (classes.isEmpty) { + return ''; + } + + final generatedClasses = classes.keys.map((String className) { + if (classes['enum'] != null) { + return ''; + } + + return generateModelClassContent( + className.pascalCase, + classes[className] as Map, + classes, + options.defaultValuesMap, + options.useDefaultNullForLists, + allEnumsNames, + allEnumListNames, + options, + ); + }).join('\n'); + + var results = '$generatedClasses\n$generatedEnumFromJsonToJson'; + + final listEnums = getAllListEnumNames(dartCode); + + listEnums.forEach((listEnum) { + results = results.replaceAll(' $listEnum ', ' List<$listEnum> '); + }); + + return results; + } + + static String getValidatedClassName(String className) { + if (kBasicTypes.contains(className)) { + return className; + } + + if (exceptionWords.contains(className)) { + return 'Object'; + } + + if (className.isEmpty) { + return className; + } + + final isEnum = className.startsWith('enums.'); + + if (isEnum) { + className = className.substring(6); + } + + final words = className.split('\$'); + + final result = + words.map((e) => e.pascalCase.split(RegExp(r'\W+|\_')).map((String str) => str.capitalize).join()).join('\$'); + + if (keyClasses.contains(result)) { + return '$result\$'; + } + + if (isEnum) { + return 'enums.$result'; + } + + if (result.startsWith(RegExp('[0-9]'))) { + return '\$$result'; + } + + return result; + } + + static String getValidatedParameterName(String parameterName) { + if (parameterName.isEmpty) { + return parameterName; + } + + final isEnum = parameterName.startsWith('enums.'); + + if (isEnum) { + parameterName = parameterName.substring(6); + } + + final words = parameterName.split('\$'); + + final result = + words.map((e) => e.pascalCase.split(RegExp(r'\W+|\_')).map((String str) => str.capitalize).join()).join('\$'); + + if (isEnum) { + return 'enums.$result'; + } + + if (exceptionWords.contains(result.camelCase) || kBasicTypes.contains(result.camelCase)) { + return '\$$parameterName'; + } + + if (result.isEmpty) { + return kUndefinedParameter; + } + + return result.camelCase; + } + + String getParameterTypeName( + String className, + String parameterName, + Map parameter, + String modelPostfix, + String? refNameParameter, + ) { + if (parameter['properties'] != null) { + return '${getValidatedClassName(className)}\$${getValidatedClassName(parameterName)}$modelPostfix'; + } + + if (refNameParameter != null) { + return refNameParameter.pascalCase; + } + + if (parameter.isEmpty) { + return 'Object'; + } + + if (parameter['\$ref'] != null) { + return parameter['\$ref'].toString().split('/').last.pascalCase; + } + + switch (parameter['type'] as String?) { + case 'integer': + case 'int': + case 'int32': + case 'int64': + return 'int'; + case 'boolean': + return 'bool'; + case 'string': + if (parameter['format'] == 'date-time' || parameter['format'] == 'date') { + return 'DateTime'; + } else if (parameter['enum'] != null) { + //todo + return 'int'; //'enums.${SwaggerModelsGenerator.getValidatedClassName(SwaggerEnumsGeneratorV2().generateEnumName(SwaggerModelsGenerator.getValidatedClassName(className), parameterName))}'; + } + return 'String'; + case 'Date': + return 'DateTime'; + case 'number': + return 'double'; + case 'object': + return 'Object'; + case 'array': + final items = parameter['items'] as Map? ?? {}; + final typeName = getParameterTypeName(className, parameterName, items, modelPostfix, null); + return 'List<$typeName>'; + default: + return 'Object'; + } + } + + static String generateFieldName(String jsonKey) { + final forbiddenCharacters = ['#']; + + jsonKey = jsonKey.camelCase; + + forbiddenCharacters.forEach((String element) { + if (jsonKey.startsWith(element)) { + jsonKey = '\$forbiddenFieldName'; + } + }); + + if (jsonKey.startsWith(RegExp('[0-9]')) || exceptionWords.contains(jsonKey)) { + jsonKey = '\$' + jsonKey; + } + + if (kBasicTypes.contains(jsonKey)) { + jsonKey = '\$' + jsonKey; + } + + return jsonKey; + } + + static String generateRequestEnumName(String path, String requestType, String parameterName) { + if (path == '/') { + path = '\$'; + } + + path = path.split('{').map((e) => e.capitalize).join(); + path = path.split('}').map((e) => e.capitalize).join(); + + final correctedPath = generateFieldName(path); + + final result = '${correctedPath.capitalize}${requestType.capitalize}${parameterName.capitalize}'; + + return SwaggerModelsGenerator.getValidatedClassName(result); + } + + /// Tạo tên hàm từ path + requestType, gồm cả segment path để tránh trùng (vd: /v1/product/delete/{id} -> productDeleteId). + static String generateRequestName(String path, String requestType) { + if (path == '/') { + path = '\$'; + } + + final segments = path + .split('/') + .where((e) => e.isNotEmpty) + .map((e) { + if (e.startsWith('{') && e.endsWith('}')) { + return e.substring(1, e.length - 1); + } + return e; + }) + .where((e) => e.isNotEmpty && !RegExp(r'^v\d+').hasMatch(e.toLowerCase())) + .toList(); + + // Bỏ segment 'api' ở đầu nếu có để tên hàm không bắt đầu bằng 'api' + if (segments.isNotEmpty && segments.first.toLowerCase() == 'api') { + segments.removeAt(0); + } + + if (segments.isEmpty) { + return requestType.camelCase; + } + + final pathPart = segments.map((s) => s.capitalize).join(); + final correctedPath = SwaggerModelsGenerator.getValidatedClassName(pathPart); + return correctedPath.camelCase; + } + + String generateDefaultValueFromMap(DefaultValueMap map) { + switch (map.typeName) { + case 'int': + case 'double': + case 'bool': + return map.defaultValue; + default: + return "'${map.defaultValue}'"; + } + } + + String generateIncludeIfNullString(GeneratorOptions options) { + if (options.includeIfNull == null) { + return ''; + } + + return ', includeIfNull: ${options.includeIfNull}'; + } + + String generatePropertyContentByDefault(Map propertyEntryMap, String propertyName, + List allEnumNames, List allEnumListNames, GeneratorOptions options) { + var typeName = ''; + final originalRef = propertyEntryMap['originalRef']; + + if (originalRef != null) { + typeName = getValidatedClassName(propertyEntryMap['originalRef'].toString()); + } + + if (typeName.isEmpty) { + typeName = kDynamic; + } + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, typeName.toString(), false); + + final dateToJsonValue = generateToJsonForDate(propertyEntryMap); + + final includeIfNullString = generateIncludeIfNullString(options); + + if (typeName != kDynamic) { + //typeName += '?'; + } +//Todo final + final jsonKeyContent = "@JsonKey(name: '$propertyName'$includeIfNullString$dateToJsonValue$unknownEnumValue)\n"; + return '\t$jsonKeyContent\t $typeName ${SwaggerModelsGenerator.generateFieldName(propertyName)};'; + } + //final + + String generateUnknownEnumValue( + List allEnumNames, List allEnumListNames, String typeName, bool isList) { + typeName = getValidatedClassName(typeName); + + if (allEnumListNames.contains(typeName)) { + isList = true; + } + + if (allEnumNames.contains(typeName)) { + if (!isList) { + final enumNameCamelCase = typeName.replaceAll('enums.', '').camelCase; + return ', toJson: ${enumNameCamelCase}ToJson, fromJson: ${enumNameCamelCase}FromJson'; + } else { + final enumNameCamelCase = typeName.replaceAll('enums.', '').camelCase; + return ', toJson: ${enumNameCamelCase}ListToJson, fromJson: ${enumNameCamelCase}ListFromJson'; + } + } + + return ''; + } + + String generateToJsonForDate(Map map) { + // Không dùng helper _dateToJson để tránh lỗi thiếu hàm trong file sinh ra. + // Mặc định để json_serializable serialize DateTime theo ISO8601. + return ''; + } + + String generatePropertyContentBySchema( + Map propertyEntryMap, + String propertyName, + String propertyKey, + String className, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options, + Map basicTypesMap) { + final propertySchema = propertyEntryMap['schema'] as Map; + var parameterName = propertySchema['\$ref'].toString().split('/').last; + + String typeName; + if (basicTypesMap.containsKey(parameterName)) { + typeName = basicTypesMap[parameterName]!; + } else { + typeName = getValidatedClassName( + getParameterTypeName(className, propertyName, propertyEntryMap, options.modelPostfix, parameterName)); + } + + final includeIfNullString = generateIncludeIfNullString(options); + + final allEnumsNamesWithoutPrefix = allEnumNames.map((e) => e.replaceFirst('enums.', '')).toList(); + + if (allEnumsNamesWithoutPrefix.contains(typeName)) { + typeName = 'enums.$typeName'; + } else { + typeName += options.modelPostfix; + } + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, typeName, false); + + final dateToJsonValue = generateToJsonForDate(propertyEntryMap); + + final jsonKeyContent = "@JsonKey(name: '$propertyKey'$includeIfNullString$unknownEnumValue$dateToJsonValue)\n"; + + //toDo \tfinal + return '\t$jsonKeyContent\t $typeName? ${SwaggerModelsGenerator.generateFieldName(propertyName)};'; + } + + String generatePropertyContentByRef( + Map propertyEntryMap, + String propertyName, + String propertyKey, + String className, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options, + Map basicTypesMap) { + final parameterName = propertyEntryMap['\$ref'].toString().split('/').last; + String typeName; + if (basicTypesMap.containsKey(parameterName)) { + typeName = basicTypesMap[parameterName]!; + } else { + typeName = getValidatedClassName( + getParameterTypeName(className, propertyName, propertyEntryMap, options.modelPostfix, parameterName)); + } + + final allEnumsNamesWithoutPrefix = allEnumNames.map((e) => e.replaceFirst('enums.', '')).toList(); + + typeName = SwaggerModelsGenerator.getValidatedClassName(typeName); + + if (allEnumsNamesWithoutPrefix.contains(typeName)) { + typeName = 'enums.$typeName'; + } else if (!basicTypesMap.containsKey(parameterName) && !allEnumListNames.contains(typeName)) { + typeName += options.modelPostfix; + } + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, typeName, false); + + if (allEnumListNames.contains(typeName)) { + typeName = 'List<$typeName>'; + } + + final includeIfNullString = generateIncludeIfNullString(options); + + final jsonKeyContent = "@JsonKey(name: '$propertyKey'$includeIfNullString$unknownEnumValue)\n"; +//toDo \tfinal + return '\t$jsonKeyContent\t $typeName? $propertyName;'; + } + + String generateEnumPropertyContent( + String key, + String className, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options, + ) { + final enumName = + SwaggerModelsGenerator.getValidatedClassName(SwaggerEnumsGeneratorV2().generateEnumName(className, key)); + + allEnumNames.add(enumName); + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, enumName, false).substring(2); + + final includeIfNullString = generateIncludeIfNullString(options); + + return ''' + @JsonKey($unknownEnumValue$includeIfNullString) + final ${className.capitalize + key.capitalize}? ${SwaggerModelsGenerator.generateFieldName(key)};'''; + } + + String generateListPropertyContent( + String propertyName, + String propertyKey, + String className, + Map propertyEntryMap, + bool useDefaultNullForLists, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options, + Map basicTypesMap) { + final items = propertyEntryMap['items']; + + var typeName = ''; + if (items != null) { + typeName = getValidatedClassName(items['originalRef'] as String? ?? ''); + + if (typeName.isNotEmpty && !kBasicTypes.contains(typeName.toLowerCase())) { + typeName += options.modelPostfix; + } + + if (typeName.isEmpty) { + final ref = items['\$ref'] as String?; + if (ref?.isNotEmpty == true) { + typeName = ref!.split('/').last; + + if (!allEnumListNames.contains(typeName) && + !allEnumNames.contains('enums.' + typeName) && + !basicTypesMap.containsKey(typeName)) { + typeName += options.modelPostfix; + } + } + + if (basicTypesMap.containsKey(typeName)) { + typeName = basicTypesMap[typeName]!; + } else if (typeName != kDynamic) { + typeName = typeName.pascalCase; + } + } else if (!allEnumNames.contains('enums.$typeName') && !kBasicTypes.contains(typeName.toLowerCase())) { + typeName = kBasicTypesMap[typeName] ?? typeName + options.modelPostfix; + } + + if (typeName.isNotEmpty) { + typeName = SwaggerModelsGenerator.getValidatedClassName(typeName); + } + + if (typeName.isEmpty) { + if (items['type'] == 'array' || items['items'] != null) { + typeName = 'List'; + } + } + + if (allEnumNames.contains('enums.$typeName')) { + typeName = 'enums.$typeName'; + } + } + + if (typeName.isEmpty) { + typeName = getParameterTypeName( + className, + propertyName, + items as Map? ?? {}, + options.modelPostfix, + null, + ); + } + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, typeName, true); + + final includeIfNullString = generateIncludeIfNullString(options); + + String jsonKeyContent; + if (unknownEnumValue.isEmpty) { + jsonKeyContent = + "@JsonKey(name: '$propertyKey'$includeIfNullString${useDefaultNullForLists ? '' : ', defaultValue: <$typeName>[]'})\n"; + } else { + jsonKeyContent = "@JsonKey(name: '$propertyKey'$includeIfNullString$unknownEnumValue)\n"; + } + //Todo final + return '$jsonKeyContent List<$typeName>? ${SwaggerModelsGenerator.generateFieldName(propertyName)};'; + } + + String generateGeneralPropertyContent( + String propertyName, + String propertyKey, + String className, + List defaultValues, + Map val, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options) { + var typeName = _getTypeName(allEnumNames, val, className, propertyName, options); + + final includeIfNullString = generateIncludeIfNullString(options); + + var jsonKeyContent = "@JsonKey(name: '$propertyKey'$includeIfNullString"; + + final unknownEnumValue = generateUnknownEnumValue(allEnumNames, allEnumListNames, typeName, false); + + final dateToJsonValue = generateToJsonForDate(val); + + jsonKeyContent += unknownEnumValue; + jsonKeyContent += dateToJsonValue; + + if ((val['type'] == 'bool' || val['type'] == 'boolean') && val['default'] != null) { + jsonKeyContent += ', defaultValue: ${val['default']})\n'; + } else if (defaultValues.any((DefaultValueMap element) => element.typeName == typeName)) { + final defaultValue = defaultValues.firstWhere((DefaultValueMap element) => element.typeName == typeName); + jsonKeyContent += ', defaultValue: ${generateDefaultValueFromMap(defaultValue)})\n'; + } else { + jsonKeyContent += ')\n'; + } + + if ((typeName != kDynamic && !jsonKeyContent.contains('defaultValue')) || + (val.containsKey('required') && val['required'] == false && typeName == 'bool')) { + typeName += '?'; + } + //Todo + return '\t$jsonKeyContent $typeName $propertyName;'; //final + } + + String _getTypeName(List allEnumNames, Map val, String className, String propertyName, + GeneratorOptions options) { + var typeName = ''; + + if (val['\$ref'] != null) { + typeName = val['\$ref'].toString().split('/').last.pascalCase + options.modelPostfix; + } else { + typeName = getParameterTypeName( + className, + propertyName, + val, + options.modelPostfix, + null, + ); + } + + final allEnumsNamesWithoutPrefix = allEnumNames.map((e) => e.replaceFirst('enums.', '')).toList(); + + if (allEnumsNamesWithoutPrefix.contains(typeName)) { + typeName = 'enums.$typeName'; + } + + return typeName; + } + + String generatePropertyContentByType( + Map propertyEntryMap, + String propertyName, + String propertyKey, + String className, + List defaultValues, + bool useDefaultNullForLists, + List allEnumsNames, + List allEnumListNames, + GeneratorOptions options, + Map basicTypesMap) { + switch (propertyEntryMap['type'] as String) { + case 'array': + return generateListPropertyContent( + propertyName, + propertyKey, + className, + propertyEntryMap, + useDefaultNullForLists, + allEnumsNames, + allEnumListNames, + options, + basicTypesMap, + ); + case 'enum': + return generateEnumPropertyContent( + propertyName, + className, + allEnumsNames, + allEnumListNames, + options, + ); + default: + return generateGeneralPropertyContent( + propertyName, + propertyKey, + className, + defaultValues, + propertyEntryMap, + allEnumsNames, + allEnumListNames, + options, + ); + } + } + + String getParameterName(String name, List names) { + if (names.contains(name)) { + final newName = '\$$name'; + return getParameterName(newName, names); + } + + return name; + } + + String generatePropertiesContent( + Map propertiesMap, + Map schemas, + String className, + List defaultValues, + bool useDefaultNullForLists, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options) { + if (propertiesMap.isEmpty) { + return ''; + } + + final results = []; + final propertyNames = []; + + for (var i = 0; i < propertiesMap.keys.length; i++) { + var propertyName = propertiesMap.keys.elementAt(i); + final propertyEntryMap = propertiesMap[propertyName] as Map; + final propertyKey = propertyName; + + final basicTypesMap = generateBasicTypesMapFromSchemas(schemas); + + propertyName = propertyName.asParameterName(); + + propertyName = getParameterName(propertyName, propertyNames); + + propertyNames.add(propertyName); + + if (propertyEntryMap.containsKey('type')) { + results.add(generatePropertyContentByType(propertyEntryMap, propertyName, propertyKey, className, defaultValues, + useDefaultNullForLists, allEnumNames, allEnumListNames, options, basicTypesMap)); + } else if (propertyEntryMap['\$ref'] != null) { + results.add(generatePropertyContentByRef(propertyEntryMap, propertyName, propertyKey, className, allEnumNames, + allEnumListNames, options, basicTypesMap)); + } else if (propertyEntryMap['schema'] != null) { + results.add(generatePropertyContentBySchema(propertyEntryMap, propertyName, propertyKey, className, + allEnumNames, allEnumListNames, options, basicTypesMap)); + } else { + results.add( + generatePropertyContentByDefault(propertyEntryMap, propertyName, allEnumNames, allEnumListNames, options)); + } + } + + return results.join('\n'); + } + + static Map generateBasicTypesMapFromSchemas(Map schemas) { + final result = {}; + if (schemas.isEmpty) { + return result; + } + + schemas.forEach((key, value) { + if (kBasicTypes.contains(value['type'].toString().toLowerCase()) && value['enum'] == null) { + result.addAll({key: _mapBasicTypeToDartType(value['type'].toString(), value['format'].toString())}); + } + }); + + return result; + } + + static String _mapBasicTypeToDartType(String basicType, String format) { + if (basicType.toLowerCase() == 'string' && (format == 'date-time' || format == 'datetime')) { + return 'DateTime'; + } + switch (basicType.toLowerCase()) { + case 'string': + return 'String'; + case 'int': + case 'integer': + return 'int'; + case 'double': + case 'number': + case 'float': + return 'double'; + case 'bool': + case 'boolean': + return 'bool'; + default: + return ''; + } + } + + String genetateEnumFromJsonToJsonMethods(List enumNames, bool enumsCaseSensitive) { + return enumNames.map((e) => generateEnumFromJsonToJson(e, enumsCaseSensitive)).join('\n'); + } + +//enums.\$${neededName}Map[${neededName.camelCase}] + String generateEnumFromJsonToJson(String enumName, bool enumsCaseSensitive) { + final neededName = SwaggerModelsGenerator.getValidatedClassName(enumName.replaceFirst('enums.', '')); + + final toLowerCaseString = !enumsCaseSensitive ? '.toString().toLowerCase()' : ''; + + return ''' + + +int? ${neededName.camelCase}ToJson(enums.$neededName? ${neededName.camelCase}) { + return ${neededName.camelCase}?.index; +} + +enums.$neededName ${neededName.camelCase}FromJson(int? ${neededName.camelCase}) { + + if(${neededName.camelCase} == null) + { + return enums.$neededName.swaggerGeneratedUnknown; + } + + return enums.\$${neededName}Map.entries + .firstWhere((element) => element.value$toLowerCaseString == ${neededName.camelCase}$toLowerCaseString, + orElse: () => const MapEntry(enums.$neededName.swaggerGeneratedUnknown, '')) + .key; +} + +List ${neededName.camelCase}ListToJson( + List? ${neededName.camelCase}) { + + if(${neededName.camelCase} == null) + { + return []; + } + + return ${neededName.camelCase} + .map((e) => e.index) //enums.\$${neededName}Map[e]! + .toList(); +} + +List ${neededName.camelCase}ListFromJson( + List? ${neededName.camelCase}) { + + if(${neededName.camelCase} == null) + { + return []; + } + + return ${neededName.camelCase} + .map((e) => ${neededName.camelCase}FromJson(e))//.toString() + .toList(); +} + '''; + } + + String generateConstructorPropertiesContent( + String className, + Map entityMap, + GeneratorOptions options, + List defaultValues, + List allEnumNames, + List allEnumListNames, + ) { + if (entityMap.isEmpty) { + return ''; + } + + var results = ''; + final propertyNames = []; + + entityMap.forEach((key, value) { + var fieldName = getParameterName(key.asParameterName(), propertyNames); + + propertyNames.add(fieldName); + + var typeName = _getTypeName(allEnumNames, value as Map, className, key, options); + + var defaultValue = ''; + final temp = defaultValues.firstWhereOrNull((DefaultValueMap element) => element.typeName == typeName); + if (temp != null) { + defaultValue = ' = ${generateDefaultValueFromMap(temp)}'; + } + results += '\t\tthis.$fieldName $defaultValue,\n'; + }); + + return '{\n$results\n\t}'; + } + + String generateModelClassString( + String className, + Map map, + Map schemas, + List defaultValues, + bool useDefaultNullForLists, + List allEnumNames, + List allEnumListNames, + GeneratorOptions options, + ) { + final properties = getModelProperties(map, schemas); + + var extendsString = options.useInheritance ? getExtendsString(map) : ''; + + final generatedConstructorProperties = generateConstructorPropertiesContent( + className, + properties, + options, + defaultValues, + allEnumNames, + allEnumListNames, + ); + + final generatedProperties = generatePropertiesContent( + properties, + schemas, + className, + defaultValues, + useDefaultNullForLists, + allEnumNames, + allEnumListNames, + options, + ); + + final validatedClassName = '${getValidatedClassName(className)}${options.modelPostfix}'; + + final copyWithMethod = ''; //generateCopyWithContent(generatedProperties, validatedClassName); + + final getHashContent = ''; //generateGetHashContent(generatedProperties, validatedClassName); + + final equalsOverride = ''; //generateEqualsOverride(generatedProperties, validatedClassName); + + final generatedClass = ''' +@JsonSerializable(explicitToJson: true) +class $validatedClassName $extendsString{ +\t$validatedClassName($generatedConstructorProperties);\n +\tfactory $validatedClassName.fromJson(Map json) => _\$${validatedClassName}FromJson(json);\n +$generatedProperties +\tstatic const fromJsonFactory = _\$${validatedClassName}FromJson; +\tstatic const toJsonFactory = _\$${validatedClassName}ToJson; +\tMap toJson() => _\$${validatedClassName}ToJson(this); + + $equalsOverride + + $getHashContent + +} +$copyWithMethod +'''; + + return generatedClass; + } + + String generateEqualsOverride(String generatedProperties, String validatedClassName) { + final splittedProperties = generatedProperties + .split(';') + .where((element) => element.isNotEmpty) + .map((e) => e.substring(e.indexOf('final ') + 6)) + .map((e) => e.split(' ')[1]) + .toList(); + + if (splittedProperties.isEmpty) { + return ''; + } + + final checks = splittedProperties.map((e) => ''' +(identical(other.$e, $e) || + const DeepCollectionEquality().equals(other.$e, $e)) + ''').join(' && '); + + return ''' +@override + bool operator ==(dynamic other) { + return identical(this, other) || + (other is $validatedClassName && + $checks); + } + '''; + } + + String generateCopyWithContent(String generatedProperties, String validatedClassName) { + final splittedProperties = generatedProperties + .split(';') + .where((element) => element.isNotEmpty) + .map((e) => e.substring(e.indexOf('final ') + 6)) + .map((e) { + final items = e.split(' '); + if (!items.first.endsWith('?')) { + items[0] += '?'; + } + + return items[0] + ' ' + items[1]; + }).toList(); + + if (splittedProperties.isEmpty) { + return ''; + } + + final spittedPropertiesJoined = splittedProperties.join(', '); + + final splittedPropertiesNamesContent = + splittedProperties.map((e) => e.substring(e.indexOf(' ') + 1)).map((e) => '$e: $e ?? this.$e').join(',\n'); + + return 'extension \$${validatedClassName}Extension on $validatedClassName { $validatedClassName copyWith({$spittedPropertiesJoined}) { return $validatedClassName($splittedPropertiesNamesContent);}}'; + } + + String generateGetHashContent(String generatedProperties, String validatedClassName) { + final propertiesHash = generatedProperties + .split(';') + .where((element) => element.isNotEmpty) + .map((e) => e.substring(e.indexOf('final ') + 6)) + .map((e) => e.substring(e.indexOf(' ') + 1)) + .map((e) => 'const DeepCollectionEquality().hash($e)') + .toList(); + + final allHashComponents = [...propertiesHash, 'runtimeType.hashCode'].join(' ^\n'); + + return ''' +@override +int get hashCode => +$allHashComponents; +'''; + } + + Map getModelProperties( + Map modelMap, + Map schemas, + ) { + if (!modelMap.containsKey('allOf')) { + return modelMap['properties'] as Map? ?? {}; + } + + final allOf = modelMap['allOf'] as List; + + final newModelMap = allOf.firstWhere( + (m) => (m as Map).containsKey('properties'), + orElse: () => null, + ); + + if (newModelMap == null) { + return {}; + } + + final currentProperties = newModelMap['properties'] as Map? ?? {}; + + final allOfRef = allOf.firstWhere( + (m) => (m as Map).containsKey('\$ref'), + orElse: () => null, + ); + + if (allOfRef != null) { + final refString = allOfRef['\$ref'].toString(); + final schema = schemas[refString.getUnformattedRef()]; + + final moreProperties = schema['properties'] as Map? ?? {}; + + currentProperties.addAll(moreProperties); + } + + return currentProperties; + } +} diff --git a/api_automatic/lib/src/code_generators/swagger_requests_generator.dart b/api_automatic/lib/src/code_generators/swagger_requests_generator.dart new file mode 100644 index 0000000..1c6001f --- /dev/null +++ b/api_automatic/lib/src/code_generators/swagger_requests_generator.dart @@ -0,0 +1,866 @@ +import 'dart:convert'; + +import 'package:code_builder/code_builder.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_response.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_path.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_root.dart'; +import 'package:recase/recase.dart'; +import 'package:collection/collection.dart'; +import 'package:swagger_dart_code_generator/src/extensions/parameter_extensions.dart'; + +import 'constants.dart'; + +class SwaggerRequestsGenerator { + String generate({ + required String code, + required String className, + required String fileName, + required GeneratorOptions options, + required Map requestClass, + }) { + final map = jsonDecode(code) as Map; + final swaggerRoot = SwaggerRoot.fromJson(map); + + swaggerRoot.paths = _processVersion(swaggerRoot, options); + + final service = _generateService(swaggerRoot, className, fileName, options, requestClass); + + return service.accept(DartEmitter()).toString(); + } + + Map _processVersion(SwaggerRoot content, GeneratorOptions options) { + var returnValues = {}; + + // ignore: unused_local_variable + content.paths.forEach((key, value) { + if (options.urlParterns.isEmpty || + options.urlParterns.where((element) => key.toLowerCase().contains(element.toLowerCase())).isNotEmpty) { + if (options.customApiVersion.isNotEmpty) { + options.customApiVersion.forEach((element) { + for (var temp in element.urls) { + if (key.toLowerCase() == temp.toLowerCase()) { + key = key.replaceAll('{version}', element.version); + } + } + }); + } + //else { + if (key.contains('{version}')) key = key.replaceAll('{version}', options.defaultApiVersion); + //} + returnValues[key] = value; + } + }); + return returnValues; + } + + Class _generateService( + SwaggerRoot swaggerRoot, + String className, + String fileName, + GeneratorOptions options, + Map requestClass, + ) { + final allMethodsContent = _getAllMethodsContent( + swaggerRoot: swaggerRoot, + options: options, + requestClass: requestClass, + ); + + // final chopperClient = SwaggerAdditionsGenerator.getChopperClientContent( + // className, + // swaggerRoot.host, + // swaggerRoot.basePath, + // options, + // ); + + var constructor = Constructor((p) => p + ..factory = true + ..redirect = Reference('_$className') + ..requiredParameters.add( + Parameter((p) => p + ..type = Reference('Dio') + ..name = 'dio'), + ) + ..optionalParameters.add( + Parameter((p) => p + ..type = Reference('String') + ..name = 'baseUrl' + ..named = true), + )); + + return Class( + (c) => c + ..methods.addAll([...allMethodsContent]) + ..constructors.add(constructor) + //..extend = Reference(kChopperService) + ..docs.add(kServiceHeader) + ..annotations.add(refer(kRetrofitApi).call( + [], + )) //{'baseUrl': Reference('ApiPath.EXAM')} + ..abstract = true + ..name = className, + ); + } + + List _getAllMethodsContent({ + required SwaggerRoot swaggerRoot, + required GeneratorOptions options, + required Map requestClass, + }) { + final methods = []; + + swaggerRoot.paths.forEach((String path, SwaggerPath swaggerPath) { + swaggerPath.requests.forEach((String requestType, SwaggerRequest swaggerRequest) { + if (requestType.toLowerCase() == kRequestTypeOptions) { + return; + } + + final item = options.excludePaths + .firstWhereOrNull((excludePath) => excludePath.startsWith(path)); //RegExp(excludePath).hasMatch(path) + print(path); + if (item != null) { + if (item.contains(' ')) { + final temps = item.split(' '); + print("Method: " + temps[temps.length - 1].toLowerCase()); + print("Method 2: " + requestType.toLowerCase()); + if (temps[temps.length - 1].toLowerCase() == requestType.toLowerCase()) return; + } else { + return; + } + } + + if (options.includePaths.isNotEmpty && + !options.includePaths.any((includePath) => RegExp(includePath).hasMatch(path))) { + return; + } + + final methodName = _getRequestMethodName( + requestType: requestType, swaggerRequest: swaggerRequest, path: path, options: options); + + // Nếu đã có method trùng tên (thường là do khác HTTP method trên cùng path) + // thì thêm prefix theo method (get/put/post/delete...) để tránh trùng, + // ví dụ: GET /order/{id} -> orderId, PUT /order/{id} -> putOrderId. + var effectiveMethodName = methodName; + if (methods.any((m) => m.name == methodName)) { + effectiveMethodName = '${requestType.toLowerCase()}${methodName.capitalize}'; + } + + final parameters = _getAllParameters( + swaggerRequest: swaggerRequest, + ignoreHeaders: options.ignoreHeaders, + modelPostfix: options.modelPostfix, + swaggerPath: swaggerPath, + path: path, + requestType: requestType, + root: swaggerRoot, + options: options, + ); + + // Override request params + final temp = options.requestOverrideValueMap + .firstWhereOrNull((element) => element.url == path && element.method == 'get'); + // print(path); + if (temp != null) { + var name = temp.overriddenValue; + parameters.clear(); + parameters.add( + Parameter((p) => p + ..name = name.camelCase + ..named = true + ..type = Reference(name.capitalize) + ..annotations.add( + refer('Queries').call([]), + ) + ..named = true), + ); + } else if (parameters.length > 2) { + var temps = {}; + for (var item in _getParameter(swaggerRequest.parameters, options.ignoreHeaders, options.includePaths)) { + if (item.schema != null) { + var instance = item.schema!; + temps[item.name] = {'type': instance.type, 'required': item.isRequired}; + } + } + var name = effectiveMethodName + 'Request'; + requestClass[name] = {'type': 'object', 'properties': temps}; + + parameters.clear(); + parameters.add( + Parameter((p) => p + ..name = name.camelCase + ..named = true + ..type = Reference(name.capitalize) + ..annotations.add( + refer('Queries').call([]), + ) + ..named = true), + ); + } + + final returnTypeName = _getReturnTypeName( + responses: swaggerRequest.responses, + path: path, + methodName: effectiveMethodName, + modelPostfix: options.modelPostfix, + swaggerRoot: swaggerRoot, + overridenResponses: options.responseOverrideValueMap.asMap().map((key, value) => MapEntry(value.url, value)), + ); + + final returns = returnTypeName.isEmpty ? kFutureResponse : returnTypeName.asFutureResponse(); + + final hasOptionalBody = ['post', 'put', 'patch'].contains(requestType) && + swaggerRequest.parameters.none((p) => p.inParameter == kBody) && + swaggerRequest.requestBody == null; + + final method = Method((m) => m + ..requiredParameters.addAll(parameters) + ..docs.add(_getCommentsForMethod( + methodDescription: swaggerRequest.summary, + parameters: swaggerRequest.parameters, + options: options, + )) + ..name = effectiveMethodName + ..annotations.add(_getMethodAnnotation(requestType, path, hasOptionalBody)) + ..returns = Reference(returns)); + + if (_hasEnumProperties(method)) { + final privateMethod = _getPrivateMethod(method); + final publicMethod = _getPublicMethod(method); + methods.addAll([publicMethod, privateMethod]); + } else { + methods.add(method); + } + }); + }); + + return methods; + } + + bool _hasEnumProperties(Method method) { + return method.optionalParameters.any((p) => p.type!.symbol!.startsWith('enums') == true); + } + + Method _getPrivateMethod(Method method) { + final parameters = method.optionalParameters.map((p) { + if (p.type!.symbol!.startsWith('enums.')) { + return p.copyWith(type: Reference('String?')); + } + + return p; + }); + + return Method( + (m) => m + ..optionalParameters.addAll(parameters) + ..docs.addAll(method.docs) + ..name = '_${method.name}' + ..annotations.addAll(method.annotations) + ..returns = method.returns, + ); + } + + Method _getPublicMethod(Method method) { + final parameters = method.optionalParameters.map((p) => p.copyWith(annotations: [])); + + return Method( + (m) => m + ..optionalParameters.addAll(parameters) + ..docs.addAll(method.docs) + ..name = method.name + ..returns = method.returns + ..body = _generatePublicMethodReturn(parameters, method.name!), + ); + } + + Code _generatePublicMethodReturn(Iterable parameters, String publicMethodName) { + final parametersListString = parameters.map((p) { + if (p.type!.symbol!.startsWith('enums.')) { + final enumName = p.type!.symbol!.replaceFirst('enums.', '').replaceAll('?', ''); + + return '${p.name} : enums.\$${enumName}Map[${p.name}]'; + } + return '${p.name} : ${p.name}'; + }).join(', '); + + return Code('return _$publicMethodName($parametersListString);'); + } + + Expression _getMethodAnnotation( + String requestType, + String path, + bool hasOptionalBody, + ) { + return refer(requestType.pascalCase.toUpperCase()).call([literalString(path)], + //{kPath: literalString(path), if (hasOptionalBody) 'optionalBody': refer(true.toString())}, + {}); + } + + String _getCommentsForMethod({ + required String methodDescription, + required List parameters, + required GeneratorOptions options, + }) { + final parametersComments = parameters.map((SwaggerRequestParameter parameter) => _createSummaryParameters( + parameter.name, + parameter.description, + parameter.inParameter, + options, + )); + + final formattedDescription = methodDescription.split('\n').join('\n///'); + + return ['///$formattedDescription', ...parametersComments].where((String element) => element.isNotEmpty).join('\n'); + } + + String _createSummaryParameters( + String parameterName, String parameterDescription, String inParameter, GeneratorOptions options) { + if (inParameter == kHeader && options.ignoreHeaders) { + return ''; + } + if (parameterDescription.isNotEmpty) { + parameterDescription = parameterDescription.replaceAll(RegExp(r'\n|\r|\t'), ' '); + } else { + parameterDescription = ''; + } + + return '///@param $parameterName $parameterDescription'; + } + + Expression _getParameterAnnotation(SwaggerRequestParameter parameter) { + switch (parameter.inParameter) { + case kFormData: + return refer(kField).call([literalString(parameter.name.replaceAll('\$', ''))]); + case kBody: + return refer(kBody.pascalCase).call([]); + default: + //https://github.com/lejard-h/chopper/issues/295 + return refer(parameter.inParameter.pascalCase).call([literalString(parameter.name.replaceAll('\$', ''))]); + } + } + + String _getEnumParameterTypeName({ + required String parameterName, + required String path, + required String requestType, + }) { + final pathString = path.split('/').map((e) => e.replaceAll('}', '').replaceAll('{', '').pascalCase).join(); + + final result = '$pathString${requestType.pascalCase}${SwaggerModelsGenerator.getValidatedClassName(parameterName)}'; + + return result.asEnum(); + } + + bool _isEnumRefParameter(SwaggerRequestParameter parameter, SwaggerRoot root) { + final schemas = root.components?.schemas ?? {}; + schemas.addAll(root.definitions); + + final refs = [ + parameter.schema?.items?.ref.getRef(), + parameter.schema?.ref.getRef(), + parameter.items?.ref.getRef(), + ]; + final schema = schemas[refs.firstWhereOrNull((ref) => ref?.isNotEmpty == true)]; + + if (schema == null) { + return false; + } + + if (schema.type == kString && schema.enumValues.isNotEmpty) { + return true; + } + + return false; + } + + String _getParameterTypeName({ + required SwaggerRequestParameter parameter, + required String path, + required String requestType, + required String modelPostfix, + required SwaggerRoot root, + required List overridenRequests, + }) { + if (parameter.name == 'gender') { + // print(parameter.toJson()); + // print(parameter.schema?.toJson()); + } + final temp = + overridenRequests.firstWhereOrNull((element) => element.url == path && element.paramName == parameter.name); + if (temp != null) { + return temp.overriddenValue; + } + if (parameter.inParameter == kHeader) { + return _mapParameterName(kString, ''); + } else if (parameter.items?.enumValues.isNotEmpty == true || parameter.schema?.enumValues.isNotEmpty == true) { + return _getEnumParameterTypeName(parameterName: parameter.name, path: path, requestType: requestType); + } else if (parameter.items?.type.isNotEmpty == true) { + return _mapParameterName(parameter.items!.type, modelPostfix).asList(); + } else if (parameter.items?.ref.isNotEmpty == true) { + if (_isEnumRefParameter(parameter, root)) { + return parameter.items!.ref.getRef().asEnum(); + } + return _mapParameterName(parameter.items!.ref.getRef(), modelPostfix).asList(); + } else if (parameter.schema?.items?.ref.isNotEmpty == true) { + if (_isEnumRefParameter(parameter, root)) { + return parameter.schema!.items!.ref.getRef().asEnum(); + } + return (parameter.schema!.items!.ref.getRef() + modelPostfix).asList(); + } else if (parameter.schema?.ref.isNotEmpty == true) { + if (parameter.schema!.ref.toLowerCase().contains('enum')) { + return 'int'; + } + if (parameter.schema!.ref.toLowerCase().contains('short')) { + return 'int'; + } + if (_isEnumRefParameter(parameter, root)) { + return parameter.schema!.ref.getRef().asEnum(); + } + + if (parameter.schema!.items != null || parameter.schema!.type == kArray) { + return (parameter.schema!.ref.getRef() + modelPostfix).asList(); + } + return (parameter.schema!.ref.getRef() + modelPostfix); + } else if (parameter.schema?.type == kArray && parameter.schema?.items?.type.isNotEmpty == true) { + return _mapParameterName(parameter.schema!.items!.type, '').asList(); + } else if (parameter.schema?.anyOf.firstOrNull?.type.isNotEmpty == true) { + return _mapParameterName(parameter.schema!.anyOf.first.type, ''); + } + + final neededType = parameter.type.isNotEmpty ? parameter.type : parameter.schema?.type ?? kObject.pascalCase; + + return _mapParameterName(neededType, modelPostfix); + } + + String _mapParameterName(String name, String modelPostfix) { + return kBasicTypesMap[name] ?? name.pascalCase + modelPostfix; + } + + List _getParameter( + List parameters, bool ignoreHeaders, List excludeParams) { + return parameters + .where((element) => excludeParams.isEmpty || !excludeParams.contains(element.name.toLowerCase())) + .where((swaggerParameter) => ignoreHeaders ? swaggerParameter.inParameter != kHeader : true) + .where((swaggerParameter) => swaggerParameter.inParameter != kCookie) + .where((swaggerParameter) => swaggerParameter.inParameter.isNotEmpty) + .toList(); + } + + List _getAllParameters({ + required SwaggerRequest swaggerRequest, + required bool ignoreHeaders, + required String path, + required String requestType, + required String modelPostfix, + required SwaggerRoot root, + required GeneratorOptions options, + required SwaggerPath swaggerPath, + }) { + final definedParameters = {}; + definedParameters.addAll(root.parameters); + definedParameters.addAll(root.components?.parameters ?? {}); + + var excludeParams = options.excludeParams.map((e) => e.toLowerCase()).toList(); + + final parameters = [...swaggerRequest.parameters, ...swaggerPath.parameters] + .map((par) => definedParameters[par.ref.split('/').last] ?? par) + .toList(); + + final overridenRequests = options.requestOverrideValueMap; + ; + + final result = _getParameter(parameters, ignoreHeaders, excludeParams) + // .where((element) => excludeParams.isEmpty || !excludeParams.contains(element.name.toLowerCase())) + // .where((swaggerParameter) => ignoreHeaders ? swaggerParameter.inParameter != kHeader : true) + // .where((swaggerParameter) => swaggerParameter.inParameter != kCookie) + // .where((swaggerParameter) => swaggerParameter.inParameter.isNotEmpty) + .map( + (swaggerParameter) => Parameter( + (p) => p + ..name = swaggerParameter.name.asParameterName() + ..named = true + ..required = false + ..type = Reference( + _getParameterTypeName( + parameter: swaggerParameter, + path: path, + requestType: requestType, + modelPostfix: modelPostfix, + root: root, + overridenRequests: overridenRequests, + ), //.makeNullable(), + ) + ..named = true + ..annotations.add( + _getParameterAnnotation(swaggerParameter), + ) + ..defaultTo = _getHeaderDefaultValue(swaggerParameter, options), + ), + ) + .toList(); + + final requestBody = swaggerRequest.requestBody; + + if (requestBody != null) { + var typeName = ''; + + final temp = overridenRequests.firstWhereOrNull((element) => element.url == path && element.paramName == 'body'); + if (temp != null) { + typeName = temp.overriddenValue; + } else { + final ref = requestBody.ref; + if (ref.isNotEmpty) { + typeName = ref.getRef(); + + final requestBodyRef = root.components?.requestBodies[ref.getRef()]?.ref ?? ''; + + if (requestBodyRef.isNotEmpty == true) { + typeName = requestBodyRef.getRef(); + } + + typeName = SwaggerModelsGenerator.getValidatedClassName(typeName); + } + + final schema = requestBody.content?.schema; + + if (schema != null) { + if (schema.format == kBinary) { + typeName = kObject.pascalCase; + } else { + typeName = _getRequestBodyTypeName( + schema: schema, + modelPostfix: options.modelPostfix, + root: root, + ); + } + } + } + + if (typeName.isNotEmpty) { + result.add( + Parameter( + (p) => p + ..name = kBody + ..named = true + //..required = true + ..type = Reference(typeName //.makeNullable(), + ) + ..named = true + ..annotations.add( + refer(kBody.pascalCase).call([]), + ), + ), + ); + } + } + + return result.distinctParameters(); + } + + bool _isBasicTypeRef(String ref, SwaggerRoot root) { + final schemas = _getAllReusableObjects(root); + + final neededSchema = schemas[ref.getUnformattedRef()]; + + if (neededSchema == null) { + return false; + } + + return kBasicTypes.contains(neededSchema.type); + } + + bool _isEnumRef(String ref, SwaggerRoot root) { + final schemas = root.components?.schemas ?? {}; + schemas.addAll(root.definitions); + + final neededSchemaKey = schemas.keys.firstWhereOrNull((key) => key.getRef() == ref.getRef()); + + if (neededSchemaKey == null) { + return false; + } + + final neededSchema = schemas[neededSchemaKey]!; + + if (neededSchema.type == kString && neededSchema.enumValues.isNotEmpty) { + return true; + } + + return false; + } + + String _getRequestBodyTypeName({ + required SwaggerSchema schema, + required String modelPostfix, + required SwaggerRoot root, + }) { + if (schema.type.isNotEmpty) { + if (schema.type == kArray) { + final ref = schema.items?.ref.getRef() ?? ''; + + if (_isEnumRef(ref, root)) { + return ref.asEnum().asList(); + } + + if (_isBasicTypeRef(ref, root)) { + return kObject.pascalCase; + } + + if (ref.isNotEmpty) { + return SwaggerModelsGenerator.getValidatedClassName(ref.withPostfix(modelPostfix)).asList(); + } + + return ''; + } + + return kBasicTypesMap[schema.type] ?? schema.type; + } + + if (schema.ref.isNotEmpty) { + if (_isEnumRef(schema.ref, root)) { + return schema.ref.getRef().asEnum(); + } + + if (_isBasicTypeRef(schema.ref, root)) { + return kObject.pascalCase; + } + + return SwaggerModelsGenerator.getValidatedClassName(schema.ref.getRef().withPostfix(modelPostfix)); + } + + return ''; + } + + Code? _getHeaderDefaultValue(SwaggerRequestParameter swaggerParameter, GeneratorOptions options) { + final overridenValue = options.defaultHeaderValuesMap + .firstWhereOrNull((map) => map.headerName.toLowerCase() == swaggerParameter.name.toLowerCase()); + + if (overridenValue != null) { + return Code('\'${overridenValue.defaultValue}\''); + } + + return null; + } + + String _getRequestMethodName({ + required SwaggerRequest swaggerRequest, + required GeneratorOptions options, + required String path, + required String requestType, + }) { + return SwaggerModelsGenerator.generateRequestName(path, requestType); + } + + static SwaggerResponse? getSuccessedResponse({ + required Map responses, + }) { + return responses.entries + .firstWhereOrNull((responseEntry) => + successResponseCodes.contains(responseEntry.key) || + successDescriptions.contains(responseEntry.value.description)) + ?.value; + } + + String _getResponseModelName({ + required String path, + required String methodName, + required String modelPostfix, + }) { + return '${methodName.pascalCase}\$$kResponse$modelPostfix'; + } + + String? _getReturnTypeFromType(SwaggerResponse swaggerResponse, String modelPostfix) { + final responseType = swaggerResponse.schema?.type ?? ''; + if (responseType.isEmpty) { + return null; + } + + if (responseType == kArray) { + final itemsOriginalRef = swaggerResponse.schema?.items?.originalRef; + final itemsType = swaggerResponse.schema?.items?.type; + final itemsRef = swaggerResponse.schema?.items?.ref.getRef(); + + final arrayType = + [itemsRef, itemsOriginalRef, itemsType, kObject].firstWhere((element) => element?.isNotEmpty == true)!; + + final mappedArrayType = kBasicTypesMap[arrayType] ?? arrayType; + + if (mappedArrayType.isEmpty) { + return null; + } + + return _mapParameterName(mappedArrayType, modelPostfix).asList(); + } + + return kBasicTypesMap[responseType] ?? responseType + modelPostfix; + } + + String? _getReturnTypeFromSchema(SwaggerResponse swaggerResponse, String modelPostfix, SwaggerRoot root) { + final listRef = swaggerResponse.schema?.items?.ref ?? ''; + + if (listRef.isNotEmpty) { + return (listRef.getRef() + modelPostfix).asList(); + } + + final ref = swaggerResponse.schema?.ref ?? swaggerResponse.ref; + + if (ref.isNotEmpty) { + final allReusableObjects = _getAllReusableObjects(root); + final neededResponse = allReusableObjects[ref.getUnformattedRef()]; + + if (neededResponse == null) { + return kObject.pascalCase; + } + + if (neededResponse.ref.isNotEmpty) { + return kObject.pascalCase; + } + + return ref.getRef() + modelPostfix; + } + + return null; + } + + Map _getAllReusableObjects(SwaggerRoot root) { + final results = {}; + results.addAll(root.definitions); + results.addAll(root.components?.schemas ?? {}); + results.addAll(root.components?.responses ?? {}); + results.addAll(root.components?.requestBodies ?? {}); + + return results; + } + + String? _getReturnTypeFromOriginalRef(SwaggerResponse swaggerResponse, String modelPostfix) { + if (swaggerResponse.schema?.originalRef.isNotEmpty == true) { + return swaggerResponse.schema!.originalRef + modelPostfix; + } + + return null; + } + + String? _getReturnTypeFromContent({ + required SwaggerResponse swaggerResponse, + required String modelPostfix, + required SwaggerRoot swaggerRoot, + }) { + final content = swaggerResponse.content; + + if (content == null) { + return null; + } + + final ref = content.ref; + if (ref.isNotEmpty) { + final type = ref.getRef().withPostfix(modelPostfix); + return kBasicTypesMap[type] ?? type; + } + + final schemaRef = content.schema?.ref ?? ''; + if (schemaRef.isNotEmpty) { + final allRefs = _getAllReusableObjects(swaggerRoot); + final neededSchema = allRefs[schemaRef.getUnformattedRef()]; + + if (neededSchema == null) { + return kObject.pascalCase; + } + + if (kBasicTypes.contains(neededSchema.type)) { + return kObject.pascalCase; + } + + final typeName = SwaggerModelsGenerator.getValidatedClassName(schemaRef.getRef()).withPostfix(modelPostfix); + + if (neededSchema.type == kArray) { + return neededSchema.items?.ref.getRef().withPostfix(modelPostfix).asList(); + } + + return typeName; + } + + final responseType = content.responseType; + + if (responseType.isNotEmpty) { + if (responseType == kArray) { + final originalRef = swaggerResponse.schema?.items?.originalRef ?? ''; + + if (originalRef.isNotEmpty) { + return kBasicTypesMap[originalRef]?.asList(); + } + } + } + + final itemsRef = content.items?.ref ?? ''; + if (itemsRef.isNotEmpty) { + return kBasicTypesMap[itemsRef]?.withPostfix(modelPostfix).asList(); + } + + final schemaItemsRef = content.schema?.items?.ref ?? ''; + if (schemaItemsRef.isNotEmpty) { + final result = + SwaggerModelsGenerator.getValidatedClassName(schemaItemsRef.getRef()).withPostfix(modelPostfix).asList(); + return result; + } + + final contentSchemaType = content.schema?.type ?? ''; + if (contentSchemaType.isNotEmpty == true) { + return kBasicTypesMap[contentSchemaType]; + } + + if (responseType.isEmpty) { + return ''; + } + + return kBasicTypesMap[responseType] ?? responseType + modelPostfix; + } + + String _getReturnTypeName({ + required Map responses, + required Map overridenResponses, + required String path, + required String methodName, + required String modelPostfix, + required SwaggerRoot swaggerRoot, + }) { + if (overridenResponses.containsKey(path)) { + return overridenResponses[path]!.overriddenValue; + } + + final neededResponse = getSuccessedResponse( + responses: responses, + ); + + if (neededResponse == null) { + return ''; + } + + if (neededResponse.schema?.type == kObject && neededResponse.schema?.properties.isNotEmpty == true) { + return _getResponseModelName( + path: path, + methodName: methodName, + modelPostfix: modelPostfix, + ); + } + + final type = _getReturnTypeFromType(neededResponse, modelPostfix) ?? + _getReturnTypeFromSchema(neededResponse, modelPostfix, swaggerRoot) ?? + _getReturnTypeFromOriginalRef(neededResponse, modelPostfix) ?? + _getReturnTypeFromContent( + swaggerResponse: neededResponse, + modelPostfix: modelPostfix, + swaggerRoot: swaggerRoot, + ) ?? + ''; + + if (type.isNotEmpty) { + return type; + } + + return ''; + } +} diff --git a/api_automatic/lib/src/code_generators/v2/swagger_enums_generator_v2.dart b/api_automatic/lib/src/code_generators/v2/swagger_enums_generator_v2.dart new file mode 100644 index 0000000..e882cee --- /dev/null +++ b/api_automatic/lib/src/code_generators/v2/swagger_enums_generator_v2.dart @@ -0,0 +1,13 @@ +import 'dart:convert'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; + +class SwaggerEnumsGeneratorV2 extends SwaggerEnumsGenerator { + @override + String generate(String dartCode, String fileName) { + final dynamic map = jsonDecode(dartCode); + + final definitions = map['definitions'] as Map? ?? {}; + + return generateFromMap(dartCode, fileName, definitions, {}, {}); + } +} diff --git a/api_automatic/lib/src/code_generators/v2/swagger_models_generator_v2.dart b/api_automatic/lib/src/code_generators/v2/swagger_models_generator_v2.dart new file mode 100644 index 0000000..8a87b6e --- /dev/null +++ b/api_automatic/lib/src/code_generators/v2/swagger_models_generator_v2.dart @@ -0,0 +1,102 @@ +import 'dart:convert'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_enums_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +class SwaggerModelsGeneratorV2 extends SwaggerModelsGenerator { + @override + String generate(String dartCode, String fileName, GeneratorOptions options, Map requestClass) { + final dynamic map = jsonDecode(dartCode); + final definitions = map['definitions'] as Map?; + return generateBase(dartCode, fileName, options, definitions ?? {}, true, requestClass); + } + + @override + String generateResponses(String dartCode, String fileName, GeneratorOptions options) { + return ''; + } + + @override + String generateRequestBodies(String dartCode, String fileName, GeneratorOptions options) { + return ''; + } + + @override + List getAllEnumNames(String swaggerFile) { + final results = SwaggerEnumsGenerator.getEnumNamesFromRequests(swaggerFile); + + final swagger = jsonDecode(swaggerFile); + + final definitions = swagger['definitions'] as Map? ?? {}; + + if (definitions.isNotEmpty) { + definitions.forEach((className, map) { + final mapMap = map as Map; + if (mapMap.containsKey('enum')) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + + if (mapMap['type'] == 'array' && mapMap['items'] != null && mapMap['items']['enum'] != null) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + + final properties = map['properties'] as Map?; + + if (properties == null) { + return; + } + + properties.forEach((propertyName, propertyValue) { + var property = propertyValue as Map; + + if (property.containsKey('enum') || (property['items'] != null && property['items']['enum'] != null)) { + results.add(SwaggerEnumsGeneratorV2() + .generateEnumName(SwaggerModelsGenerator.getValidatedClassName(className), propertyName)); + } + }); + }); + } + + final resultsWithPrefix = results.map((element) { + return 'enums.$element'; + }).toList(); + + return resultsWithPrefix; + } + + @override + List getAllListEnumNames(String swaggerFile) { + final results = SwaggerEnumsGenerator.getEnumNamesFromRequests(swaggerFile); + + final swagger = jsonDecode(swaggerFile); + + final definitions = swagger['definitions'] as Map?; + + if (definitions != null) { + definitions.forEach((className, map) { + final mapMap = map as Map; + + if (mapMap['type'] == 'array' && mapMap['items'] != null && mapMap['items']['enum'] != null) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + }); + } + + final resultsWithPrefix = results.map((element) { + return 'enums.$element'; + }).toList(); + + return resultsWithPrefix; + } + + @override + String getExtendsString(Map map) { + return ''; + } +} diff --git a/api_automatic/lib/src/code_generators/v3/swagger_enums_generator_v3.dart b/api_automatic/lib/src/code_generators/v3/swagger_enums_generator_v3.dart new file mode 100644 index 0000000..f4abe81 --- /dev/null +++ b/api_automatic/lib/src/code_generators/v3/swagger_enums_generator_v3.dart @@ -0,0 +1,25 @@ +import 'dart:convert'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; + +class SwaggerEnumsGeneratorV3 extends SwaggerEnumsGenerator { + @override + String generate(String dartCode, String fileName) { + final dynamic map = jsonDecode(dartCode); + + final components = map['components'] as Map?; + final schemas = components == null + ? null + : components['schemas'] as Map?; + + final responses = components == null + ? null + : components['responses'] as Map?; + + final requestBodies = components == null + ? null + : components['requestBodies'] as Map?; + + return generateFromMap(dartCode, fileName, schemas ?? {}, responses ?? {}, + requestBodies ?? {}); + } +} diff --git a/api_automatic/lib/src/code_generators/v3/swagger_models_generator_v3.dart b/api_automatic/lib/src/code_generators/v3/swagger_models_generator_v3.dart new file mode 100644 index 0000000..85d1c03 --- /dev/null +++ b/api_automatic/lib/src/code_generators/v3/swagger_models_generator_v3.dart @@ -0,0 +1,256 @@ +import 'dart:convert'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v3/swagger_enums_generator_v3.dart'; +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:collection/collection.dart'; + +class SwaggerModelsGeneratorV3 extends SwaggerModelsGenerator { + @override + String generate(String dartCode, String fileName, GeneratorOptions options, Map requestClass) { + final dynamic map = jsonDecode(dartCode); + + final components = map['components'] as Map?; + final schemas = components == null ? null : components['schemas'] as Map?; + + return generateBase(dartCode, fileName, options, schemas ?? {}, true, requestClass); + } + + @override + String generateResponses(String dartCode, String fileName, GeneratorOptions options) { + final dynamic map = jsonDecode(dartCode); + + final components = map['components'] as Map?; + final responses = components == null ? null : components['responses'] as Map?; + + if (responses == null) { + return ''; + } + + var result = {}; + + final allModelNames = components!.containsKey('schemas') + ? (components['schemas'] as Map) + .keys + .map((e) => SwaggerModelsGenerator.getValidatedClassName(e)) + : []; + + responses.keys.forEach((key) { + if (!allModelNames.contains(key)) { + final response = responses[key] as Map?; + + final content = response == null ? null : response['content'] as Map?; + + final firstContent = content == null ? null : content.entries.firstOrNull?.value as Map?; + + final schema = firstContent == null ? null : firstContent['schema']; + + if (schema != null && schema['\$ref'] == null) { + result.addAll({key: schema}); + } + } + }); + + return generateBase(dartCode, fileName, options, result, false, {}); + } + + @override + String generateRequestBodies(String dartCode, String fileName, GeneratorOptions options) { + final dynamic map = jsonDecode(dartCode); + + final components = map['components'] as Map?; + final requestBodies = components == null ? null : components['requestBodies'] as Map?; + + if (requestBodies == null) { + return ''; + } + + var result = {}; + + final allModelNames = components!.containsKey('schemas') + ? (components['schemas'] as Map) + .keys + .map((e) => SwaggerModelsGenerator.getValidatedClassName(e)) + : []; + + requestBodies.keys.forEach((key) { + if (!allModelNames.contains(key)) { + final response = requestBodies[key] as Map?; + + final content = response == null ? null : response['content'] as Map; + + final firstContent = content == null ? null : content.entries.firstOrNull?.value as Map?; + + final schema = firstContent == null ? null : firstContent['schema']; + + if (schema != null) { + result.addAll({key: schema}); + } + } + }); + + return generateBase(dartCode, fileName, options, result, false, {}); + } + + @override + List getAllEnumNames(String swaggerFile) { + final results = SwaggerEnumsGenerator.getEnumNamesFromRequests(swaggerFile); + + final swagger = jsonDecode(swaggerFile); + + final components = swagger['components'] as Map?; + + final schemas = components == null ? null : components['schemas'] as Map?; + + final responses = components == null ? null : components['responses'] as Map?; + + final requestBodies = components == null ? null : components['requestBodies'] as Map?; + + if (schemas != null) { + schemas.forEach((className, map) { + final mapMap = map as Map; + if (mapMap.containsKey('enum')) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + + if (mapMap['type'] == 'array' && mapMap['items'] != null && mapMap['items']['enum'] != null) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + + Map? properties; + + if (mapMap.containsKey('allOf')) { + final allOf = mapMap['allOf'] as List; + var propertiesContainer = allOf.firstWhereOrNull((e) => (e as Map).containsKey('properties')) + as Map?; + + if (propertiesContainer != null) { + properties = propertiesContainer['properties'] as Map?; + } else { + properties = map['properties'] as Map?; + } + } else { + properties = map['properties'] as Map?; + } + + if (properties == null) { + return; + } + + properties.forEach((propertyName, propertyValue) { + var property = propertyValue as Map; + + if (property.containsKey('enum') || (property['items'] != null && property['items']['enum'] != null)) { + results.add(SwaggerModelsGenerator.getValidatedClassName(SwaggerEnumsGeneratorV3() + .generateEnumName(SwaggerModelsGenerator.getValidatedClassName(className), propertyName))); + } + }); + }); + } + + if (responses != null) { + responses.forEach((className, map) { + final response = responses[className]; + final content = response['content'] as Map?; + final firstContent = content?.entries.firstOrNull?.value; + final schema = firstContent == null ? null : firstContent['schema']; + if (schema != null && (schema as Map).containsKey('enum')) { + results.add(className.capitalize); + return; + } + final properties = schema == null ? null : schema['properties'] as Map?; + + if (properties == null) { + return; + } + + properties.forEach((propertyName, propertyValue) { + var property = propertyValue as Map; + + if (property.containsKey('enum') || (property['items'] != null && property['items']['enum'] != null)) { + results.add(SwaggerEnumsGeneratorV3().generateEnumName(className, propertyName)); + } + }); + }); + } + + if (requestBodies != null) { + requestBodies.forEach((className, map) { + final response = requestBodies[className]; + final content = response['content'] as Map; + final firstContent = content.entries.firstOrNull?.value; + final schema = firstContent == null ? null : firstContent['schema']; + if (schema != null && (schema as Map).containsKey('enum')) { + results.add(className.capitalize); + return; + } + final properties = schema == null ? null : schema['properties'] as Map?; + + if (properties == null) { + return; + } + + properties.forEach((propertyName, propertyValue) { + var property = propertyValue as Map; + + if (property.containsKey('enum') || (property['items'] != null && property['items']['enum'] != null)) { + results.add(SwaggerEnumsGeneratorV3().generateEnumName(className, propertyName)); + } + }); + }); + } + + final resultsWithPrefix = results.map((element) { + return 'enums.$element'; + }).toList(); + + return resultsWithPrefix; + } + + @override + List getAllListEnumNames(String swaggerFile) { + final results = SwaggerEnumsGenerator.getEnumNamesFromRequests(swaggerFile); + + final swagger = jsonDecode(swaggerFile); + + final components = swagger['components'] as Map?; + + final schemas = components == null ? null : components['schemas'] as Map?; + + if (schemas != null) { + schemas.forEach((className, map) { + final mapMap = map as Map; + + if (mapMap['type'] == 'array' && mapMap['items'] != null && mapMap['items']['enum'] != null) { + results.add(SwaggerModelsGenerator.getValidatedClassName(className.capitalize)); + return; + } + }); + } + + final resultsWithPrefix = results.map((element) { + return 'enums.$element'; + }).toList(); + + return resultsWithPrefix; + } + + @override + String getExtendsString(Map map) { + if (map.containsKey('allOf')) { + final allOf = map['allOf'] as List; + final refItem = allOf.firstWhere((m) => (m as Map).containsKey('\$ref')); + + final ref = refItem['\$ref'].toString().split('/').last; + + final className = SwaggerModelsGenerator.getValidatedClassName(ref); + + return 'extends $className'; + } + + return ''; + } +} diff --git a/api_automatic/lib/src/definitions.dart b/api_automatic/lib/src/definitions.dart new file mode 100644 index 0000000..575e223 --- /dev/null +++ b/api_automatic/lib/src/definitions.dart @@ -0,0 +1 @@ +const String converterClassEnding = 'JsonDecoderMappings'; diff --git a/api_automatic/lib/src/exception_words.dart b/api_automatic/lib/src/exception_words.dart new file mode 100644 index 0000000..0a35960 --- /dev/null +++ b/api_automatic/lib/src/exception_words.dart @@ -0,0 +1,57 @@ +/// List of all exception words in Dart language +List exceptionWords = [ + 'abstract', + 'continue', + 'false', + 'new', + 'this', + 'as', + 'default', + 'final', + 'null', + 'throw', + 'assert', + 'deferred', + 'finnaly', + 'operator', + 'true', + 'async', + 'dynamic', + 'get', + 'rethrow', + 'typedef', + 'await', + 'else', + 'if', + 'return', + 'var', + 'break', + 'enum', + 'implements', + 'set', + 'void', + 'case', + 'export', + 'import', + 'static', + 'while', + 'catch', + 'external', + 'in', + 'super', + 'with', + 'class', + 'extends', + 'is', + 'switch', + 'yield', + 'const', + 'factory', + 'library', + 'sync', + 'do', + 'for', + 'part', + 'try', + 'client', +]; diff --git a/api_automatic/lib/src/extensions/file_name_extensions.dart b/api_automatic/lib/src/extensions/file_name_extensions.dart new file mode 100644 index 0000000..6b78f24 --- /dev/null +++ b/api_automatic/lib/src/extensions/file_name_extensions.dart @@ -0,0 +1,19 @@ +import 'package:swagger_dart_code_generator/src/extensions/string_extension.dart'; + +String getClassNameFromFileName(String file) { + final name = file.split('.').first.replaceAll('-', '_'); + final result = name.split('_').map((String e) => e.capitalize); + return result.join(); +} + +String getFileNameWithoutExtension(String file) { + return file.split('.').first; +} + +String getFileNameBase(String filePath) { + final fileName = filePath.split('/').last.replaceAll('-', '_'); + + final lastDot = fileName.lastIndexOf('.'); + + return fileName.substring(0, lastDot); +} diff --git a/api_automatic/lib/src/extensions/parameter_extensions.dart b/api_automatic/lib/src/extensions/parameter_extensions.dart new file mode 100644 index 0000000..d6ed88e --- /dev/null +++ b/api_automatic/lib/src/extensions/parameter_extensions.dart @@ -0,0 +1,42 @@ +import 'package:code_builder/code_builder.dart'; + +extension ParameterExtension on Parameter { + Parameter copyWith({ + Reference? type, + List? annotations, + String? name, + }) => + Parameter( + (p) => p + ..name = name ?? this.name + ..named = named + ..required = required + ..type = type ?? this.type + ..named = named + ..defaultTo = defaultTo + ..annotations.addAll(annotations ?? this.annotations), + ); +} + +extension ParameterListExtension on List { + List distinctParameters() { + final allParameterNames = []; + final results = []; + + for (var element in this) { + if (allParameterNames.contains(element.name)) { + var newName = element.name; + while (allParameterNames.contains(newName)) { + newName += '\$'; + } + allParameterNames.add(newName); + results.add(element.copyWith(name: newName)); + } else { + allParameterNames.add(element.name); + results.add(element); + } + } + + return results; + } +} diff --git a/api_automatic/lib/src/extensions/string_extension.dart b/api_automatic/lib/src/extensions/string_extension.dart new file mode 100644 index 0000000..5052571 --- /dev/null +++ b/api_automatic/lib/src/extensions/string_extension.dart @@ -0,0 +1,52 @@ +import 'package:recase/recase.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; + +extension CapitalizeExtension on String { + String get capitalize { + return isEmpty ? this : (this[0].toUpperCase() + substring(1)); + } + + String get lower { + return isEmpty ? this : (this[0].toLowerCase() + substring(1)); + } + + bool get isUpper { + return this == toUpperCase() && this != toLowerCase(); + } +} + +extension TypeExtension on String { + String makeNullable() { + if (endsWith('?')) { + return this; + } + + return '$this?'; + } + + String getRef() => split('/').last.pascalCase; + + String getUnformattedRef() => split('/').last; + + String withPostfix(String postfix) => '${this}$postfix'; + + String asList() => 'List<$this>'; + + String asEnum() => 'enums.$this'; + + String asFutureResponse() => 'Future<$this>'; + + String asParameterName() { + return SwaggerModelsGenerator.getValidatedParameterName(this); + } + + String asParameterType() { + if (isEmpty) { + return 'dynamic'; + } + + final result = split('-').map((String str) => str == str.capitalize).toList().join(); + + return result; + } +} diff --git a/api_automatic/lib/src/models/generator_options.dart b/api_automatic/lib/src/models/generator_options.dart new file mode 100644 index 0000000..d766e97 --- /dev/null +++ b/api_automatic/lib/src/models/generator_options.dart @@ -0,0 +1,204 @@ +import 'package:json_annotation/json_annotation.dart'; +part 'generator_options.g2.dart'; + +@JsonSerializable(fieldRename: FieldRename.snake, anyMap: true) +class GeneratorOptions { + /// Instantiate generator options. + GeneratorOptions({ + this.withBaseUrl = true, + this.withConverter = true, + this.ignoreHeaders = false, + this.separateModels = false, + this.useDefaultNullForLists = false, + this.buildOnlyModels = false, + this.defaultValuesMap = const [], + this.defaultHeaderValuesMap = const [], + this.responseOverrideValueMap = const [], + required this.inputFolder, + required this.outputFolder, + this.enumsCaseSensitive = true, + this.useRequiredAttributeForHeaders = true, + this.useInheritance = true, + this.includeIfNull, + this.modelPostfix = '', + this.includePaths = const [], + this.excludePaths = const [], + this.excludeParams = const [], + this.defaultApiVersion = '1.0', + this.customApiVersion = const [], + this.urlParterns = const [], + this.requestOverrideValueMap = const [], + this.customModelPath = const [], + }); + + /// Build options from a JSON map. + factory GeneratorOptions.fromJson(Map json) => _$GeneratorOptionsFromJson(json); + + @JsonKey(defaultValue: true) + final bool withBaseUrl; + + @JsonKey(defaultValue: true) + final bool withConverter; + + @JsonKey(defaultValue: false) + final bool separateModels; + + @JsonKey(defaultValue: true) + final bool useRequiredAttributeForHeaders; + + @JsonKey(defaultValue: false) + final bool ignoreHeaders; + + @JsonKey(defaultValue: true) + final bool useInheritance; + + @JsonKey(defaultValue: false) + final bool enumsCaseSensitive; + + @JsonKey(defaultValue: null) + final bool? includeIfNull; + + @JsonKey(defaultValue: '') + final String inputFolder; + + @JsonKey(defaultValue: '') + final String outputFolder; + + @JsonKey(defaultValue: false) + final bool useDefaultNullForLists; + + @JsonKey(defaultValue: false) + final bool buildOnlyModels; + + @JsonKey(defaultValue: '') + final String modelPostfix; + + @JsonKey(defaultValue: []) + final List defaultValuesMap; + + @JsonKey(defaultValue: []) + final List defaultHeaderValuesMap; + + @JsonKey(defaultValue: []) + final List responseOverrideValueMap; + + @JsonKey(defaultValue: []) + final List includePaths; + + @JsonKey(defaultValue: []) + final List excludePaths; + + @JsonKey(defaultValue: []) + final List excludeParams; + + @JsonKey(defaultValue: '1.0') + final String defaultApiVersion; + + @JsonKey(defaultValue: []) + final List customApiVersion; + + @JsonKey(defaultValue: '') + final List urlParterns; + + @JsonKey(defaultValue: []) + final List requestOverrideValueMap; + + @JsonKey(defaultValue: '') + final List customModelPath; + + /// Convert this options instance to JSON. + Map toJson() => _$GeneratorOptionsToJson(this); +} + +@JsonSerializable(fieldRename: FieldRename.snake) +class DefaultValueMap { + DefaultValueMap({required this.typeName, required this.defaultValue}); + + /// Build a default value map from a JSON map. + factory DefaultValueMap.fromJson(Map json) => _$DefaultValueMapFromJson(json); + + @JsonKey(defaultValue: '') + final String typeName; + + @JsonKey(defaultValue: '') + final String defaultValue; + + /// Convert this default value map instance to JSON. + Map toJson() => _$DefaultValueMapToJson(this); +} + +@JsonSerializable(fieldRename: FieldRename.snake) +class ResponseOverrideValueMap { + ResponseOverrideValueMap({required this.url, required this.method, required this.overriddenValue}); + + /// Build a default value map from a JSON map. + factory ResponseOverrideValueMap.fromJson(Map json) => _$ResponseOverrideValueMapFromJson(json); + + @JsonKey(defaultValue: '') + final String url; + + @JsonKey(defaultValue: '') + final String method; + + @JsonKey(defaultValue: '') + final String overriddenValue; + + /// Convert this default value map instance to JSON. + Map toJson() => _$ResponseOverrideValueMapToJson(this); +} + +@JsonSerializable(fieldRename: FieldRename.snake) +class RequestOverrideValueMap { + RequestOverrideValueMap( + {required this.url, required this.method, required this.overriddenValue, required this.paramName}); + + /// Build a default value map from a JSON map. + factory RequestOverrideValueMap.fromJson(Map json) => _$RequestOverrideValueMapFromJson(json); + + @JsonKey(defaultValue: '') + final String url; + + @JsonKey(defaultValue: '') + final String paramName; + + @JsonKey(defaultValue: '') + final String method; + + @JsonKey(defaultValue: '') + final String overriddenValue; + + /// Convert this default value map instance to JSON. + Map toJson() => _$RequestOverrideValueMapToJson(this); +} + +@JsonSerializable(fieldRename: FieldRename.snake) +class CustomApiVersion { + CustomApiVersion({required this.version, required this.urls}); + + /// Build a default value map from a JSON map. + factory CustomApiVersion.fromJson(Map json) => _$CustomApiVersionFromJson(json); + + @JsonKey(defaultValue: '') + final String version; + + @JsonKey(defaultValue: []) + final List urls; + + /// Convert this default value map instance to JSON. + Map toJson() => _$CustomApiVersionToJson(this); +} + +@JsonSerializable(fieldRename: FieldRename.snake) +class DefaultHeaderValueMap { + DefaultHeaderValueMap({required this.headerName, required this.defaultValue}); + + @JsonKey(defaultValue: '') + final String headerName; + + @JsonKey(defaultValue: '') + final String defaultValue; + + Map toJson() => _$DefaultHeaderValueMapToJson(this); + + factory DefaultHeaderValueMap.fromJson(Map json) => _$DefaultHeaderValueMapFromJson(json); +} diff --git a/api_automatic/lib/src/models/generator_options.g2.dart b/api_automatic/lib/src/models/generator_options.g2.dart new file mode 100644 index 0000000..6aa4f65 --- /dev/null +++ b/api_automatic/lib/src/models/generator_options.g2.dart @@ -0,0 +1,131 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'generator_options.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +GeneratorOptions _$GeneratorOptionsFromJson(Map json) => GeneratorOptions( + withBaseUrl: json['with_base_url'] as bool? ?? true, + withConverter: json['with_converter'] as bool? ?? true, + ignoreHeaders: json['ignore_headers'] as bool? ?? false, + separateModels: json['separate_models'] as bool? ?? false, + useDefaultNullForLists: json['use_default_null_for_lists'] as bool? ?? false, + buildOnlyModels: json['build_only_models'] as bool? ?? false, + defaultValuesMap: (json['default_values_map'] as List?) + ?.map((e) => DefaultValueMap.fromJson(Map.from(e as Map))) + .toList() ?? + [], + defaultHeaderValuesMap: (json['default_header_values_map'] as List?) + ?.map((e) => DefaultHeaderValueMap.fromJson(Map.from(e as Map))) + .toList() ?? + [], + responseOverrideValueMap: (json['response_override_value_map'] as List?) + ?.map((e) => ResponseOverrideValueMap.fromJson(Map.from(e as Map))) + .toList() ?? + [], + inputFolder: json['input_folder'] as String? ?? '', + outputFolder: json['output_folder'] as String? ?? '', + enumsCaseSensitive: json['enums_case_sensitive'] as bool? ?? false, + useRequiredAttributeForHeaders: json['use_required_attribute_for_headers'] as bool? ?? true, + useInheritance: json['use_inheritance'] as bool? ?? true, + includeIfNull: json['include_if_null'] as bool?, + modelPostfix: json['model_postfix'] as String? ?? '', + includePaths: (json['include_paths'] as List?)?.map((e) => e as String).toList() ?? [], + excludePaths: (json['exclude_paths'] as List?)?.map((e) => e as String).toList() ?? [], + excludeParams: (json['exclude_params'] as List?)?.map((e) => e as String).toList() ?? [], + defaultApiVersion: json['default_api_version'] as String? ?? '1.0', + customApiVersion: (json['custom_api_version'] as List?) + ?.map((e) => CustomApiVersion.fromJson(Map.from(e as Map))) + .toList() ?? + [], + urlParterns: (json['url_parterns'] as List?)?.map((e) => e as String).toList() ?? [], + requestOverrideValueMap: (json['request_override_value_map'] as List?) + ?.map((e) => RequestOverrideValueMap.fromJson(Map.from(e as Map))) + .toList() ?? + [], + customModelPath: (json['custom_model_path'] as List?)?.map((e) => e as String).toList() ?? [], + ); + +Map _$GeneratorOptionsToJson(GeneratorOptions instance) => { + 'with_base_url': instance.withBaseUrl, + 'with_converter': instance.withConverter, + 'separate_models': instance.separateModels, + 'use_required_attribute_for_headers': instance.useRequiredAttributeForHeaders, + 'ignore_headers': instance.ignoreHeaders, + 'use_inheritance': instance.useInheritance, + 'enums_case_sensitive': instance.enumsCaseSensitive, + 'include_if_null': instance.includeIfNull, + 'input_folder': instance.inputFolder, + 'output_folder': instance.outputFolder, + 'use_default_null_for_lists': instance.useDefaultNullForLists, + 'build_only_models': instance.buildOnlyModels, + 'model_postfix': instance.modelPostfix, + 'default_values_map': instance.defaultValuesMap, + 'default_header_values_map': instance.defaultHeaderValuesMap, + 'response_override_value_map': instance.responseOverrideValueMap, + 'include_paths': instance.includePaths, + 'exclude_paths': instance.excludePaths, + 'exclude_params': instance.excludeParams, + 'default_api_version': instance.defaultApiVersion, + 'url_parterns': instance.urlParterns, + }; + +DefaultValueMap _$DefaultValueMapFromJson(Map json) => DefaultValueMap( + typeName: json['type_name'] as String? ?? '', + defaultValue: json['default_value'] as String? ?? '', + ); + +Map _$DefaultValueMapToJson(DefaultValueMap instance) => { + 'type_name': instance.typeName, + 'default_value': instance.defaultValue, + }; + +ResponseOverrideValueMap _$ResponseOverrideValueMapFromJson(Map json) => ResponseOverrideValueMap( + url: json['url'] as String? ?? '', + method: json['method'] as String? ?? '', + overriddenValue: json['overridden_value'] as String? ?? '', + ); + +Map _$ResponseOverrideValueMapToJson(ResponseOverrideValueMap instance) => { + 'url': instance.url, + 'method': instance.method, + 'overridden_value': instance.overriddenValue, + }; + +RequestOverrideValueMap _$RequestOverrideValueMapFromJson(Map json) => RequestOverrideValueMap( + url: json['url'] as String? ?? '', + method: json['method'] as String? ?? '', + overriddenValue: json['overridden_value'] as String? ?? '', + paramName: json['param_name'] as String? ?? '', + ); + +Map _$RequestOverrideValueMapToJson(RequestOverrideValueMap instance) => { + 'url': instance.url, + 'method': instance.method, + 'overridden_value': instance.overriddenValue, + 'param_name': instance.paramName, + }; + +DefaultHeaderValueMap _$DefaultHeaderValueMapFromJson(Map json) => DefaultHeaderValueMap( + headerName: json['header_name'] as String? ?? '', + defaultValue: json['default_value'] as String? ?? '', + ); + +Map _$DefaultHeaderValueMapToJson(DefaultHeaderValueMap instance) => { + 'header_name': instance.headerName, + 'default_value': instance.defaultValue, + }; + +CustomApiVersion _$CustomApiVersionFromJson(Map json) => CustomApiVersion( + version: json['version'] as String? ?? '', + urls: json['urls'] != null + ? (json['urls'].toString().split(',').where((element) => element.isNotEmpty).toList()) + : [], + ); + +Map _$CustomApiVersionToJson(CustomApiVersion instance) => { + 'version': instance.version, + 'urls': instance.urls, + }; diff --git a/api_automatic/lib/src/swagger_code_generator.dart b/api_automatic/lib/src/swagger_code_generator.dart new file mode 100644 index 0000000..cad1137 --- /dev/null +++ b/api_automatic/lib/src/swagger_code_generator.dart @@ -0,0 +1,90 @@ +import 'dart:convert'; + +import 'package:code_builder/code_builder.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_additions_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_converter_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/swagger_requests_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_enums_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_models_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v3/swagger_enums_generator_v3.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v3/swagger_models_generator_v3.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +class SwaggerCodeGenerator { + final Map _enumsMap = { + 2: SwaggerEnumsGeneratorV2(), + 3: SwaggerEnumsGeneratorV3() + }; + + final Map _modelsMap = { + 2: SwaggerModelsGeneratorV2(), + 3: SwaggerModelsGeneratorV3() + }; + + int _getApiVersion(String dartCode) { + final dynamic map = jsonDecode(dartCode); + + final openApi = map['openapi'] as String?; + return openApi != null ? 3 : 2; + } + + String generateIndexes(String dartCode, Map> buildExtensions, GeneratorOptions options) => + _getSwaggerAdditionsGenerator(dartCode, options).generateIndexes(buildExtensions); + + String generateConverterMappings( + String dartCode, Map> buildExtensions, bool hasModels, GeneratorOptions options) => + _getSwaggerAdditionsGenerator(dartCode, options).generateConverterMappings(buildExtensions, hasModels, options); + + String generateImportsContent( + String dartCode, + String swaggerFileName, + bool hasModels, + bool buildOnlyModels, + bool hasEnums, + bool separateModels, + GeneratorOptions options, + ) => + _getSwaggerAdditionsGenerator(dartCode, options).generateImportsContent( + swaggerFileName, hasModels, buildOnlyModels, hasEnums, separateModels, options.customModelPath); + + String generateConverter(String dartCode, String fileName, GeneratorOptions options) => + _getSwaggerConverterGenerator(dartCode).generate(dartCode, fileName, options); + + String generateResponses(String dartCode, String fileName, GeneratorOptions options) => + _getSwaggerModelsGenerator(dartCode).generateResponses(dartCode, fileName, options); + + String generateRequestBodies(String dartCode, String fileName, GeneratorOptions options) => + _getSwaggerModelsGenerator(dartCode).generateRequestBodies(dartCode, fileName, options); + + String generateEnums(String dartCode, String fileName) => + _getSwaggerEnumsGenerator(dartCode).generate(dartCode, fileName); + + String generateModels( + String dartCode, String fileName, GeneratorOptions options, Map requestClass) => + _getSwaggerModelsGenerator(dartCode).generate(dartCode, fileName, options, requestClass); + + String generateRequests(String dartCode, String className, String fileName, GeneratorOptions options, + Map requestClass) => + _getSwaggerRequestsGenerator(dartCode).generate( + code: dartCode, className: className, fileName: fileName, options: options, requestClass: requestClass); + + String generateCustomJsonConverter(String dartCode, String fileName, GeneratorOptions options) => + _getSwaggerAdditionsGenerator(dartCode, options).generateCustomJsonConverter(fileName, options); + + String generateDateToJson(String dartCode, GeneratorOptions options) => + _getSwaggerAdditionsGenerator(dartCode, options).generateDateToJson(); + + SwaggerAdditionsGenerator _getSwaggerAdditionsGenerator(String dartCode, GeneratorOptions options) => + SwaggerAdditionsGenerator(); + + SwaggerConverterGenerator _getSwaggerConverterGenerator(String dartCode) => SwaggerConverterGenerator(); + + SwaggerEnumsGenerator _getSwaggerEnumsGenerator(String dartCode) => _enumsMap[_getApiVersion(dartCode)]!; + + SwaggerModelsGenerator _getSwaggerModelsGenerator(String dartCode) => _modelsMap[_getApiVersion(dartCode)]!; + + SwaggerRequestsGenerator _getSwaggerRequestsGenerator(String dartCode) => SwaggerRequestsGenerator(); +} diff --git a/api_automatic/lib/src/swagger_models/requests/parameter_item.dart b/api_automatic/lib/src/swagger_models/requests/parameter_item.dart new file mode 100644 index 0000000..1083da5 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/parameter_item.dart @@ -0,0 +1,23 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'parameter_item.g2.dart'; + +@JsonSerializable() +class ParameterItem { + ParameterItem( + {this.type = '', this.enumValues = const [], this.defaultValue = ''}); + + factory ParameterItem.fromJson(Map json) => + _$ParameterItemFromJson(json); + + @JsonKey(name: 'type', defaultValue: '') + String type; + + @JsonKey(name: 'enum', defaultValue: []) + List enumValues; + + @JsonKey(name: 'default', defaultValue: '') + String defaultValue; + + Map toJson() => _$ParameterItemToJson(this); +} diff --git a/api_automatic/lib/src/swagger_models/requests/parameter_item.g2.dart b/api_automatic/lib/src/swagger_models/requests/parameter_item.g2.dart new file mode 100644 index 0000000..49d1100 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/parameter_item.g2.dart @@ -0,0 +1,24 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'parameter_item.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ParameterItem _$ParameterItemFromJson(Map json) { + return ParameterItem( + type: json['type'] as String? ?? '', + enumValues: + (json['enum'] as List?)?.map((e) => e as String).toList() ?? + [], + defaultValue: json['default'] as String? ?? '', + ); +} + +Map _$ParameterItemToJson(ParameterItem instance) => + { + 'type': instance.type, + 'enum': instance.enumValues, + 'default': instance.defaultValue, + }; diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request.dart new file mode 100644 index 0000000..fe6c1dd --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request.dart @@ -0,0 +1,94 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +import '../responses/swagger_response.dart'; +import 'swagger_request_parameter.dart'; + +part 'swagger_request.g2.dart'; + +@JsonSerializable() +class SwaggerRequest { + SwaggerRequest({ + this.summary = '', + this.description = '', + this.operationId = '', + this.consumes = const [], + this.responses = const {}, + this.parameters = const [], + this.produces = const [], + this.requestBody, + }); + + @JsonKey(name: 'summary', defaultValue: '') + String summary; + + @JsonKey(name: 'description', defaultValue: '') + String description; + + @JsonKey(name: 'operationId', defaultValue: '') + String operationId; + + @JsonKey(name: 'consumes', defaultValue: []) + List consumes; + + @JsonKey(name: 'produces', defaultValue: []) + List produces; + + @JsonKey(name: 'responses', defaultValue: {}) + Map responses; + + @JsonKey(name: 'parameters', defaultValue: []) + List parameters; + + @JsonKey(name: 'requestBody') + RequestBody? requestBody; + + Map toJson() => _$SwaggerRequestToJson(this); + + factory SwaggerRequest.fromJson(Map json) => + _$SwaggerRequestFromJson(json); +} + +@JsonSerializable() +class RequestBody { + @JsonKey(name: 'content', fromJson: _contentFromJson) + RequestContent? content; + + @JsonKey(name: '\$ref', defaultValue: '') + String ref; + + RequestBody({ + this.content, + this.ref = '', + }); + + Map toJson() => _$RequestBodyToJson(this); + + factory RequestBody.fromJson(Map json) => + _$RequestBodyFromJson(json); +} + +RequestContent? _contentFromJson(Map? map) { + if (map == null || map.isEmpty) { + return null; + } + + final content = map.values.first as Map; + + return RequestContent.fromJson(content); +} + +@JsonSerializable() +class RequestContent { + RequestContent({ + this.schema, + }); + + @JsonKey(name: 'schema') + final SwaggerSchema? schema; + + Map toJson() => _$RequestContentToJson(this); + + factory RequestContent.fromJson(Map json) => + _$RequestContentFromJson(json); +} diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request.g2.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request.g2.dart new file mode 100644 index 0000000..785668b --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request.g2.dart @@ -0,0 +1,74 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerRequest _$SwaggerRequestFromJson(Map json) { + return SwaggerRequest( + summary: json['summary'] as String? ?? '', + description: json['description'] as String? ?? '', + operationId: json['operationId'] as String? ?? '', + consumes: (json['consumes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + responses: (json['responses'] as Map?)?.map( + (k, e) => + MapEntry(k, SwaggerResponse.fromJson(e as Map)), + ) ?? + {}, + parameters: (json['parameters'] as List?) + ?.map((e) => + SwaggerRequestParameter.fromJson(e as Map)) + .toList() ?? + [], + produces: (json['produces'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + requestBody: json['requestBody'] == null + ? null + : RequestBody.fromJson(json['requestBody'] as Map), + ); +} + +Map _$SwaggerRequestToJson(SwaggerRequest instance) => + { + 'summary': instance.summary, + 'description': instance.description, + 'operationId': instance.operationId, + 'consumes': instance.consumes, + 'produces': instance.produces, + 'responses': instance.responses, + 'parameters': instance.parameters, + 'requestBody': instance.requestBody, + }; + +RequestBody _$RequestBodyFromJson(Map json) { + return RequestBody( + content: _contentFromJson(json['content'] as Map?), + ref: json['\$ref'] as String? ?? '', + ); +} + +Map _$RequestBodyToJson(RequestBody instance) => + { + 'content': instance.content, + '\$ref': instance.ref, + }; + +RequestContent _$RequestContentFromJson(Map json) { + return RequestContent( + schema: json['schema'] == null + ? null + : SwaggerSchema.fromJson(json['schema'] as Map), + ); +} + +Map _$RequestContentToJson(RequestContent instance) => + { + 'schema': instance.schema, + }; diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request_items.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request_items.dart new file mode 100644 index 0000000..bcc4f6c --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request_items.dart @@ -0,0 +1,26 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'swagger_request_items.g2.dart'; + +@JsonSerializable() +class SwaggerRequestItems { + SwaggerRequestItems({ + required this.type, + required this.enumValues, + required this.ref, + }); + + @JsonKey(name: 'type', defaultValue: '') + String type; + + @JsonKey(name: 'enum', defaultValue: []) + List enumValues; + + @JsonKey(name: '\$ref', defaultValue: '') + String ref; + + Map toJson() => _$SwaggerRequestItemsToJson(this); + + factory SwaggerRequestItems.fromJson(Map json) => + _$SwaggerRequestItemsFromJson(json); +} diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request_items.g2.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request_items.g2.dart new file mode 100644 index 0000000..a04b20b --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request_items.g2.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_request_items.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerRequestItems _$SwaggerRequestItemsFromJson(Map json) { + return SwaggerRequestItems( + type: json['type'] as String? ?? '', + enumValues: + (json['enum'] as List?)?.map((e) => e as String).toList() ?? + [], + ref: json[r'$ref'] as String? ?? '', + ); +} + +Map _$SwaggerRequestItemsToJson( + SwaggerRequestItems instance) => + { + 'type': instance.type, + 'enum': instance.enumValues, + r'$ref': instance.ref, + }; diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.dart new file mode 100644 index 0000000..d97413c --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.dart @@ -0,0 +1,60 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/parameter_item.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_items.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +part 'swagger_request_parameter.g2.dart'; + +@JsonSerializable() +class SwaggerRequestParameter { + SwaggerRequestParameter( + {this.inParameter = '', + this.name = '', + this.description = '', + this.isRequired = false, + this.type = '', + this.item, + this.collectionFormat = '', + this.items, + this.schema, + this.ref = '', + this.key = ''}); + + @JsonKey(name: 'in', defaultValue: '') + String inParameter; + + @JsonKey(name: 'name', defaultValue: '') + String name; + + @JsonKey(name: 'description', defaultValue: '') + String description; + + @JsonKey(name: 'required', defaultValue: false) + bool isRequired; + + @JsonKey(name: '\$ref', defaultValue: '') + String ref; + + @JsonKey(name: 'type', defaultValue: '') + String type; + + @JsonKey(name: 'item') + ParameterItem? item; + + @JsonKey(name: 'collectionFormat', defaultValue: '') + String collectionFormat; + + @JsonKey(name: 'schema') + SwaggerSchema? schema; + + @JsonKey(name: 'items') + SwaggerRequestItems? items; + + @JsonKey(ignore: true, defaultValue: '') + String key; + + Map toJson() => _$SwaggerRequestParameterToJson(this); + + factory SwaggerRequestParameter.fromJson(Map json) => + _$SwaggerRequestParameterFromJson(json); +} diff --git a/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.g2.dart b/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.g2.dart new file mode 100644 index 0000000..fcb8b2e --- /dev/null +++ b/api_automatic/lib/src/swagger_models/requests/swagger_request_parameter.g2.dart @@ -0,0 +1,44 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_request_parameter.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerRequestParameter _$SwaggerRequestParameterFromJson( + Map json) { + return SwaggerRequestParameter( + inParameter: json['in'] as String? ?? '', + name: json['name'] as String? ?? '', + description: json['description'] as String? ?? '', + isRequired: json['required'] as bool? ?? false, + type: json['type'] as String? ?? '', + item: json['item'] == null + ? null + : ParameterItem.fromJson(json['item'] as Map), + collectionFormat: json['collectionFormat'] as String? ?? '', + items: json['items'] == null + ? null + : SwaggerRequestItems.fromJson(json['items'] as Map), + schema: json['schema'] == null + ? null + : SwaggerSchema.fromJson(json['schema'] as Map), + ref: json[r'$ref'] as String? ?? '', + ); +} + +Map _$SwaggerRequestParameterToJson( + SwaggerRequestParameter instance) => + { + 'in': instance.inParameter, + 'name': instance.name, + 'description': instance.description, + 'required': instance.isRequired, + r'$ref': instance.ref, + 'type': instance.type, + 'item': instance.item, + 'collectionFormat': instance.collectionFormat, + 'schema': instance.schema, + 'items': instance.items, + }; diff --git a/api_automatic/lib/src/swagger_models/responses/swagger_response.dart b/api_automatic/lib/src/swagger_models/responses/swagger_response.dart new file mode 100644 index 0000000..05e87d4 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/responses/swagger_response.dart @@ -0,0 +1,80 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +part 'swagger_response.g2.dart'; + +@JsonSerializable() +class SwaggerResponse { + SwaggerResponse({ + this.description = '', + this.type = '', + this.schema, + this.enumValue = const [], + this.content, + this.ref = '', + }); + + @JsonKey(name: '\$ref', defaultValue: '') + String ref; + + @JsonKey(name: 'description', defaultValue: '') + String description; + + @JsonKey(name: 'type', defaultValue: '') + String type; + + @JsonKey(name: 'schema') + SwaggerSchema? schema; + + @JsonKey(name: 'enumValue', defaultValue: []) + List enumValue; + + @JsonKey(name: 'content', fromJson: _mapContent) + Content? content; + + Map toJson() => _$SwaggerResponseToJson(this); + + factory SwaggerResponse.fromJson(Map json) => + _$SwaggerResponseFromJson(json); +} + +Content? _mapContent(Map? json) { + if (json == null || json.isEmpty) { + return null; + } + + final inner = json.values.first as Map; + + return Content.fromJson(inner); +} + +@JsonSerializable() +class Content { + Content({ + this.items, + this.ref = '', + this.responseType = '', + this.type = '', + this.schema, + }); + + @JsonKey(name: 'responseType', defaultValue: '') + final String responseType; + + @JsonKey(name: 'type', defaultValue: '') + final String type; + + @JsonKey(name: 'items') + final SwaggerSchema? items; + + @JsonKey(name: 'schema') + final SwaggerSchema? schema; + + @JsonKey(name: 'ref', defaultValue: '') + final String ref; + + Map toJson() => _$ContentToJson(this); + + factory Content.fromJson(Map json) => + _$ContentFromJson(json); +} diff --git a/api_automatic/lib/src/swagger_models/responses/swagger_response.g2.dart b/api_automatic/lib/src/swagger_models/responses/swagger_response.g2.dart new file mode 100644 index 0000000..78c062e --- /dev/null +++ b/api_automatic/lib/src/swagger_models/responses/swagger_response.g2.dart @@ -0,0 +1,55 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerResponse _$SwaggerResponseFromJson(Map json) { + return SwaggerResponse( + description: json['description'] as String? ?? '', + type: json['type'] as String? ?? '', + schema: json['schema'] == null + ? null + : SwaggerSchema.fromJson(json['schema'] as Map), + enumValue: (json['enumValue'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + content: _mapContent(json['content'] as Map?), + ref: json['\$ref'] as String? ?? '', + ); +} + +Map _$SwaggerResponseToJson(SwaggerResponse instance) => + { + '\$ref': instance.ref, + 'description': instance.description, + 'type': instance.type, + 'schema': instance.schema, + 'enumValue': instance.enumValue, + 'content': instance.content, + }; + +Content _$ContentFromJson(Map json) { + return Content( + items: json['items'] == null + ? null + : SwaggerSchema.fromJson(json['items'] as Map), + ref: json['\$ref'] as String? ?? '', + responseType: json['responseType'] as String? ?? '', + type: json['type'] as String? ?? '', + schema: json['schema'] == null + ? null + : SwaggerSchema.fromJson(json['schema'] as Map), + ); +} + +Map _$ContentToJson(Content instance) => { + 'responseType': instance.responseType, + 'type': instance.type, + 'items': instance.items, + 'schema': instance.schema, + '\$ref': instance.ref, + }; diff --git a/api_automatic/lib/src/swagger_models/responses/swagger_schema.dart b/api_automatic/lib/src/swagger_models/responses/swagger_schema.dart new file mode 100644 index 0000000..0cb6e86 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/responses/swagger_schema.dart @@ -0,0 +1,61 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'swagger_schema.g2.dart'; + +@JsonSerializable() +class SwaggerSchema { + SwaggerSchema({ + required this.type, + required this.originalRef, + required this.enumValuesObj, + required this.properties, + required this.items, + required this.ref, + required this.defaultValue, + required this.format, + required this.schema, + required this.oneOf, + required this.anyOf, + }); + + @JsonKey(name: 'type', defaultValue: '') + String type; + + @JsonKey(name: 'format', defaultValue: '') + String format; + + @JsonKey(name: 'default', defaultValue: null) + Object? defaultValue; + + @JsonKey(name: 'originalRef', defaultValue: '') + String originalRef; + + @JsonKey(name: '\$ref', defaultValue: '') + String ref; + + @JsonKey(name: 'enum', defaultValue: []) + List enumValuesObj; + + List get enumValues => + enumValuesObj.map((e) => e.toString()).toList(); + + @JsonKey(name: 'items') + SwaggerSchema? items; + + @JsonKey(name: 'properties', defaultValue: {}) + Map properties; + + @JsonKey(name: 'schema') + SwaggerSchema? schema; + + @JsonKey(name: 'oneOf', defaultValue: []) + List oneOf; + + @JsonKey(name: 'anyOf', defaultValue: []) + List anyOf; + + factory SwaggerSchema.fromJson(Map json) => + _$SwaggerSchemaFromJson(json); + + Map toJson() => _$SwaggerSchemaToJson(this); +} diff --git a/api_automatic/lib/src/swagger_models/responses/swagger_schema.g2.dart b/api_automatic/lib/src/swagger_models/responses/swagger_schema.g2.dart new file mode 100644 index 0000000..53bf8e3 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/responses/swagger_schema.g2.dart @@ -0,0 +1,52 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_schema.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerSchema _$SwaggerSchemaFromJson(Map json) { + return SwaggerSchema( + type: json['type'] as String? ?? '', + originalRef: json['originalRef'] as String? ?? '', + enumValuesObj: json['enum'] as List? ?? [], + properties: (json['properties'] as Map?)?.map( + (k, e) => + MapEntry(k, SwaggerSchema.fromJson(e as Map)), + ) ?? + {}, + items: json['items'] == null + ? null + : SwaggerSchema.fromJson(json['items'] as Map), + ref: json[r'$ref'] as String? ?? '', + defaultValue: json['default'], + format: json['format'] as String? ?? '', + schema: json['schema'] == null + ? null + : SwaggerSchema.fromJson(json['schema'] as Map), + oneOf: (json['oneOf'] as List?) + ?.map((e) => SwaggerSchema.fromJson(e as Map)) + .toList() ?? + [], + anyOf: (json['anyOf'] as List?) + ?.map((e) => SwaggerSchema.fromJson(e as Map)) + .toList() ?? + [], + ); +} + +Map _$SwaggerSchemaToJson(SwaggerSchema instance) => + { + 'type': instance.type, + 'format': instance.format, + 'default': instance.defaultValue, + 'originalRef': instance.originalRef, + r'$ref': instance.ref, + 'enum': instance.enumValuesObj, + 'items': instance.items, + 'properties': instance.properties, + 'schema': instance.schema, + 'oneOf': instance.oneOf, + 'anyOf': instance.anyOf, + }; diff --git a/api_automatic/lib/src/swagger_models/swagger_components.dart b/api_automatic/lib/src/swagger_models/swagger_components.dart new file mode 100644 index 0000000..ba94ce0 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_components.dart @@ -0,0 +1,60 @@ +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; + +part 'swagger_components.g2.dart'; + +@JsonSerializable() +class SwaggerComponents { + SwaggerComponents({ + required this.parameters, + required this.schemas, + required this.responses, + required this.requestBodies, + }); + + @JsonKey(name: 'parameters', defaultValue: {}) + Map parameters; + + @JsonKey(name: 'schemas', defaultValue: {}) + Map schemas; + + @JsonKey(name: 'responses', fromJson: _mapResponses) + Map responses; + + @JsonKey(name: 'requestBodies', fromJson: _mapResponses) + Map requestBodies; + + Map toJson() => _$SwaggerComponentsToJson(this); + + factory SwaggerComponents.fromJson(Map json) => + _$SwaggerComponentsFromJson(json); +} + +Map _mapResponses(Map? json) { + var results = {}; + + if (json == null) { + return results; + } + + json.forEach((key, value) { + final content = + (value as Map)['content'] as Map?; + + Map? appJson; + + if (content?.length == 1) { + appJson = content?.values.first as Map?; + } else { + appJson = content?['application/json'] as Map?; + } + + if (appJson != null && appJson['schema'] != null) { + results[key] = + SwaggerSchema.fromJson(appJson['schema'] as Map); + } + }); + + return results; +} diff --git a/api_automatic/lib/src/swagger_models/swagger_components.g2.dart b/api_automatic/lib/src/swagger_models/swagger_components.g2.dart new file mode 100644 index 0000000..ced4b67 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_components.g2.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_components.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerComponents _$SwaggerComponentsFromJson(Map json) { + return SwaggerComponents( + parameters: (json['parameters'] as Map?)?.map( + (k, e) => MapEntry( + k, SwaggerRequestParameter.fromJson(e as Map)), + ) ?? + {}, + schemas: (json['schemas'] as Map?)?.map( + (k, e) => + MapEntry(k, SwaggerSchema.fromJson(e as Map)), + ) ?? + {}, + responses: _mapResponses(json['responses'] as Map?), + requestBodies: + _mapResponses(json['requestBodies'] as Map?), + ); +} + +Map _$SwaggerComponentsToJson(SwaggerComponents instance) => + { + 'parameters': instance.parameters, + 'schemas': instance.schemas, + 'responses': instance.responses, + 'requestBodies': instance.requestBodies, + }; diff --git a/api_automatic/lib/src/swagger_models/swagger_info.dart b/api_automatic/lib/src/swagger_models/swagger_info.dart new file mode 100644 index 0000000..750834f --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_info.dart @@ -0,0 +1,29 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'swagger_info.g2.dart'; + +@JsonSerializable() +class SwaggerInfo { + SwaggerInfo( + {this.description = '', + this.version = '', + this.title = '', + this.termsOfService = ''}); + + factory SwaggerInfo.fromJson(Map json) => + _$SwaggerInfoFromJson(json); + + @JsonKey(name: 'description', defaultValue: '') + String description; + + @JsonKey(name: 'version', defaultValue: '') + String version; + + @JsonKey(name: 'title', defaultValue: '') + String title; + + @JsonKey(name: 'termsOfService', defaultValue: '') + String termsOfService; + + Map toJson() => _$SwaggerInfoToJson(this); +} diff --git a/api_automatic/lib/src/swagger_models/swagger_info.g2.dart b/api_automatic/lib/src/swagger_models/swagger_info.g2.dart new file mode 100644 index 0000000..f7085b6 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_info.g2.dart @@ -0,0 +1,24 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerInfo _$SwaggerInfoFromJson(Map json) { + return SwaggerInfo( + description: json['description'] as String? ?? '', + version: json['version'] as String? ?? '', + title: json['title'] as String? ?? '', + termsOfService: json['termsOfService'] as String? ?? '', + ); +} + +Map _$SwaggerInfoToJson(SwaggerInfo instance) => + { + 'description': instance.description, + 'version': instance.version, + 'title': instance.title, + 'termsOfService': instance.termsOfService, + }; diff --git a/api_automatic/lib/src/swagger_models/swagger_path.dart b/api_automatic/lib/src/swagger_models/swagger_path.dart new file mode 100644 index 0000000..83b5094 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_path.dart @@ -0,0 +1,25 @@ +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import 'requests/swagger_request.dart'; + +part 'swagger_path.g2.dart'; + +@JsonSerializable() +class SwaggerPath { + SwaggerPath({ + this.requests = const {}, + this.parameters = const [], + }); + + @JsonKey(name: 'requests', defaultValue: {}) + Map requests; + + @JsonKey(name: 'parameters', defaultValue: []) + List parameters; + + Map toJson() => _$SwaggerPathToJson(this); + + factory SwaggerPath.fromJson(Map json) => + _$SwaggerPathFromJson(json); +} diff --git a/api_automatic/lib/src/swagger_models/swagger_path.g2.dart b/api_automatic/lib/src/swagger_models/swagger_path.g2.dart new file mode 100644 index 0000000..aefc9a9 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_path.g2.dart @@ -0,0 +1,28 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_path.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerPath _$SwaggerPathFromJson(Map json) { + return SwaggerPath( + requests: (json['requests'] as Map?)?.map( + (k, e) => + MapEntry(k, SwaggerRequest.fromJson(e as Map)), + ) ?? + {}, + parameters: (json['parameters'] as List?) + ?.map((e) => + SwaggerRequestParameter.fromJson(e as Map)) + .toList() ?? + [], + ); +} + +Map _$SwaggerPathToJson(SwaggerPath instance) => + { + 'requests': instance.requests, + 'parameters': instance.parameters, + }; diff --git a/api_automatic/lib/src/swagger_models/swagger_root.dart b/api_automatic/lib/src/swagger_models/swagger_root.dart new file mode 100644 index 0000000..4b5f685 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_root.dart @@ -0,0 +1,84 @@ +import 'package:swagger_dart_code_generator/src/code_generators/constants.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_components.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_info.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_path.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/swagger_tag.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'swagger_root.g2.dart'; + +@JsonSerializable() +class SwaggerRoot { + SwaggerRoot({ + required this.basePath, + required this.components, + required this.info, + required this.host, + required this.paths, + required this.tags, + required this.schemes, + required this.parameters, + required this.definitions, + }); + + @JsonKey(name: 'info') + SwaggerInfo? info; + + @JsonKey(name: 'host', defaultValue: '') + String host; + + @JsonKey(name: 'basePath', defaultValue: '') + String basePath; + + @JsonKey(name: 'tags', defaultValue: []) + List tags; + + @JsonKey(name: 'schemes', defaultValue: []) + List schemes; + + @JsonKey(name: 'paths', fromJson: _mapPaths) + Map paths; + + @JsonKey(name: 'definitions', defaultValue: {}) + Map definitions; + + @JsonKey(name: 'parameters', defaultValue: {}) + Map parameters; + + @JsonKey(name: 'components') + SwaggerComponents? components; + + Map toJson() => _$SwaggerRootToJson(this); + + factory SwaggerRoot.fromJson(Map json) => _$SwaggerRootFromJson(json); +} + +Map _mapPaths(Map? paths) { + if (paths == null) { + return {}; + } + return paths.map((path, pathValue) { + final value = pathValue as Map; + final parameters = value['parameters'] as List?; + value.removeWhere((key, value) => !supportedRequestTypes.contains(key.toLowerCase())); + + return MapEntry( + path, + SwaggerPath( + parameters: parameters + ?.map((parameter) => SwaggerRequestParameter.fromJson(parameter as Map)) + .toList() ?? + [], + requests: value.map( + (key, request) => MapEntry( + key, + SwaggerRequest.fromJson(request as Map), + ), + ), + ), + ); + }); +} diff --git a/api_automatic/lib/src/swagger_models/swagger_root.g2.dart b/api_automatic/lib/src/swagger_models/swagger_root.g2.dart new file mode 100644 index 0000000..242e8ad --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_root.g2.dart @@ -0,0 +1,52 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_root.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerRoot _$SwaggerRootFromJson(Map json) { + return SwaggerRoot( + basePath: json['basePath'] as String? ?? '', + components: json['components'] == null + ? null + : SwaggerComponents.fromJson( + json['components'] as Map), + info: json['info'] == null + ? null + : SwaggerInfo.fromJson(json['info'] as Map), + host: json['host'] as String? ?? '', + paths: _mapPaths(json['paths'] as Map?), + tags: (json['tags'] as List?) + ?.map((e) => SwaggerTag.fromJson(e as Map)) + .toList() ?? + [], + schemes: + (json['schemes'] as List?)?.map((e) => e as String).toList() ?? + [], + parameters: (json['parameters'] as Map?)?.map( + (k, e) => MapEntry( + k, SwaggerRequestParameter.fromJson(e as Map)), + ) ?? + {}, + definitions: (json['definitions'] as Map?)?.map( + (k, e) => + MapEntry(k, SwaggerSchema.fromJson(e as Map)), + ) ?? + {}, + ); +} + +Map _$SwaggerRootToJson(SwaggerRoot instance) => + { + 'info': instance.info, + 'host': instance.host, + 'basePath': instance.basePath, + 'tags': instance.tags, + 'schemes': instance.schemes, + 'paths': instance.paths, + 'definitions': instance.definitions, + 'parameters': instance.parameters, + 'components': instance.components, + }; diff --git a/api_automatic/lib/src/swagger_models/swagger_tag.dart b/api_automatic/lib/src/swagger_models/swagger_tag.dart new file mode 100644 index 0000000..53f09f8 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_tag.dart @@ -0,0 +1,20 @@ +import 'dart:core'; +import 'package:json_annotation/json_annotation.dart'; + +part 'swagger_tag.g2.dart'; + +@JsonSerializable() +class SwaggerTag { + SwaggerTag({this.name = '', this.description = ''}); + + factory SwaggerTag.fromJson(Map json) => + _$SwaggerTagFromJson(json); + + @JsonKey(name: 'name', defaultValue: '') + String name; + + @JsonKey(name: 'description', defaultValue: '') + String description; + + Map toJson() => _$SwaggerTagToJson(this); +} diff --git a/api_automatic/lib/src/swagger_models/swagger_tag.g2.dart b/api_automatic/lib/src/swagger_models/swagger_tag.g2.dart new file mode 100644 index 0000000..53ac721 --- /dev/null +++ b/api_automatic/lib/src/swagger_models/swagger_tag.g2.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'swagger_tag.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SwaggerTag _$SwaggerTagFromJson(Map json) { + return SwaggerTag( + name: json['name'] as String? ?? '', + description: json['description'] as String? ?? '', + ); +} + +Map _$SwaggerTagToJson(SwaggerTag instance) => + { + 'name': instance.name, + 'description': instance.description, + }; diff --git a/api_automatic/lib/swagger_dart_code_generator.dart b/api_automatic/lib/swagger_dart_code_generator.dart new file mode 100644 index 0000000..018c5b9 --- /dev/null +++ b/api_automatic/lib/swagger_dart_code_generator.dart @@ -0,0 +1,222 @@ +import 'package:build/build.dart'; +import 'package:code_builder/code_builder.dart'; +import 'package:swagger_dart_code_generator/src/extensions/file_name_extensions.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:swagger_dart_code_generator/src/swagger_code_generator.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/responses/swagger_schema.dart'; +import 'package:universal_io/io.dart'; +import 'package:dart_style/dart_style.dart'; + +///Returns instance of SwaggerDartCodeGenerator +SwaggerDartCodeGenerator swaggerCodeBuilder(BuilderOptions options) => SwaggerDartCodeGenerator(options); + +const _inputFileExtensions = ['.swagger', '.json']; + +const String _outputFileExtension = '.dart'; +const String _outputEnumsFileExtension = '_enums.dart'; +const String _outputModelsFileExtension = '_models.dart'; +const String _indexFileName = 'client_index.dart'; +// const String _mappingFileName = 'client_mapping.dart'; + +Map> _generateExtensions(GeneratorOptions options) { + final filesList = Directory(options.inputFolder) + .listSync() + .where((FileSystemEntity file) => _inputFileExtensions.any((ending) => file.path.endsWith(ending))); + + final result = >{}; + + filesList.forEach((FileSystemEntity element) { + final name = getFileNameBase(element.path); + result[element.path] = [ + '${options.outputFolder}$name$_outputFileExtension', + '${options.outputFolder}$name$_outputEnumsFileExtension', + '${options.outputFolder}$name$_outputModelsFileExtension', + ]; + }); + + ///Register additional outputs in first input + result[filesList.first.path]!.add('${options.outputFolder}$_indexFileName'); + // result[filesList.first.path]!.add('${options.outputFolder}$_mappingFileName'); + + return result; +} + +///Root library entry +class SwaggerDartCodeGenerator implements Builder { + SwaggerDartCodeGenerator(BuilderOptions builderOptions) { + options = GeneratorOptions.fromJson(builderOptions.config); + } + + @override + Map> get buildExtensions => _buildExtensionsCopy ??= _generateExtensions(options); + + Map>? _buildExtensionsCopy; + + late GeneratorOptions options; + + final DartFormatter _formatter = DartFormatter(); + + @override + Future build(BuildStep buildStep) async { + final fileNameWithExtension = buildStep.inputId.pathSegments.last.replaceAll('-', '_'); + final fileNameWithoutExtension = getFileNameBase(fileNameWithExtension); + + final contents = await buildStep.readAsString(buildStep.inputId); + + final codeGenerator = SwaggerCodeGenerator(); + + final responses = + codeGenerator.generateResponses(contents, getFileNameWithoutExtension(fileNameWithExtension), options); + + final requestBodies = + codeGenerator.generateRequestBodies(contents, getFileNameWithoutExtension(fileNameWithExtension), options); + + final enums = codeGenerator.generateEnums(contents, getFileNameWithoutExtension(fileNameWithExtension)); + + final converter = + codeGenerator.generateConverter(contents, getFileNameWithoutExtension(fileNameWithExtension), options); + + var requestClass = {}; + + final requests = codeGenerator.generateRequests(contents, getClassNameFromFileName(fileNameWithExtension), + getFileNameWithoutExtension(fileNameWithExtension), options, requestClass); + + // print('---------'); + // print(requestClass); + + final models = codeGenerator.generateModels( + contents, getFileNameWithoutExtension(fileNameWithExtension), options, requestClass); + final imports = codeGenerator.generateImportsContent(contents, fileNameWithoutExtension, models.isNotEmpty, + options.buildOnlyModels, enums.isNotEmpty, options.separateModels, options); + + // final customDecoder = codeGenerator.generateCustomJsonConverter( + // contents, getFileNameWithoutExtension(fileNameWithExtension), options); + + // final dateToJson = codeGenerator.generateDateToJson(contents); + + final copyAssetId = + AssetId(buildStep.inputId.package, '${options.outputFolder}$fileNameWithoutExtension$_outputFileExtension'); + + if (!options.separateModels || !options.buildOnlyModels) { + await buildStep.writeAsString( + copyAssetId, + _generateFileContent( + imports, requests, converter, options.separateModels ? '' : models, + options.separateModels ? '' : responses, options.separateModels ? '' : requestBodies, '', '', + // customDecoder, + // dateToJson, + )); + } + + if (enums.isNotEmpty) { + ///Write enums + final formatterEnums = _tryFormatCode(enums); + + final enumsAssetId = AssetId( + buildStep.inputId.package, '${options.outputFolder}$fileNameWithoutExtension$_outputEnumsFileExtension'); + + await buildStep.writeAsString(enumsAssetId, formatterEnums); + } + + if (options.separateModels) { + ///Write models to separate file + final formattedModels = _tryFormatCode(_generateSeparateModelsFileContent( + models, + responses, + requestBodies, + fileNameWithoutExtension, + enums.isNotEmpty, + )); + + final enumsAssetId = AssetId( + buildStep.inputId.package, '${options.outputFolder}$fileNameWithoutExtension$_outputModelsFileExtension'); + + await buildStep.writeAsString(enumsAssetId, formattedModels); + } + + ///Write additional files on first input + // if (buildExtensions.keys.first == buildStep.inputId.path) { + // await _generateAdditionalFiles(contents, buildStep.inputId, buildStep, models.isNotEmpty); + // } + } + + String _generateFileContent(String imports, String requests, String converter, String models, String responses, + String requestBodies, String customDecoder, String dateToJson) { + final result = """ +$imports + +${options.buildOnlyModels ? '' : requests} + +${options.withConverter && !options.buildOnlyModels ? converter : ''} + +$models + +$responses + +$requestBodies + +${options.buildOnlyModels ? '' : customDecoder} + +$dateToJson +"""; + + return _tryFormatCode(result); + } + + String _tryFormatCode(String code) { + try { + final formattedResult = _formatter.format(code); + return formattedResult; + } catch (e) { + print('''[WARNING] Code formatting failed. + Please raise an issue on https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/ + Reason: $e'''); + return code; + } + } + + // Future _generateAdditionalFiles( + // String swaggerCode, AssetId inputId, BuildStep buildStep, bool hasModels) async { + // final codeGenerator = SwaggerCodeGenerator(); + + // final indexAssetId = AssetId(inputId.package, '${options.outputFolder}$_indexFileName'); + + // final imports = codeGenerator.generateIndexes(swaggerCode, buildExtensions); + + // if (!options.buildOnlyModels) { + // await buildStep.writeAsString(indexAssetId, _formatter.format(imports)); + // } + + // if (options.withConverter && !options.buildOnlyModels) { + // final mappingAssetId = AssetId(inputId.package, '${options.outputFolder}$_mappingFileName'); + + // final mapping = codeGenerator.generateConverterMappings(swaggerCode, buildExtensions, hasModels); + + // await buildStep.writeAsString(mappingAssetId, _formatter.format(mapping)); + // } + // } + + String _generateSeparateModelsFileContent( + String models, + String responses, + String requestBodies, + String fileNameWithoutExtension, + bool hasEnums, + ) { + final enumsImport = hasEnums ? "import '${fileNameWithoutExtension}_enums.dart' as enums;" : ''; + + return ''' +import 'package:json_annotation/json_annotation.dart'; +import 'package:collection/collection.dart'; +$enumsImport + + part '${fileNameWithoutExtension}_models.g.dart'; + + $models + + $responses + + $requestBodies + '''; + } +} diff --git a/api_automatic/pubspec.yaml b/api_automatic/pubspec.yaml new file mode 100644 index 0000000..1db5991 --- /dev/null +++ b/api_automatic/pubspec.yaml @@ -0,0 +1,33 @@ +name: swagger_dart_code_generator + +version: 2.2.3 + +homepage: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator +repository: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator +issue_tracker: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues + +description: Have you been turned into a problem with writing code for Http + requests? This package can help. It has all of the Http and model codegen + functionality you have been looking for. + +environment: + sdk: ">=2.12.0 <3.0.0" + +dependencies: + build: ^2.0.2 + path: ^1.8.0 + # markdown: ^4.0.0 + recase: ^4.0.0 + json_annotation: ^4.1.0 + universal_io: ^2.0.4 + collection: ^1.15.0 + dart_style: ^2.2.1 + code_builder: ^4.0.0 + +dev_dependencies: + build_runner: ^2.1.2 + json_serializable: ^5.0.0 + remove_from_coverage: ^2.0.0 + pedantic: ^1.11.0 + test: ^1.17.5 + diff --git a/api_automatic/test/code_examples.dart b/api_automatic/test/code_examples.dart new file mode 100644 index 0000000..16964b0 --- /dev/null +++ b/api_automatic/test/code_examples.dart @@ -0,0 +1,1350 @@ +const String ref = '\$ref'; +const String model_with_parameters_v3 = ''' +{ + "components": { + "schemas": { + "SomeEnumModel" : { + "enum" : ["one", "two"] + }, + "trickPlayControl": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "disallowFastForward", + "disallowPause", + "disallowPlay", + "disallowRewind", + "disallowSkipForward", + "disallowSkipBackward", + "adRestrictionOnly" + ] + } + }, + "AuthorizationDetails": { + "type": "object", + "properties": { + "state": { + "type": "string", + "format": "uuid", + "description": "Opaque value generated. The state will be echoed back in the token response, therefore state needs to be maintained between the request and the response.", + "example": "00001-00002-00003-00004" + }, + "authorizationUri": { + "type": "string", + "format": "uri", + "description": "URI to follow for authorization", + "example": "https://sso.service.some.country/oidc/authorize?response_type=code&state=00001-00002-00003-00004&nonce=54345345-345345345-345345345-435345&client_id=some-client-id&redirect_uri=https%3A%2F%2Fsome-success-uri.com%2Fen_gb%2Flogin_success" + }, + "enumValue": { + "type": "enum", + "enum": ["one", "two"] + }, + "redirectUri": { + "type": "string", + "format": "uri", + "description": "Redirect URI used after successful authentication", + "example": "https%3A%2F%2Fsome-success-uri.com%2Fen_gb%2Flogin_success" + }, + "logoutUri": { + "type": "string", + "format": "uri", + "description": "URI to follow to logout" + }, + "validityToken": { + "type": "string", + "description": "The validity token will contain the payload of the generated nonce and state value.", + "example": "" + } + } + }, + "CompleteAuthorizationRequest": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code value obtained for SSO authorization service" + }, + "state": { + "type": "string", + "format": "uuid", + "description": "State value obtained previously", + "example": "00001-00002-00003-00004" + }, + "validityToken": { + "type": "string", + "description": "The validity token obtained previously", + "example": "" + } + } + }, + "TokensResponse": { + "type": "object", + "properties": { + "token_type": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "access_token": { + "$ref": "#/components/schemas/SvcAccessToken" + }, + "refresh_token": { + "$ref": "#/components/schemas/SvcRefreshToken" + }, + "expires_in": { + "type": "integer", + "description": "access token expiration in seconds" + }, + "username": { + "type": "string", + "description": "username of authenticated client" + }, + "givenName": { + "type": "string", + "description": "first name" + }, + "familyName": { + "type": "string", + "description": "family name" + } + } + }, + "RefreshAuthorizationRequest": { + "type": "object", + "properties": { + "svcRefreshToken": { + "$ref": "#/components/schemas/SvcRefreshToken" + } + } + }, + "DeleteAuthorizationRequest": { + "type": "object", + "properties": { + "svcRefreshToken": { + "$ref": "#/components/schemas/SvcRefreshToken" + } + } + }, + "SvcRefreshToken": { + "type": "string", + "description": "Valid service refresh token" + }, + "SvcAccessToken": { + "type": "string", + "description": "jwt service access token used as ACCESS_TOKEN with calls to services" + } + } + } +} +'''; + +const String model_with_parameters_v2 = ''' +{ + "definitions": { + "trickPlayControl": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "disallowFastForward", + "disallowPause", + "disallowPlay", + "disallowRewind", + "disallowSkipForward", + "disallowSkipBackward", + "adRestrictionOnly" + ] + } + }, + "ActiveOrderAndListSummary": { + "type": "object", + "required": [ + "closingTime", + "id", + "shoppingType", + "slotReservationHours", + "state" + ], + "properties": { + "closingTime": { + "type": "string", + "format": "date-time" + }, + "deliveryDate": { + "originalRef": "DeliveryDto", + "\$ref": "#/definitions/DeliveryDto" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "lastSyncedDate": { + "type": "string", + "format": "date-time" + }, + "enumValue": { + "type": "enum", + "enum": ["one", "two"] + }, + "orderLastChangedTime": { + "type": "string", + "format": "date-time" + }, + "orderedProducts": { + "type": "array", + "items": { + "originalRef": "OrderedProductCard", + "\$ref": "#/definitions/OrderedProductCard" + } + }, + "price": { + "originalRef": "PriceDto", + "\$ref": "#/definitions/PriceDto" + }, + "shoppingListItems": { + "type": "array", + "items": { + "originalRef": "Item", + "\$ref": "#/definitions/Item" + } + }, + "shoppingType": { + "type": "string", + "enum": [ + "UNKNOWN", + "PHYSICAL_STORE", + "DELIVERY", + "PICKUP_DELIVERY", + "DELIVERY_POINT", + "PICKUP", + "IN_STORE_PICK", + "SPECIALS_ONLY" + ] + }, + "slotReservationHours": { + "type": "number", + "format": "double" + }, + "state": { + "type": "string", + "enum": [ + "CONFIRMED", + "REOPENED", + "IN_PREPARATION", + "UNCONFIRMED", + "DELIVERED", + "CANCELLED", + "PLANNED_FOR_DELIVERY", + "OUT_FOR_DELIVERY", + "UNKNOWN" + ] + } + }, + "title": "ActiveOrderAndListSummary" + } + } +} +'''; + +const String request_with_header = ''' +{ + "paths": { + "/v2/order/summaries": { + "get": { + "tags": [ + "appie-order-controller-v-2" + ], + "summary": "Get order summaries", + "operationId": "retrieveOrderSummariesUsingGET", + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "x-application", + "in": "header", + "description": "x-application", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "originalRef": "OrderSummary", + "\$ref": "#/definitions/OrderSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "deprecated": false + } + } + } +} +'''; + +const String request_with_enum_in_parameter = ''' +{ + "paths": { + "/v3/order/{orderId}/state": { + "put": { + "tags": [ + "appie-order-controller-v-3" + ], + "summary": "Update state of an order.", + "operationId": "changeOrderStateUsingPUT", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "Id of the order", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "name": "orderStateRequest", + "description": "Order state", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SUBMITTED", + "CANCELLED", + "REOPENED", + "RESET" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "deprecated": false + } + } + } +} +'''; + +const String request_with_list_of_enum_in_parameter = ''' +{ + "paths": { + "/v3/order/{orderId}/state": { + "put": { + "tags": [ + "appie-order-controller-v-3" + ], + "summary": "Update state of an order.", + "operationId": "changeOrderStateUsingPUT", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "Id of the order", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "in": "body", + "name": "orderStateRequest", + "description": "Order state", + "required": false, + "items": { + "type": "string", + "enum": [ + "SUBMITTED", + "CANCELLED", + "REOPENED", + "RESET" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "201": { + "description": "Created" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "deprecated": false + } + } + } +} +'''; + +const String request_with_array_string = ''' +{ + "paths": { + "/v1/{pboSortType}": { + "get": { + "tags": [ + "purchase-controller" + ], + "summary": "getPreviousPurchases", + "operationId": "getPreviousPurchasesUsingGET", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "applications", + "in": "query", + "description": "applications", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "originalRef": "PagedResponseOfProductCard", + "\$ref": "#/definitions/PagedResponseOfProductCard" + } + } + } + } + } + }, + "securityDefinitions": { + "apiKey": { + "type": "apiKey", + "name": "x-authorization", + "in": "header" + } + } +} +'''; + +const String request_with_array_order_summary = ''' +{ + "paths": { + "/v2/order/summaries": { + "get": { + "tags": [ + "appie-order-controller-v-2" + ], + "summary": "Get order summaries", + "operationId": "retrieveOrderSummariesUsingGET", + "produces": [ + "*/*" + ], + "parameters": [ + { + "name": "x-application", + "in": "header", + "description": "x-application", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "originalRef": "OrderSummary", + "\$ref": "#/definitions/OrderSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "deprecated": false + } + } + } +} +'''; + +const String request_with_list_string_return_type = ''' +{ + "paths": { + "/v1/suggestions": { + "get": { + "tags": [ + "search-controller-v-1" + ], + "summary": "product-search-suggestions", + "description": "Search suggestions", + "operationId": "findSuggestionsUsingGET", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "amount", + "in": "query", + "description": "Amount of suggestions", + "required": true, + "type": "integer", + "default": 10, + "format": "int32", + "allowEmptyValue": false + }, + { + "name": "query", + "in": "query", + "description": "Term to find suggestions for", + "required": true, + "type": "string", + "allowEmptyValue": false + }, + { + "name": "x-application", + "in": "header", + "description": "x-application", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "deprecated": false + } + } + } +} +'''; + +const String schemas_responses_with_response = ''' +{ + "openapi": "3.0.1", + "info": { + "title": "Some service", + "version": "1.0" + }, + "components": { + "responses": { + "SpaResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "required": [ + "showPageAvailable" + ], + "properties": { + "id": { + "type": "string", + "description": "Some description" + }, + "showPageAvailable": { + "type": "boolean", + "description": "Flag indicating showPage availability" + } + } + } + } + } + } + } + } +} +'''; + +const String schemas_responses_with_response_and_schemas = ''' +{ + "openapi": "3.0.1", + "info": { + "title": "Some service", + "version": "1.0" + }, + "components": { + "responses": { + "SpaResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "required": [ + "showPageAvailable" + ], + "properties": { + "id": { + "type": "string", + "description": "Some description" + }, + "showPageAvailable": { + "type": "boolean", + "description": "Flag indicating showPage availability" + } + } + } + } + } + } + }, + "schemas": { + "SpaSchema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Some description" + }, + "showPageAvailable": { + "type": "boolean", + "description": "Flag indicating showPage availability" + } + } + } + } + } +} +'''; + +const String enum_as_definition_v2 = ''' +{ + "openapi": "2.0.1", + "definitions": { + "SpaResponse": { + "description": "Success", + "enum": [ + "one", + "two" + ] + } + } +} +'''; + +const String schemas_with_enums_in_properties = ''' +{ + "openapi": "3.0.1", + "info": { + "title": "Some service", + "version": "1.0" + }, + "components": { + "schemas": { + "SpaSchema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Some description" + }, + "showPageAvailable": { + "type": "boolean", + "description": "Flag indicating showPage availability" + }, + "successValues": { + "items": { + "enum": [ + "one, two" + ] + } + } + } + } + }, + "responses": { + "SpaResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "enum": [ + "one", + "two" + ] + } + } + } + }, + "SpaEnumResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "properties": { + "failedValued": { + "items": { + "enum": [ + "one", + "two" + ] + } + } + } + } + } + } + } + } + } +} +'''; + +const String request_with_return_type_injected = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "parameters": [ + { + "name": "testName", + "in": "query", + "description": "test name", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "petId": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } +} +'''; + +const String request_with_ref_response = ''' +{ + "components": { + "schemes": { + "MyCoolDefinition": { + "type": "object", + "properties": { + "startTime": { + "type": "string", + "format": "date" + }, + "endTime": { + "type": "string", + "format": "date" + }, + "imageUrl": { + "type": "string" + } + }, + "title": "MyCoolDefinition" + } + }, + "responses": { + "SpaSingleResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "enum": [ + "one", + "two" + ] + } + } + } + }, + "SpaResponse": { + "description": "Success", + "content": { + "application/json(1)": { + "schema": { + "enum": [ + "one", + "two" + ] + } + }, + "application/json(2)": { + "schema": { + "enum": [ + "one", + "two" + ] + } + } + } + } + } + }, + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "someOperationId", + "parameters": [ + { + "name": "headerParameter", + "in": "header", + "required": true, + "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "\$ref": "#/components/responses/SpaResponse" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "\$ref": "#/responses/SpaResponse" + } + } + } + } + } +} +'''; + + + +const String request_with_array_item_summary = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "parameters": [ + { + "name": "testName", + "in": "query", + "description": "test name", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "originalRef": "ItemSummary", + "\$ref": "#/definitions/ItemSummary" + } + } + } + } + } + } + } +} +'''; + +const String request_with_list_test_item_return_type = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "parameters": [ + { + "name": "testName", + "in": "query", + "description": "test name", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "originalRef": "TestItem", + "\$ref": "#/definitions/TestItem" + } + } + } + } + } + } + } +} +'''; + +const String request_with_object_ref_response = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "parameters": [ + { + "name": "testName", + "in": "query", + "description": "test name", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "\$ref" : "MyObject" + } + } + } + } + } + } +} +'''; + +const String request_with_original_ref_return_type = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "responses": { + "200": { + "description": "OK", + "schema": { + "originalRef": "TestItem" + } + } + } + } + } + } +} +'''; + +const String request_with_content_first_response_type = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "responses": { + "200": { + "description": "OK", + "content": { + "applicacion/json": { + "schema" : { + "type" : "String" + } + } + } + } + } + } + } + } +} +'''; + +const String request_with_content_first_response_ref = ''' +{ + "paths": { + "/model/items": { + "get": { + "summary": "Some test request", + "operationId": "getModelItems", + "responses": { + "200": { + "description": "OK", + "schema": { + "type" : "testType", + "items" : { + "\$ref" : "#definitions/TestItem" + } + } + } + } + } + } + } +} +'''; + +const String model_with_inheritance = ''' +{ + "openapi": "3.0.0", + "components": { + "schemas": { + "BasicErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "\$ref": "#/components/schemas/BasicErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + } + } + } +} +'''; + +const String model_with_enum = ''' +{ + "openapi":"3.0.0", + "components":{ + "schemas":{ + "BasicErrorModel":{ + "enum":[ + "message", + "code" + ] + } + } + } +} +'''; + +const String model_with_inheritance_3_levels = ''' +{ + "openapi": "3.0.0", + "components": { + "schemas": { + "BasicErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "\$ref": "#/components/schemas/BasicErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + }, + "ErrorModelWithBadAllof": { + "allOf": [ + { + "\$ref": "#/components/schemas/NotExistingError" + }, + { + "type": "object", + "required": [ + "rootCause" + ] + } + ] + }, + "MostExtendedErrorModel": { + "allOf": [ + { + "\$ref": "#/components/schemas/ExtendedErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "phone": { + "type": "string" + } + } + } + ] + } + } + } +} +'''; + +const request_with_enum = ''' +{ + "paths": { + "/pets/{petId}/items": { + "get": { + "summary": "Some summary", + "tags": [ + "Bookmarks" + ], + "parameters": [ + { + "name": "contentType", + "in": "query", + "description": "content source type", + "type": "string", + "schema": { + "enum": [ + "vod", + "replay", + "network-recording", + "local-recording" + ] + } + } + ], + "responses": { + "200": { + "description": "Bookmarks for given profile and content is returned.", + "schema": { + "\$ref": "#/definitions/Pet" + } + } + } + } + } + } +} +'''; + +const request_with_enum_request_body = ''' +{ + "openapi": "3.0.1", + "info": { + "title": "Test service", + "version": "0.18.0" + }, + "paths": { + "/v3/customers/{customerId}/status": { + "put": { + "description": "Test request", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "Test desc", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Test desc", + "content": { + "application/json": { + "schema": { + "\$ref": "#/components/schemas/CustomerStatus" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Customer Status was changed." + } + } + } + } + }, + "components": { + "schemas": { + "CustomerStatus": { + "title": "Customer Status", + "type": "string", + "enum": [ + "active", + "inactive", + "deleted" + ] + } + } + } +} +'''; diff --git a/api_automatic/test/converter_generator_definitions.dart b/api_automatic/test/converter_generator_definitions.dart new file mode 100644 index 0000000..e5141d1 --- /dev/null +++ b/api_automatic/test/converter_generator_definitions.dart @@ -0,0 +1,95 @@ +const String model_with_parameters = ''' +{ + "components": { + "schemas": { + "ActiveOrderAndListSummary": { + "type": "object", + "properties": { + "closingTime": { + "type": "string", + "format": "date-time" + }, + "orderLastChangedTime": { + "type": "string", + "format": "date-time" + }, + "orderedProducts": { + "type": "array", + "items": { + "originalRef": "OrderedProductCard", + "\$ref": "#/definitions/OrderedProductCard" + } + } + }, + "title": "ActiveOrderAndListSummary" + } + }, + "responses": { + "SpaResponse": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "required": [ + "showPageAvailable" + ], + "properties": { + "id": { + "type": "string", + "description": "Crid show (VOD)" + }, + "showPageAvailable": { + "type": "boolean", + "description": "Flag indicating showPage availability" + } + } + } + } + } + } + } + } +} +'''; + +const String model_with_parameters_v2 = ''' +{ + "definitions": { + "ActiveOrderAndListSummary": { + "type": "object", + "properties": { + "closingTime": { + "type": "string", + "format": "date-time" + }, + "orderLastChangedTime": { + "type": "string", + "format": "date-time" + }, + "orderedProducts": { + "type": "array", + "items": { + "originalRef": "OrderedProductCard", + "\$ref": "#/definitions/OrderedProductCard" + } + } + }, + "title": "ActiveOrderAndListSummary" + } + } +} +'''; + +const String model_with_enunm_array_parameters_v2 = ''' +{ + "definitions": { + "ActiveOrderAndListSummary": { + "type": "array", + "items" : { + "type" : "enum", + "items" :[ "one" ] + } + } + } +} +'''; diff --git a/api_automatic/test/file_name_extensions_test.dart b/api_automatic/test/file_name_extensions_test.dart new file mode 100644 index 0000000..3144670 --- /dev/null +++ b/api_automatic/test/file_name_extensions_test.dart @@ -0,0 +1,13 @@ +import 'package:test/test.dart'; +import 'package:swagger_dart_code_generator/src/extensions/file_name_extensions.dart'; + +void main() { + group('Additions generator tests', () { + test('Should generate mapping for files', () { + const fileName = 'example_file.swagger.dart'; + var result = getFileNameWithoutExtension(fileName); + var expandedResult = 'example_file'; + expect(result, equals(expandedResult)); + }); + }); +} diff --git a/api_automatic/test/generator_tests/additions_generator_test.dart b/api_automatic/test/generator_tests/additions_generator_test.dart new file mode 100644 index 0000000..97b6230 --- /dev/null +++ b/api_automatic/test/generator_tests/additions_generator_test.dart @@ -0,0 +1,69 @@ +import 'package:swagger_dart_code_generator/src/code_generators/swagger_additions_generator.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:test/test.dart'; + +void main() { + group('Additions generator tests', () { + final generator = SwaggerAdditionsGenerator(); + + // test('Should generate mapping for files', () { + // final result = generator.generateConverterMappings(>{ + // 'someFile.dart': ['someFile.swagger.dart'], + // 'secondFile.dart': ['secondFile.swagger.dart'] + // }, true); + + // expect(result, contains('...SomeFileJsonDecoderMappings')); + // expect(result, contains('...SecondFileJsonDecoderMappings')); + // }); + + test('Should generate correct imports', () { + final result = generator.generateImportsContent('swagger.fileName', true, false, false, false, []); + + expect(result, contains("part 'swagger.fileName.swagger.chopper.dart';")); + expect(result, contains("part 'swagger.fileName.swagger.g.dart';")); + }); + + test('Should generate correct imports', () { + final result = generator.generateImportsContent('swagger.fileName', true, false, true, false, []); + + expect(result, contains("import 'swagger.fileName.enums.swagger.dart' as enums;")); + }); + + test('Should generate indexes file', () { + final result = generator.generateIndexes(>{ + 'someFile.dart': ['someFile.swagger.dart'], + 'secondFile.dart': ['secondFile.swagger.dart'] + }); + + expect(result, contains("export 'someFile.dart.dart' show SomeFile;")); + expect(result, contains("export 'secondFile.dart.dart' show SecondFile;")); + }); + }); + + group('Test for generateCustomJsonConverter', () { + final generator = SwaggerAdditionsGenerator(); + test('Should generate custom json converter', () { + const fileName = 'example_swagger'; + const expectedResult = 'CustomJsonDecoder(ExampleSwaggerJsonDecoderMappings)'; + final result = generator.generateCustomJsonConverter( + fileName, + GeneratorOptions( + inputFolder: '', + outputFolder: '', + ), + ); + + expect(result, contains(expectedResult)); + }); + }); + + group('Test for generateDateToJson', () { + final generator = SwaggerAdditionsGenerator(); + test('Should dateToJson with parameter', () { + const expectedResult = 'String? _dateToJson(DateTime? date)'; + final result = generator.generateDateToJson(); + + expect(result, contains(expectedResult)); + }); + }); +} diff --git a/api_automatic/test/generator_tests/converter_generator_test.dart b/api_automatic/test/generator_tests/converter_generator_test.dart new file mode 100644 index 0000000..bc4bb78 --- /dev/null +++ b/api_automatic/test/generator_tests/converter_generator_test.dart @@ -0,0 +1,47 @@ +import 'package:swagger_dart_code_generator/src/code_generators/swagger_converter_generator.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:test/test.dart'; + +import '../converter_generator_definitions.dart'; + +void main() { + group('Converter generator tests', () { + final generator = SwaggerConverterGenerator(); + const fileName = 'file_name'; + + test('Should create fromJsonFactory for model', () { + final result = generator.generate( + model_with_parameters, + fileName, + GeneratorOptions(inputFolder: '', outputFolder: ''), + ); + + expect( + result, + contains( + 'ActiveOrderAndListSummary: ActiveOrderAndListSummary.fromJsonFactory')); + }); + + test( + 'Should not create fromJsonFactory for model with array enums parameters', + () { + final result = generator.generate(model_with_enunm_array_parameters_v2, + fileName, GeneratorOptions(inputFolder: '', outputFolder: '')); + + final isContains = result.contains( + 'ActiveOrderAndListSummary: ActiveOrderAndListSummary.fromJsonFactory'); + + expect(isContains, equals(false)); + }); + + test('Should create fromJsonFactory for model', () { + final result = generator.generate(model_with_parameters_v2, fileName, + GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect( + result, + contains( + 'ActiveOrderAndListSummary: ActiveOrderAndListSummary.fromJsonFactory')); + }); + }); +} diff --git a/api_automatic/test/generator_tests/enums_generator_test.dart b/api_automatic/test/generator_tests/enums_generator_test.dart new file mode 100644 index 0000000..66ddd17 --- /dev/null +++ b/api_automatic/test/generator_tests/enums_generator_test.dart @@ -0,0 +1,150 @@ +import 'package:swagger_dart_code_generator/src/code_generators/swagger_enums_generator.dart'; +//import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_enums_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v3/swagger_enums_generator_v3.dart'; +import 'package:swagger_dart_code_generator/src/swagger_models/requests/swagger_request_parameter.dart'; +import 'package:test/test.dart'; +import '../code_examples.dart'; + +void main() { + final generator = SwaggerEnumsGeneratorV3(); + //final generatorv2 = SwaggerEnumsGeneratorV2(); + + group('Generate', () { + // test('Should generate enum from models', () { + // final result = generator.generate(model_with_parameters_v3, 'test_file'); + // expect(result, contains('enum SomeEnumModel')); + // }); + + // test('Should generate enum from models', () { + // final result = + // generatorv2.generate(model_with_parameters_v2, 'test_file'); + // expect(result, contains('enum ActiveOrderAndListSummaryEnumValue')); + // }); + + test('Should generate enum from request parameter', () { + final result = + generator.generate(request_with_enum_in_parameter, 'test_file'); + expect(result, contains('enum V3OrderOrderIdStatePutOrderStateRequest')); + }); + + // test('Should generate enums from responses', () { + // final result = + // generator.generate(schemas_with_enums_in_properties, 'test_file'); + // expect(result, contains('enum SpaResponse')); + // }); + }); + group('Converter generator tests', () { + test('Should generate enum values', () { + final values = ['file_sup']; + const output = "\t@JsonValue('file_sup')\n\tfileSup"; + final result = generator.getEnumValuesContent(values); + + expect(result, contains(output)); + }); + + test('Should return enum field name', () { + const name = 'cat-dog_ Cars'; + const output = 'catDogCars'; + final result = SwaggerEnumsGenerator.getValidatedEnumFieldName(name); + + expect(result, contains(output)); + }); + + test('Should return \$null if name is null', () { + const name = 'null'; + const output = '\$null'; + final result = SwaggerEnumsGenerator.getValidatedEnumFieldName(name); + + expect(result, contains(output)); + }); + }); + group('Tests for getValidatedEnumFieldName', () { + test('Should remove numbers at beginning if it is key word', () { + final result = SwaggerEnumsGenerator.getValidatedEnumFieldName('007'); + expect(result, equals('value_007')); + }); + + test('Should remove numbers at beginning if it is key word', () { + final result = + SwaggerEnumsGenerator.getEnumNamesFromRequests(request_with_enum); + expect(result[0], equals('PetsPetIdItemsGetContentType')); + }); + + test('Should remove numbers at beginning if it is key word', () { + final result = SwaggerEnumsGenerator.getEnumNamesFromRequests( + request_with_list_of_enum_in_parameter); + expect(result[0], equals('V3OrderOrderIdStatePutOrderStateRequest')); + }); + }); + + group('generateEnumContentIfPossible', () { + final generator = SwaggerEnumsGeneratorV3(); + test('Should generate enum', () { + final map = { + 'items': { + 'enum': ['Item1', 'Item2'] + } + }; + const enumName = 'TestName'; + final result = generator.generateEnumContentIfPossible(map, enumName); + + expect(result, contains('enum TestName')); + }); + }); + + group('generateEnumName', () { + final generator = SwaggerEnumsGeneratorV3(); + + test('Should generate enum name', () { + const className = 'animal'; + const enumName = 'cat'; + const expectedResult = 'AnimalCat'; + final result = generator.generateEnumName(className, enumName); + + expect(result, contains(expectedResult)); + }); + }); + + group('generateEnumValuesContent', () { + final generator = SwaggerEnumsGeneratorV3(); + test('Should return enum values', () { + final list = ['Cats', 'dogs', 'Forgs']; + const expectedResult = "\t@JsonValue('Cats')\n cats"; + final result = generator.generateEnumValuesContent(list); + + expect(result, contains(expectedResult)); + }); + }); + + group('getOriginalOrOverriddenRequestParameter', () { + test('Should override parameter if needed', () { + final incoming = + SwaggerRequestParameter(ref: '#definitions/TestParameter'); + final overriddenParameters = [ + SwaggerRequestParameter( + name: 'TestParameter', type: 'Overridden parameter') + ]; + + final result = + SwaggerEnumsGenerator.getOriginalOrOverriddenRequestParameter( + incoming, overriddenParameters); + + expect(result.type, equals('Overridden parameter')); + }); + + test('Should NOT override parameter if needed', () { + final incoming = SwaggerRequestParameter( + ref: '#definitions/TestParameterWrong', name: 'Original parameter'); + final overriddenParameters = [ + SwaggerRequestParameter( + key: 'TestParameter', name: 'Overridden parameter') + ]; + + final result = + SwaggerEnumsGenerator.getOriginalOrOverriddenRequestParameter( + incoming, overriddenParameters); + + expect(result.name, equals('Original parameter')); + }); + }); +} diff --git a/api_automatic/test/generator_tests/models_generator_test.dart b/api_automatic/test/generator_tests/models_generator_test.dart new file mode 100644 index 0000000..d6e2abf --- /dev/null +++ b/api_automatic/test/generator_tests/models_generator_test.dart @@ -0,0 +1,704 @@ +import 'package:swagger_dart_code_generator/src/code_generators/swagger_models_generator.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v2/swagger_models_generator_v2.dart'; +import 'package:swagger_dart_code_generator/src/code_generators/v3/swagger_models_generator_v3.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:test/test.dart'; +import '../code_examples.dart'; + +void main() { + final generator = SwaggerModelsGeneratorV3(); + final generator2 = SwaggerModelsGeneratorV2(); + group('generate', () { + const fileName = 'order_service.dart'; + + // test('Should parse object name as a field Type', () { + // final result = generator.generate(model_with_parameters_v3, fileName, + // GeneratorOptions(inputFolder: '', outputFolder: '', ) ); + + // expect( + // result, contains('final enums.TokensResponseTokenType? tokenType')); + // }); + + // test('Should generate .toLower() when caseSensitive: false', () { + // final result = generator.generate( + // model_with_parameters_v3, + // fileName, + // GeneratorOptions( + // enumsCaseSensitive: false, inputFolder: '', outputFolder: '')); + + // expect( + // result, + // contains( + // 'element.value.toLowerCase() == someEnumModel.toLowerCase()')); + // }); + + // test('Should NOT generate .toLower() when caseSensitive: false', () { + // final result = generator.generate( + // model_with_parameters_v3, + // fileName, + // GeneratorOptions( + // enumsCaseSensitive: true, inputFolder: '', outputFolder: '')); + + // expect(result, contains('element.value == someEnumModel')); + // }); + + // test('Should parse object name as a field Type', () { + // final result = generator2.generate(model_with_parameters_v2, fileName, + // GeneratorOptions(inputFolder: '', outputFolder: '', {})); + + // expect( + // result, + // contains( + // 'final enums.ActiveOrderAndListSummaryShoppingType? shoppingType')); + // }); + + // test('Should parse object name as a field Type', () { + // const expectedResult = "@JsonKey(name: 'expires_in', defaultValue: 19)"; + // final generatorOptions = GeneratorOptions( + // defaultValuesMap: [ + // DefaultValueMap( + // typeName: 'int', + // defaultValue: '19', + // ) + // ], + // inputFolder: '', + // outputFolder: '', + // ); + // final result = generator.generate( + // model_with_parameters_v3, fileName, generatorOptions); + + // expect(result, contains(expectedResult)); + // }); + }); + + group('generateDefaultValueFromMap', () { + test('Should return default value', () { + const defaultValue = 'true'; + const typeName = 'bool'; + const expectedResult = 'true'; + final result = + generator.generateDefaultValueFromMap(DefaultValueMap(defaultValue: defaultValue, typeName: typeName)); + + expect(result, contains(expectedResult)); + }); + + test('Should return default from switch', () { + const defaultValue = 'Animal'; + const typeName = 'Object'; + const expectedResult = 'Animal'; + final result = + generator.generateDefaultValueFromMap(DefaultValueMap(defaultValue: defaultValue, typeName: typeName)); + + expect(result, contains(expectedResult)); + }); + }); + + group('getParameterTypeName', () { + test('Should return validate parameter type name', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const parameter = {'type': 'object'}; + const expectedResult = 'Object'; + final result = generator.getParameterTypeName(className, parameterName, parameter, '', null); + + expect(result, contains(expectedResult)); + }); + + test('Should return Object, because we dont jave map[items]', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const parameter = {'type': 'array'}; + const expectedResult = 'Object'; + final result = generator.getParameterTypeName(className, parameterName, parameter, '', null); + + expect(result, contains(expectedResult)); + }); + + test('Should return Object, because we have map[oneOf]', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const parameter = {'oneOf': 'animals'}; + const expectedResult = 'Object'; + final result = generator.getParameterTypeName(className, parameterName, parameter, '', null); + + expect(result, contains(expectedResult)); + }); + + test('Should return Object', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const expectedResult = 'Object'; + final result = generator.getParameterTypeName(className, parameterName, {}, '', null); + + expect(result, contains(expectedResult)); + }); + + test('Should return validate parameter type name', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const parameter = {'\$ref': '#/definitions/Pet'}; + const expectedResult = 'Pet'; + final result = generator.getParameterTypeName(className, parameterName, parameter, '', null); + + expect(result, contains(expectedResult)); + }); + + test('Should return optional name parameter', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const refNameParameter = 'animals_Object'; + const expectedResult = 'AnimalsObject'; + final result = generator.getParameterTypeName(className, parameterName, {}, '', refNameParameter); + + expect(result, contains(expectedResult)); + }); + + test('Should return DateTime', () { + const className = 'Animal'; + const parameterName = 'orderId'; + const parameter = {'type': 'string', 'format': 'date-time'}; + const expectedResult = 'DateTime'; + final result = generator.getParameterTypeName(className, parameterName, parameter, '', null); + + expect(result, contains(expectedResult)); + }); + }); + + group('generateFieldName', () { + test('Should return validate field name', () { + const name = 'Cat_Dog-Animals'; + const expectedResult = 'catDogAnimals'; + final result = SwaggerModelsGenerator.generateFieldName(name); + + expect(result, contains(expectedResult)); + }); + + test('Should return \$forbiddenFieldName', () { + const name = '#'; + const expectedResult = '\$forbiddenFieldName'; + final result = SwaggerModelsGenerator.generateFieldName(name); + + expect(result, contains(expectedResult)); + }); + + test('Should return \$null', () { + const name = 'null'; + const expectedResult = '\$null'; + final result = SwaggerModelsGenerator.generateFieldName(name); + + expect(result, contains(expectedResult)); + }); + + test('Should return \$number', () { + const name = '5element'; + const expectedResult = '\$5element'; + final result = SwaggerModelsGenerator.generateFieldName(name); + + expect(result, contains(expectedResult)); + }); + }); + + group('generatePropertyContentByDefault', () { + test('Should return property with JsonKey', () { + final propertyEntryMap = {'originalRef': 'Pet'}; + const propertyName = 'shipDate'; + const jsonKeyExpendedResult = "@JsonKey(name: '$propertyName'"; + final result = generator.generatePropertyContentByDefault( + propertyEntryMap, propertyName, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpendedResult)); + }); + + test('Should generate includeIfNull if option is true', () { + final propertyEntryMap = {'originalRef': 'Pet'}; + const propertyName = 'shipDate'; + final result = generator.generatePropertyContentByDefault(propertyEntryMap, propertyName, [], [], + GeneratorOptions(includeIfNull: false, inputFolder: '', outputFolder: '')); + + expect(result, contains(', includeIfNull: false')); + }); + + test('Should NOT generate includeIfNull if option is false', () { + final propertyEntryMap = {'originalRef': 'Pet'}; + const propertyName = 'shipDate'; + final result = generator.generatePropertyContentByDefault(propertyEntryMap, propertyName, [], [], + GeneratorOptions(includeIfNull: null, inputFolder: '', outputFolder: '')); + + expect(result.contains(', includeIfNull: false'), equals(false)); + }); + }); + + group('generatePropertyContentByRef', () { + test('Should return property with JsonKey', () { + final propertyEntryMap = {'\$ref': '#/definitions/Pet'}; + const propertyName = 'shipDate'; + const propertyKey = 'shipDateGet'; + const className = 'Animals'; + const jsonKeyExpendedResult = "@JsonKey(name: '$propertyKey'"; + const expectedResult = '\t$jsonKeyExpendedResult)\n\tfinal Pet? $propertyName;'; + + final result = generator.generatePropertyContentByRef( + propertyEntryMap, + propertyName, + propertyKey, + className, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains(jsonKeyExpendedResult)); + expect(result, contains(expectedResult)); + }); + + test('Should add toJsonFromJson', () { + final propertyEntryMap = {'\$ref': '#/definitions/Pet'}; + const propertyName = 'shipDate'; + const propertyKey = 'shipDateGet'; + const className = 'Animals'; + + final result = generator.generatePropertyContentByRef( + propertyEntryMap, + propertyName, + propertyKey, + className, + ['enums.Pet'], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('toJson: petToJson, fromJson: petFromJson')); + }); + }); + + group('generateEnumPropertyContent', () { + test('Should return enum property with JsonKey with fromJson and toJson', () { + const key = 'dog'; + const className = 'animals'; + const jsonKeyExpectedResult = 'toJson: animalsDogToJson, fromJson: animalsDogFromJson'; + const expectedResult = 'final AnimalsDog? dog;'; + final result = generator.generateEnumPropertyContent( + key, className, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(expectedResult)); + }); + }); + + group('generateModelClassContent', () { + test('Should return model class content', () { + const map = {}; + const className = 'Animals'; + const useDefaultNullForLists = false; + const classExpectedResult = 'class Animals {'; + const factoryConstructorExpectedResult = + '\tfactory Animals.fromJson(Map json) => _\$AnimalsFromJson(json);\n'; + final result = generator.generateModelClassContent(className, map, {}, [], + useDefaultNullForLists, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(classExpectedResult)); + expect(result, contains(factoryConstructorExpectedResult)); + }); + + test('Should return model class content', () { + const map = {}; + const className = 'Animals'; + const useDefaultNullForLists = false; + const classExpectedResult = 'class Animals {'; + const factoryConstructorExpectedResult = + '\tfactory Animals.fromJson(Map json) => _\$AnimalsFromJson(json);\n'; + final result = generator2.generateModelClassContent(className, map, {}, [], + useDefaultNullForLists, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(classExpectedResult)); + expect(result, contains(factoryConstructorExpectedResult)); + }); + }); + + group('generateConstructorPropertiesContent', () { + test('Should return empty', () { + const expectedResult = ''; + final result = generator.generateConstructorPropertiesContent( + '', + {}, + GeneratorOptions(inputFolder: '', outputFolder: ''), + [], + [], + [], + ); + + expect(result, contains(expectedResult)); + }); + + test('Should return validate constructor property', () { + final map = { + 'Animal': {'type': 'dog'} + }; + const expectedResult = 'this.animal'; + final result = generator.generateConstructorPropertiesContent( + '', + map, + GeneratorOptions(inputFolder: '', outputFolder: ''), + [], + [], + [], + ); + + expect(result, contains(expectedResult)); + }); + }); + + group('generatePropertyContentBySchema', () { + test('Should return property content by schema', () { + final map = { + 'schema': {'\$ref': '#/definitions/Pet'} + }; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + const jsonKeyExpectedResult = "\t@JsonKey(name: 'Dog')\n"; + const fieldExpectedResult = '\tfinal Pet? dog'; + final result = generator.generatePropertyContentBySchema( + map, + propertyName, + propertyKey, + className, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(fieldExpectedResult)); + }); + + test('Should add fromJson and toJson by ref', () { + final map = { + 'schema': {'\$ref': '#/definitions/Pet'} + }; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + + final result = generator.generatePropertyContentBySchema( + map, + propertyName, + propertyKey, + className, + ['enums.Pet'], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('toJson: petToJson, fromJson: petFromJson')); + }); + }); + + group('generatePropertiesContent', () { + test('Should return properties from ref', () { + final map = { + 'Animals': {'\$ref': '#/definitions/Pet'} + }; + const className = 'Animals'; + const jsonKeyExpectedResult = "\t@JsonKey(name: 'Animals')\n"; + const fieldExpectedResult = 'final Pet? animals'; + final result = generator.generatePropertiesContent( + map, {}, className, [], false, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(fieldExpectedResult)); + }); + + test('Should return properties from schema', () { + final map = { + 'Animals': { + 'schema': {'\$ref': '#/definitions/Pet'} + } + }; + + const className = 'Animals'; + const jsonKeyExpectedResult = "\t@JsonKey(name: 'Animals')\n"; + const fieldExpectedResult = 'final Pet? animals'; + final result = generator.generatePropertiesContent( + map, {}, className, [], false, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(fieldExpectedResult)); + }); + + test('Should return properties from default originalRef', () { + final map = { + 'Animals': {'originalRef': 'Pet'} + }; + + const className = 'Animals'; + const jsonKeyExpectedResult = "\t@JsonKey(name: 'animals')\n"; + const fieldExpectedResult = 'final Pet? animals'; + final result = generator.generatePropertiesContent( + map, {}, className, [], false, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(fieldExpectedResult)); + }); + + test('Should return property \$with', () { + final map = { + 'with': {'originalRef': 'Pet'} + }; + + const className = 'Animals'; + const jsonKeyExpectedResult = "\t@JsonKey(name: '\$with')\n"; + const fieldExpectedResult = 'final Pet? \$with'; + final result = generator.generatePropertiesContent( + map, {}, className, [], false, [], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(fieldExpectedResult)); + }); + }); + + group('generateListPropertyContent', () { + test('Should return List', () { + final map = {'items': null}; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + const jsonKeyExpectedResult = "@JsonKey(name: 'Dog', defaultValue: [])"; + + const propertyExpectedResult = 'final List? dog'; + final result = generator.generateListPropertyContent( + propertyName, + propertyKey, + className, + map, + false, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains(jsonKeyExpectedResult)); + expect(result, contains(propertyExpectedResult)); + }); + + test('Should add fromJson and toJson', () { + final map = { + 'items': {'originalRef': 'Dog'} + }; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + final result = generator.generateListPropertyContent( + propertyName, + propertyKey, + className, + map, + false, + ['Dog'], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('toJson: dogListToJson, fromJson: dogListFromJson')); + }); + + test('Should return List', () { + final map = { + 'items': {'originalRef': 'TestOriginalRef'} + }; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + + final result = generator.generateListPropertyContent( + propertyName, + propertyKey, + className, + map, + false, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('final List? dog;')); + }); + + test('Should return List by ref', () { + final map = { + 'items': {'\$ref': '#/definitions/TestObject'} + }; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + + final result = generator.generateListPropertyContent( + propertyName, + propertyKey, + className, + map, + false, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('final List? dog;')); + }); + }); + + group('generatePropertyContentByType', () { + test('Should return property content by schema', () { + final map = {'type': 'enum'}; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + final result = generator.generatePropertyContentByType( + map, + propertyName, + propertyKey, + className, + [], + false, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('toJson: animalsDogToJson, fromJson: animalsDogFromJson')); + }); + + test('Should return property content by schema', () { + final map = {'type': 'array'}; + const propertyName = 'dog'; + const className = 'Animals'; + const propertyKey = 'Dog'; + + final result = generator.generatePropertyContentByType( + map, + propertyName, + propertyKey, + className, + [], + false, + [], + [], + GeneratorOptions(inputFolder: '', outputFolder: ''), + {}, + ); + + expect(result, contains('final List? dog;')); + }); + }); + + group('getModelInheritedProperties', () { + // test('Should generate 2 levels of inheritance', () { + // final result = + // generator.generate(model_with_inheritance, 'MyClass', GeneratorOptions(inputFolder: '', outputFolder: '')); + + // expect(result, contains('class ExtendedErrorModel extends BasicErrorModel')); + // }); + + // test('Should generate 3 levels of inheritance', () { + // final result = generator.generate( + // model_with_inheritance_3_levels, 'MyClass', GeneratorOptions(inputFolder: '', outputFolder: '')); + + // expect(result, contains('class MostExtendedErrorModel extends ExtendedErrorModel')); + + // expect(result, contains('class ExtendedErrorModel extends BasicErrorModel')); + // }); + }); + + group('Tests for getValidatedClassName', () { + test('Should', () { + final result = SwaggerModelsGenerator.getValidatedClassName('Request'); + + expect(result, equals('Request\$')); + }); + }); + + group('Tests for generateGeneralPropertyContent', () { + test('Should', () { + final result = generator.generateGeneralPropertyContent('name', 'key', 'className', [], + {'\$ref': 'ClassNameName'}, ['enums.ClassNameName'], [], GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains('final enums.ClassNameName? name;')); + }); + }); + + group('Tests for generateResponses', () { + test('Should generate empty string for V2', () { + final result = generator2.generateResponses( + schemas_responses_with_response, 'fileName', GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, equals('')); + }); + + test('Should generate class from responses V3', () { + final result = generator.generateResponses( + schemas_responses_with_response, 'fileName', GeneratorOptions(inputFolder: '', outputFolder: '')); + + expect(result, contains('class SpaResponse')); + }); + + test('Should generate class from responses V3 and Schemas', () { + final result = generator.generateResponses( + schemas_responses_with_response_and_schemas, + 'fileName', + GeneratorOptions( + inputFolder: '', + outputFolder: '', + )); + + expect(result, contains('class SpaResponse')); + }); + }); + + group('Tests for getAllEnumNames', () { + test('Should', () { + final result = generator2.getAllEnumNames(enum_as_definition_v2); + + expect(result, contains('enums.SpaResponse')); + }); + + test('Should get enum name from schemas', () { + final result = generator.getAllEnumNames(schemas_with_enums_in_properties); + + expect(result, contains('enums.SpaSchemaSuccessValues')); + }); + + test('Should get enum name from responses', () { + final result = generator.getAllEnumNames(schemas_with_enums_in_properties); + + expect(result, contains('enums.SpaResponse')); + }); + + test('Should get enum name from responses with Enum items', () { + final result = generator.getAllEnumNames(schemas_with_enums_in_properties); + + expect(result, contains('enums.SpaEnumResponseFailedValued')); + }); + }); + group('Tests for models from responses', () { + // test('Should generate correct model from response', () { + // final result = generator.generate( + // request_with_return_type_injected, + // 'my_service', + // GeneratorOptions( + // inputFolder: '', + // outputFolder: '', + // )); + + // expect(result, contains('class ModelItemsGet\$Response')); + // }); + }); +} diff --git a/api_automatic/test/generator_tests/requests_generator_test.dart b/api_automatic/test/generator_tests/requests_generator_test.dart new file mode 100644 index 0000000..414cfda --- /dev/null +++ b/api_automatic/test/generator_tests/requests_generator_test.dart @@ -0,0 +1,57 @@ +import 'package:swagger_dart_code_generator/src/code_generators/swagger_requests_generator.dart'; +import 'package:swagger_dart_code_generator/src/models/generator_options.dart'; +import 'package:test/test.dart'; + +import 'test_data.dart'; + +void main() { + group('Additions generator tests', () { + final generator = SwaggerRequestsGenerator(); + + // test('Should generate CarsApi', () { + // final result = generator.generate( + // code: carsService, + // className: 'CarsService', + // fileName: 'cars_service', + // options: GeneratorOptions( + // inputFolder: '', + // outputFolder: '', + // ignoreHeaders: true, + // responseOverrideValueMap: [ + // ResponseOverrideValueMap( + // method: 'get', + // url: '/cars/schemaRefBody', + // overriddenValue: 'String', + // ) + // ], + // ), + // ); + + // final result2 = generator.generate( + // code: carsService, + // className: 'CarsService', + // fileName: 'cars_service', + // options: GeneratorOptions( + // inputFolder: '', + // outputFolder: '', + // defaultHeaderValuesMap: [ + // DefaultHeaderValueMap( + // defaultValue: '120', + // headerName: 'id', + // ), + // ], + // includePaths: [ + // 'car' + // ]), + // ); + + // expect(result2, contains('Future>')); + // expect(result, contains('Future> carsGet')); + // expect(result, contains('Future> carsPost')); + // expect( + // result, + // contains( + // 'Future> carsAdditionalPut({@Body() required Object? body});')); + // }); + }); +} diff --git a/api_automatic/test/generator_tests/test_data.dart b/api_automatic/test/generator_tests/test_data.dart new file mode 100644 index 0000000..ac8c918 --- /dev/null +++ b/api_automatic/test/generator_tests/test_data.dart @@ -0,0 +1,796 @@ +const ref = '\$ref'; + +const carsService = ''' +{ + "openapi": "3.0.0", + "info": { + "title": "Swagger title", + "description": "Swagger description", + "version": "1.0.0" + }, + "paths": { + "/cars": { + "put": { + "summary": "Sends car to server", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded1", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "post": { + "summary": "Sends car to server", + "requestBody": { + "description": "Car model", + "required": true, + "$ref": "#/components/schemas/CarModel" + }, + "responses": { + "200": { + "description": "Car successfuly loaded2", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "get": { + "summary": "Get car by id and type", + "parameters": [ + { + "name": "id", + "type": "String", + "in": "header", + "required": true, + "description": "This parameter is needed to set id of car" + }, + { + "name": "type", + "type": "enum", + "in": "query", + "items": { + "type": "string" + }, + "required": true, + "description": "This parameter is needed to set type of car" + } + ], + "responses": { + "200": { + "description": "Car received", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + } + }, + "/cars/additional": { + "get": { + "summary": "Sends binary to server", + "parameters": [ + { + "name": "id", + "type": "String", + "in": "header", + "required": true + }, + { + "name": "carEnumType", + "in": "query", + "type": "object", + "schema": { + "$ref": "#/components/schemas/CarType" + } + }, + { + "name": "timestamp", + "type": "String", + "in": "query", + "required": false + } + ], + "responses": { + "200": { + "description": "Car successfuly loaded3", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "put": { + "summary": "Sends binary to server", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "format": "binary" + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded4", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "post": { + "summary": "Sends list of cars to server", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded5", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + } + }, + "/cars/optionalBody": { + "post": { + "summary": "Its needed to test optionalBody", + "responses": { + "200": { + "description": "Car successfuly loaded6", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "put": { + "summary": "Its needed to test cases with form data and body in parameter", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CarType" + } + } + } + } + }, + "parameters": [ + { + "name": "body", + "type": "String", + "in": "body", + "schema": { + "$ref": "#/components/schemas/CarType" + } + }, + { + "name": "formData", + "in": "formData", + "type": "object", + "schema": { + "$ref": "#/components/schemas/CarType" + } + }, + { + "name": "someEnumParameter", + "in": "query", + "items": { + "enum": [ + "one", + "two", + "three" + ] + } + }, + { + "name": "someEnumParameterRef", + "in": "query", + "items": { + "$ref": "#/components/schemas/CarType" + } + }, + { + "name": "someNotEnumParameter", + "in": "query", + "items": { + "$ref": "#/components/schemas/CarModel" + } + }, + { + "name": "parameterWithSchemaItemsRef", + "in": "query", + "schema": { + "items": { + "$ref": "#/components/schemas/CarModel" + } + } + }, + { + "name": "parameterWithSchemaItemsEnumRef", + "in": "query", + "schema": { + "items": { + "$ref": "#/components/schemas/CarType" + } + } + }, + { + "name": "parameterWithSchemaRefNotEnum", + "in": "query", + "schema": { + "$ref": "#/components/schemas/CarModel" + } + }, + { + "name": "parameterWithSchemaRefArray", + "in": "query", + "schema": { + "type": "array", + "$ref": "#/components/schemas/CarModel" + } + }, + { + "name": "parameterWithSchemaTypeArray", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "parameterWithSchemaAnyOf", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string" + } + ] + } + }, + { + "name": "somethingReallyBad", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Car successfuly loaded7", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + } + }, + "/cars/postCarExamples": { + "post": { + "summary": "Its needed to test optionalBody", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "items": { + "$ref": "#/components/schemas/CarType" + } + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded8", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + } + }, + "/cars/schemaRefBody": { + "get": { + "summary": "Overwritten response", + "responses": { + "202": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarType" + } + } + } + } + } + }, + "post": { + "summary": "Its needed to test optionalBody", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarType" + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded9", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + }, + "put": { + "summary": "Its needed to test optionalBody", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarType" + } + } + } + }, + "responses": { + "202": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarType" + } + } + } + } + } + } + }, + "/cars/returnTypeTests": { + "get": { + "summary": "Overwritten response", + "responses": { + "202": { + "description": "Success", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "enum", + "name": "String", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "post": { + "summary": "Overwritten response POST", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CarType" + } + } + } + } + }, + "put": { + "summary": "Overwritten response POST", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "String" + } + } + } + } + }, + "/cars/returnTypeSchema": { + "get": { + "summary": "Return type schema", + "responses": { + "200": { + "description": "Success", + "schema": { + "items": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + }, + "post": { + "summary": "Return type schema", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/components/responses/CarModelResponse" + } + } + } + }, + "put": { + "summary": "Return type schema", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/components/responses/CarModel" + } + } + } + } + }, + "/cars/returnTypeOriginalRef": { + "get": { + "summary": "Return type originalRef", + "responses": { + "200": { + "description": "Success", + "schema": { + "originalRef": "CarModel" + } + } + } + } + }, + "/cars/returnTypeByContent": { + "get": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "$ref": "#/components/responses/CarModel" + } + } + } + } + }, + "put": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOfCars" + } + } + } + } + } + }, + "post": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success with original ref", + "schema": { + "items": { + "originalRef": "CarModel" + } + }, + "content": { + "application/json": { + "responseType": "array" + } + } + } + } + } + }, + "/cars/returnTypeContentItemsRef": { + "get": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "items": { + "$ref": "#/components/responses/CarModel" + } + } + } + } + } + }, + "put": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/responses/CarModel" + } + } + } + } + } + } + }, + "post": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/cars/veryBadResponse": { + "get": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": {} + } + } + } + }, + "put": { + "summary": "Return type by content", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "responseType": "string" + } + } + } + } + } + }, + "/cars/responseWithAbsendRef": { + "put": { + "summary": "Sends car to server not existing ref", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + }, + "responses": { + "200": { + "description": "Car successfuly loaded1", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarMNotExistingCarModelodel" + } + } + } + } + } + }, + "post": { + "summary": "Request body with default type", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CarModelSimple" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/components/responses/CarType" + } + } + } + } + }, + "/cars/oneMoreRequestBody": { + "put": { + "summary": "Sends car to server", + "requestBody": { + "description": "Car model", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModelSimple" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/components/responses/NotExistingCarResponse" + } + } + } + } + } + }, + "components": { + "schemas": { + "CarModelSimple": { + "type": "string" + }, + "CarModel": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "enum", + "name": "String", + "items": { + "type": "string" + } + } + } + }, + "ListOfCars": { + "type": "array", + "items": { + "type": "String" + } + }, + "CarType": { + "type": "string", + "enum": [ + "one", + "two", + "three" + ] + } + }, + "requestBodies": { + "CarModel": { + "type": "object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + }, + "responses": { + "CarModelResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CarModel" + } + } + } + } + } + } +} +'''; diff --git a/build.yaml b/build.yaml index 5d6ece8..6bed0ef 100644 --- a/build.yaml +++ b/build.yaml @@ -1,12 +1,88 @@ +# targets: +# $default: +# builders: +# injectable_generator:injectable_builder: +# options: +# auto_register: true +# # auto registers any class with a name matches the given pattern +# class_name_pattern: +# "Service$|Repository$|Bloc$|UseCases$" +# # auto registers any class inside a file with a +# # name matches the given pattern +# #file_name_pattern: "_service$|_repository$|_bloc$" targets: $default: + sources: + - lib/** + - swaggers/** + - swaggers2/** + - swagger_examples/** + - $package$ builders: + # copy_with_extension_gen: + # enabled: true + # options: + # copy_with_null: true # default is false + # # skip_fields: true injectable_generator:injectable_builder: options: auto_register: true # auto registers any class with a name matches the given pattern class_name_pattern: - "Service$|Repository$|Bloc$|UseCases$" + "Service$|Bloc$|UseCases$" # auto registers any class inside a file with a # name matches the given pattern - #file_name_pattern: "_service$|_repository$|_bloc$" \ No newline at end of file + #file_name_pattern: "_service$|_repository$|_bloc$" + swagger_dart_code_generator: + options: + input_folder: "lib/features/repositories/" + output_folder: "lib/features/repositories/" + use_inheritance: false + with_converter: true + use_default_null_for_lists: false + build_only_models: false + separate_models: true + enums_case_sensitive: false + ignore_headers: true + use_required_attribute_for_headers: false + include_if_null: true + default_api_version: '1.0' + url_parterns: + # - "/public/" + custom_api_version: + - version: "2.0" + urls: "/api/exam/v{version}/public/ExamPackage/GetList,/api/exam/v{version}/public/ExamPackage/GetListIsBuy,/api/exam/v{version}/public/Competition/GetAllCompetitionForDashBoard,/api/exam/v{version}/public/HomePage/GetData,/api/exam/v{version}/public/Exam/GetCategoryCountExam,/api/exam/v{version}/public/HomePage/GetListDataView" + exclude_params: + - "block" + - "blockId" + - "version" + include_paths: + exclude_paths: + - "/api/v1/captcha/refresh/refresh" + - "/api/v1/captcha/show/show" + - "/weatherforecast/get" + response_override_value_map: + request_override_value_map: + # default_header_values_map: + # - header_name: "X-Entitlements-Token" + # default_value: "X-Entitlements-Token" + # - header_name: "X-Cus" + # default_value: "X-Cus" + # - url: "/api/system/v1.0/public/Notify/GetList" + # method: get + # param_name: "" + # overridden_value: "NotifyGetListRequestModel" + + custom_model_path: + - 'package:baseproject/features/model/index.dart' + # - 'package:eschool/core/model/index.dart' + # default_values_map: + # - type_name: String + # default_value: "" + # - type_name: int + # default_value: '0' + # - type_name: double + # default_value: '0' + # - type_name: bool + # default_value: 'false' + diff --git a/lib/core/common/index.dart b/lib/core/common/index.dart new file mode 100644 index 0000000..b2bff38 --- /dev/null +++ b/lib/core/common/index.dart @@ -0,0 +1,13 @@ +export 'injection.dart'; +export 'injection.config.dart'; +export 'custom_interceptor.dart'; +export 'utils.dart'; +export 'message.dart'; +export 'shared_preferences/local_storage_manager.dart'; +export 'loading.dart'; +export 'common_module.dart'; +export 'bloc/bloc_index.dart'; +export 'bloc/base_stateful.dart'; +export 'bloc/base_state.dart'; +export 'bloc/base_cubit.dart'; +export 'validators.dart'; \ No newline at end of file diff --git a/lib/core/common/injection.dart b/lib/core/common/injection.dart index 5bffe07..f29740a 100644 --- a/lib/core/common/injection.dart +++ b/lib/core/common/injection.dart @@ -1,10 +1,17 @@ +import 'package:flutter/foundation.dart'; import 'package:get_it/get_it.dart'; import 'package:injectable/injectable.dart'; import 'injection.config.dart'; +import 'package:baseproject/core/constants/index.dart'; +import 'package:baseproject/features/repositories/hra_repository.dart'; +import 'package:dio/dio.dart'; final GetIt getItSuper = GetIt.instance; @injectableInit void configureInjection() { $initGetIt(getItSuper); + + getItSuper + .registerSingleton(HraRepository(Dio(), baseUrl: kDebugMode ? ApiPath.hra : ApiPathRelease.hra)); } diff --git a/lib/core/components/constants_widget.dart b/lib/core/components/constants_widget.dart index 40814bf..52b701c 100644 --- a/lib/core/components/constants_widget.dart +++ b/lib/core/components/constants_widget.dart @@ -377,4 +377,97 @@ class ConstantWidget { topRight: Radius.circular(28), ), ); + + static ElevatedButton buildPrimaryButton({ + VoidCallback? onPressed, + String text = "", + EdgeInsets? padding, + TextStyle? style, + Widget? child, + double? textScaleFactor, + }) => + ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: CustomColor.bgPriSolid, + padding: padding, + ), + child: child ?? + Text( + text, + style: (style ?? textStyleBodyDefaultBold).copyWith(color: CustomColor.kTextWhiteColor), + textAlign: TextAlign.center, + textScaleFactor: textScaleFactor, + ), + onPressed: onPressed, + ); + + static ElevatedButton buildPrimaryButtonWithIcon( + {VoidCallback? onPressed, + required String text, + required Widget icon, + EdgeInsets? padding, + TextStyle? style}) => + ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: CustomColor.bgPriSolid, + padding: padding, + ), + child: Row( + children: [ + Expanded( + child: Text( + text, + style: (style ?? textStyleBodyDefaultBold).copyWith(color: CustomColor.kTextWhiteColor), + textAlign: TextAlign.center, + ), + ), + icon + ], + ), + onPressed: onPressed, + ); + + static ElevatedButton buildSecondButtonWithIcon( + {VoidCallback? onPressed, required String text, required Widget icon, EdgeInsets? padding}) => + ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xffFDF0E1), + padding: padding, + ), + child: Row( + children: [ + Expanded( + child: Text( + text, + style: textStyleBodyDefaultBold.copyWith(color: CustomColor.darkSecondColor), + textAlign: TextAlign.center, + ), + ), + icon + ], + ), + onPressed: onPressed, + ); + + static ElevatedButton buildDefaultButtonWithIcon( + {VoidCallback? onPressed, required String text, required Widget icon, EdgeInsets? padding}) => + ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: CustomColor.bgSecondSolid, + padding: padding, + ), + child: Row( + children: [ + Expanded( + child: Text( + text, + style: textStyleBodyDefaultBold.copyWith(color: CustomColor.kTextWhiteColor), + textAlign: TextAlign.center, + ), + ), + icon + ], + ), + onPressed: onPressed, + ); } diff --git a/lib/core/components/index.dart b/lib/core/components/index.dart index 5c081c8..27290d3 100644 --- a/lib/core/components/index.dart +++ b/lib/core/components/index.dart @@ -14,3 +14,7 @@ export 'radio/custom_radio_list.dart'; export 'grid_view/custom_gridview.dart'; export 'listview/custom_listview.dart'; export 'custom_pull_to_refresh.dart'; +export 'date/date_time_picker.dart'; +export 'alice.dart'; +export 'tab/custom_tab.dart'; +export 'switch/custom_switch_list_tile.dart'; \ No newline at end of file diff --git a/lib/core/constants/api_path.dart b/lib/core/constants/api_path.dart new file mode 100644 index 0000000..6473bc6 --- /dev/null +++ b/lib/core/constants/api_path.dart @@ -0,0 +1,7 @@ +class ApiPath { + static const String hra = 'https://api.hra.edu.vn'; +} + +class ApiPathRelease { + static const String hra = 'https://api.hra.edu.vn'; +} diff --git a/lib/core/constants/index.dart b/lib/core/constants/index.dart new file mode 100644 index 0000000..400a4a6 --- /dev/null +++ b/lib/core/constants/index.dart @@ -0,0 +1,4 @@ +export 'api_path.dart'; +export 'storage_key.dart'; +export 'constant_string.dart'; +export 'validate_keys.dart'; \ No newline at end of file diff --git a/lib/core/theme/custom_color.dart b/lib/core/theme/custom_color.dart index e82ba57..456a6d0 100644 --- a/lib/core/theme/custom_color.dart +++ b/lib/core/theme/custom_color.dart @@ -17,6 +17,8 @@ class CustomColor { static const Color colorButtonDefault = Color(0xffE1E4FF); static const Color colorButtonBold = Color(0xff5E67BA); static Color colorTextButtonDefault = colorButtonBold; + static const Color bgPriSolid = Color(0xff2fc3a9); + static const Color bgSecondSolid = Color(0xfff19a34); //barrierColor static Color barrierColor = const Color(0xff1B1E37).withValues(alpha: 0.9); diff --git a/lib/features/model/index.dart b/lib/features/model/index.dart new file mode 100644 index 0000000..80165cd --- /dev/null +++ b/lib/features/model/index.dart @@ -0,0 +1 @@ +export 'login_dto.dart'; \ No newline at end of file diff --git a/lib/features/model/login_dto.dart b/lib/features/model/login_dto.dart new file mode 100644 index 0000000..4013792 --- /dev/null +++ b/lib/features/model/login_dto.dart @@ -0,0 +1,27 @@ +class LoginDto { + LoginDto({ + this.userName, + this.password, + this.rememberMe = false, + this.captchaText, + this.captchaToken, + this.captchaInputText, + }); + + String? userName; + String? password; + bool rememberMe; + String? captchaText; + String? captchaToken; + String? captchaInputText; + + Map toJson() => { + 'UserName': userName, + 'Password': password, + 'RememberMe': rememberMe, + 'CaptchaText': captchaText, + 'CaptchaToken': captchaToken, + 'CaptchaInputText': captchaInputText, + }; +} + diff --git a/lib/features/presentation/account/login_screen.dart b/lib/features/presentation/account/login_screen.dart new file mode 100644 index 0000000..2610420 --- /dev/null +++ b/lib/features/presentation/account/login_screen.dart @@ -0,0 +1,157 @@ +import 'package:baseproject/core/common/index.dart'; +import 'package:baseproject/core/components/index.dart'; +import 'package:baseproject/features/model/login_dto.dart'; +import 'package:baseproject/features/usecases/user_use_cases.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({Key? key}) : super(key: key); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + final GlobalKey _formKey = GlobalKey(); + bool _isLoading = false; + String? _error; + bool _rememberMe = false; + + Future _onSubmit() async { + final formState = _formKey.currentState; + if (formState == null) return; + + if (!formState.saveAndValidate()) { + return; + } + + final value = formState.value; + + final dto = LoginDto( + userName: value['userName'] as String?, + password: value['password'] as String?, + rememberMe: _rememberMe, + ); + + setState(() { + _isLoading = true; + _error = null; + }); + + final userUseCases = getItSuper(); + final result = await userUseCases.loginAccount(dto); + + result.fold( + (l) => setState(() { + _error = l; + _isLoading = false; + }), + (r) { + setState(() { + _isLoading = false; + }); + // TODO: điều hướng sang màn hình chính sau khi login thành công + }, + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Đăng nhập'), + ), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(16), + child: FormBuilder( + key: _formKey, + autovalidateMode: AutovalidateMode.onUserInteraction, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + if (_error != null) + Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Text( + _error!, + style: const TextStyle(color: Colors.red), + ), + ), + FormControl( + labelText: 'Tên đăng nhập', + isShowTextRequire: true, + child: TextFormField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + hintText: 'Nhập tên đăng nhập', + ), + validator: FormBuilderValidators.required( + context, + ), + onSaved: (value) { + _formKey.currentState?.setInternalFieldValue( + 'userName', + value, + isUpdateState: false, + ); + }, + ), + ), + const SizedBox(height: 16), + FormControl( + labelText: 'Mật khẩu', + isShowTextRequire: true, + child: TextFormField( + obscureText: true, + decoration: const InputDecoration( + border: OutlineInputBorder(), + hintText: 'Nhập mật khẩu', + ), + validator: FormBuilderValidators.required( + context, + ), + onSaved: (value) { + _formKey.currentState?.setInternalFieldValue( + 'password', + value, + isUpdateState: false, + ); + }, + ), + ), + const SizedBox(height: 8), + Row( + children: [ + Checkbox( + value: _rememberMe, + onChanged: (v) { + setState(() { + _rememberMe = v ?? false; + }); + }, + ), + const Text('Ghi nhớ đăng nhập'), + ], + ), + const SizedBox(height: 24), + SizedBox( + height: 48, + child: ElevatedButton( + onPressed: _isLoading ? null : _onSubmit, + child: _isLoading + ? const CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.white), + ) + : const Text('Đăng nhập'), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/repositories/hra_repository.dart b/lib/features/repositories/hra_repository.dart new file mode 100644 index 0000000..c368404 --- /dev/null +++ b/lib/features/repositories/hra_repository.dart @@ -0,0 +1,1444 @@ +import 'package:baseproject/features/model/index.dart'; +import 'hra_repository_models.dart'; +import 'package:dio/dio.dart'; +import 'package:retrofit/retrofit.dart'; +import 'hra_repository_enums.dart'; +export 'hra_repository_enums.dart'; +export 'hra_repository_models.dart'; + +part 'hra_repository.g.dart'; + +// ************************************************************************** +// The file is generated automatically. Do not edit files +// ************************************************************************** + +@RestApi() +abstract class HraRepository { + factory HraRepository( + Dio dio, { + String baseUrl, + }) = _HraRepository; + + /// + ///@param id + @GET('/api/v1/academic-year/get-by-id') + Future academicYearGetById( + @Query('id') int id); + + /// + @POST('/api/v1/academic-year/save') + Future academicYearSave( + @Body() AcademicYearEntity body); + + /// + @GET('/api/v1/academic-year/get-all') + Future academicYearGetAll(); + + /// + ///@param id + @DELETE('/api/v1/academic-year/delete') + Future academicYearDelete(@Query('id') int id); + + /// + @POST('/api/v1/account/register') + Future accountRegister(@Body() RegisterDto body); + + /// + @POST('/api/v1/account/login') + Future accountLogin(@Body() Object body); + + /// + @POST('/api/v1/account/login-with-google') + Future accountLoginWithGoogle( + @Body() GoogleLoginDto body); + + /// + @POST('/api/v1/account/login-with-facebook') + Future accountLoginWithFacebook( + @Body() FacebookLoginDto body); + + /// + @GET('/api/v1/account/captcha') + Future accountCaptcha(); + + /// + @POST('/api/v1/account/refresh-token') + Future accountRefreshToken(); + + /// + @POST('/api/v1/account/login-with-2fa') + Future accountLoginWith2fa( + @Body() LoginWith2FADto body); + + /// + @GET('/api/v1/account/user-info') + Future accountUserInfo(); + + /// + @POST('/api/v1/account/change-password') + Future accountChangePassword(@Body() ChangePasswordDto body); + + /// + @POST('/api/v1/account/setup-2fa') + Future accountSetup2fa(); + + /// + @POST('/api/v1/account/enable-2fa') + Future accountEnable2fa(@Body() Enable2FADto body); + + /// + @GET('/api/v1/account/get-2fa-status') + Future accountGet2faStatus(); + + /// + @POST('/api/v1/account/disable-2fa') + Future accountDisable2fa(@Body() Disable2FADto body); + + /// + @POST('/api/v1/account/update-avatar') + Future accountUpdateAvatar(@Body() UpdateAvatarDto body); + + /// + @POST('/api/v1/account/update-info') + Future accountUpdateInfo(@Body() UpdateInfoDto body); + + /// + @POST('/api/v1/account/logout') + Future accountLogout(); + + /// + ///@param token + @GET('/api/v1/account/token/validate') + Future accountTokenValidate(@Query('token') String token); + + /// + @GET('/api/v1/account/check-session') + Future accountCheckSession(); + + /// + ///@param userName + @GET('/api/v1/account/check-username') + Future accountCheckUsername( + @Query('userName') String userName); + + /// + @POST('/api/v1/account/check-fogot-password-otp') + Future accountCheckFogotPasswordOtp( + @Body() ForgotPasswordCheckOTPResource body); + + /// + ///@param userName + ///@param captcha + @GET('/api/v1/account/resend-otp') + Future accountResendOtp( + @Query('userName') String userName, + @Query('captcha') String captcha, + ); + + /// + @POST('/api/v1/account/forgot-password') + Future accountForgotPassword( + @Body() ResetPasswordByUserNameResource body); + + /// + @POST('/api/v1/account/get-list') + Future accountGetList( + @Body() UserGetListQuery body); + + /// + ///@param id + @GET('/api/v1/account/get-by-id') + Future accountGetById(@Query('id') int id); + + /// + ///@param userId + @GET('/api/v1/account/get-permission') + Future accountGetPermission( + @Query('userId') int userId); + + /// + ///@param isRessPass + @POST('/api/v1/account/update') + Future accountUpdate( + @Query('isRessPass') bool isRessPass, + @Body() RegisterDto body, + ); + + /// + ///@param userId + @POST('/api/v1/account/update-permission') + Future accountUpdatePermission( + @Query('userId') int userId, + @Body() List body, + ); + + /// + @PUT('/api/v1/account/update-email') + Future accountUpdateEmail(@Body() ChangeEmailDto body); + + /// + ///@param id + @DELETE('/api/v1/account/delete/{id}') + Future accountDeleteId(@Path('id') int id); + + /// + ///@param type + @POST('/api/v1/account/get-list-by-type') + Future accountGetListByType( + @Query('type') int type); + + /// + ///@param id + @GET('/api/v1/activity/{id}') + Future activityId(@Path('id') int id); + + /// + @POST('/api/v1/activity') + Future activity(@Body() ActivitySaveDto body); + + /// + @POST('/api/v1/activity/list') + Future activityList( + @Body() ActivityGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/activity/delete/{id}') + Future activityDeleteId(@Path('id') int id); + + /// + @POST('/api/v1/activity-log') + Future activityLog( + @Body() ActivityLogEntity body); + + /// + @POST('/api/v1/activity-log/list') + Future activityLogList( + @Body() GetListLogQuery body); + + /// + @POST('/api/v1/ai/chat-with-prompt') + Future aiChatWithPrompt(@Body() AiPromptRequest body); + + /// + @POST('/api/v1/ai/chat') + Future aiChat(@Body() AiChatRequest body); + + /// + @POST('/api/v1/ai/chat-simple') + Future aiChatSimple(@Body() SimpleChatRequest body); + + /// + ///@param id + @GET('/api/v1/ai-prompt/{id}') + Future aiPromptId(@Path('id') int id); + + /// + ///@param code + ///@param grade + ///@param categoryId + @GET('/api/v1/ai-prompt/by-code/{code}') + Future aiPromptByCodeCode( + @Queries() AiPromptByCodeCodeRequest aiPromptByCodeCodeRequest); + + /// + @POST('/api/v1/ai-prompt') + Future aiPrompt(@Body() AiPromptEntity body); + + /// + @POST('/api/v1/ai-prompt/list') + Future aiPromptList( + @Body() AiPromptGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/ai-prompt/delete/{id}') + Future aiPromptDeleteId(@Path('id') int id); + + /// + @POST('/api/v1/assign-exam/list-exam-of-user') + Future assignExamListExamOfUser( + @Body() AssignExamListExamFilterDto body); + + /// + @POST('/api/v1/assign-exam/assign-exam-update') + Future assignExamAssignExamUpdate( + @Body() AssignExamEntity body); + + /// + @POST('/api/v1/assign-exam/assign-exam-add-multiple') + Future assignExamAssignExamAddMultiple( + @Body() AssignExamAddMultipleDto body); + + /// + @POST('/api/v1/assign-exam/assign-exam-check-do-exam') + Future assignExamAssignExamCheckDoExam( + @Body() int body); + + /// + ///@param classId + @GET('/api/v1/assign-exam/assign-exam-user-count') + Future assignExamAssignExamUserCount( + @Query('classId') int classId); + + /// + ///@param pageSize + @GET('/api/v1/assign-exam/assign-exam-done') + Future assignExamAssignExamDone( + @Query('pageSize') int pageSize); + + /// + ///@param pageSize + @GET('/api/v1/assign-exam/assign-exam-need-do') + Future assignExamAssignExamNeedDo( + @Query('pageSize') int pageSize); + + /// + ///@param assignExamId + @DELETE('/api/v1/assign-exam/assign-exam-delete') + Future assignExamAssignExamDelete( + @Query('assignExamId') int assignExamId); + + /// + ///@param assignExamId + @GET('/api/v1/assign-exam/assign-exam-top-difficult-question') + Future + assignExamAssignExamTopDifficultQuestion( + @Query('assignExamId') int assignExamId); + + /// + ///@param assignExamId + @GET('/api/v1/assign-exam/assign-exam-score-distribution') + Future + assignExamAssignExamScoreDistribution( + @Query('assignExamId') int assignExamId); + + /// + @POST('/api/v1/assign-exam/assign-exam-list-by-exam-id') + Future + assignExamAssignExamListByExamId( + @Body() AssignExamListByExamIdFilterDto body); + + /// + @GET('/api/v1/cart/my') + Future cartMy(); + + /// + @POST('/api/v1/cart/add-item') + Future cartAddItem(@Body() CartAddItemDto body); + + /// + @PUT('/api/v1/cart/update-item') + Future cartUpdateItem(@Body() CartUpdateItemDto body); + + /// + ///@param cartItemId + @DELETE('/api/v1/cart/remove-item/{cartItemId}') + Future cartRemoveItemCartItemId( + @Path('cartItemId') int cartItemId); + + /// + @POST('/api/v1/cart/clear') + Future cartClear(); + + /// + ///@param id + @GET('/api/v1/category/{id}') + Future categoryId(@Path('id') int id); + + /// + @POST('/api/v1/category') + Future category(@Body() CategoryEntity body); + + /// + @POST('/api/v1/category/list') + Future categoryList( + @Body() CategoryGetListQuery body); + + /// + @POST('/api/v1/category/list-with-news-count') + Future categoryListWithNewsCount( + @Body() CategoryGetListWithNewsCountQuery body); + + /// + @POST('/api/v1/category/list-with-gallery-count') + Future + categoryListWithGalleryCount( + @Body() CategoryGetListWithGalleryCountQuery body); + + /// + ///@param id + @DELETE('/api/v1/category/delete/{id}') + Future categoryDeleteId(@Path('id') int id); + + /// + ///@param keyword + ///@param pageIndex + ///@param pageSize + @POST('/api/v1/chat/list-chat-group-of-user') + Future chatListChatGroupOfUser( + @Queries() ChatListChatGroupOfUserRequest chatListChatGroupOfUserRequest); + + /// + @POST('/api/v1/chat/create-chat-group') + Future chatCreateChatGroup( + @Body() CreateChatGroupDto body); + + /// + ///@param chatGroupId + @POST('/api/v1/chat/get-detail-chat-group') + Future chatGetDetailChatGroup( + @Query('chatGroupId') int chatGroupId); + + /// + ///@param chatGroupId + ///@param skipSize + ///@param pageSize + @POST('/api/v1/chat/get-list-message-by-groupid') + Future + chatGetListMessageByGroupid( + @Queries() + ChatGetListMessageByGroupidRequest + chatGetListMessageByGroupidRequest); + + /// + @POST('/api/v1/chat/get-list-user-for-create-chat') + Future chatGetListUserForCreateChat( + @Body() GetListUserForCreateChatGroupQuery body); + + /// + ///@param documentId + @POST('/api/v1/chat/create-chat-group-of-document') + Future chatCreateChatGroupOfDocument( + @Query('documentId') int documentId); + + /// + ///@param chatGroupId + @POST('/api/v1/chat/add-user-to-chat-group') + Future chatAddUserToChatGroup( + @Query('chatGroupId') int chatGroupId); + + /// + ///@param chatGroupId + @POST('/api/v1/chat/update-message-un-read') + Future chatUpdateMessageUnRead( + @Query('chatGroupId') int chatGroupId); + + /// + @POST('/api/v1/class/list') + Future classList(@Body() ClassGetListFilter body); + + /// + ///@param id + @GET('/api/v1/class/get-by-id') + Future classGetById(@Query('id') int id); + + /// + @POST('/api/v1/class/save') + Future classSave(@Body() ClassEntity body); + + /// + ///@param id + @DELETE('/api/v1/class/delete') + Future classDelete(@Query('id') int id); + + /// + @POST('/api/v1/class/change-class') + Future classChangeClass(@Body() ClassChangeClassCommand body); + + /// + @POST('/api/v1/class/add-list-user') + Future classAddListUser(@Body() ClassAddListUserCommand body); + + /// + @POST('/api/v1/class/add-teacher') + Future classAddTeacher(@Body() List body); + + /// + @POST('/api/v1/class/update-manager') + Future classUpdateManager(@Body() TeacherUpdateManagerCommand body); + + /// + @POST('/api/v1/class/remove-user') + Future classRemoveUser(@Body() ClassRemoveUserCommand body); + + /// + @POST('/api/v1/class/get-pupil-in-class') + Future classGetPupilInClass( + @Body() PupilFilterDto body); + + /// + ///@param classId + @GET('/api/v1/class/pupil-export') + Future classPupilExport(@Query('classId') int classId); + + /// + @POST('/api/v1/class/get-teacher-in-class') + Future classGetTeacherInClass( + @Body() TeacherFilterDto body); + + /// + ///@param classId + @GET('/api/v1/class/teacher-export') + Future classTeacherExport(@Query('classId') int classId); + + /// + @POST('/api/v1/class/teacher-update-subjects') + Future classTeacherUpdateSubjects( + @Body() TeacherUpdateSubjectsCommand body); + + /// + @GET('/api/v1/class/template-import-teacher') + Future classTemplateImportTeacher(); + + /// + ///@param classId + @PUT('/api/v1/class/import-teacher') + Future classImportTeacher( + @Query('classId') int classId, + @Body() Object body, + ); + + /// + @GET('/api/v1/class/template-import-pupil') + Future classTemplateImportPupil(); + + /// + ///@param classId + @PUT('/api/v1/class/import-pupil') + Future classImportPupil( + @Query('classId') int classId, + @Body() Object body, + ); + + /// + ///@param classId + @GET('/api/v1/class/class-statistical') + Future classClassStatistical( + @Query('classId') int classId); + + /// + ///@param classId + ///@param pageSize + @GET('/api/v1/class/assign-exam-top-average-scores') + Future> classAssignExamTopAverageScores( + @Query('classId') int classId, + @Query('pageSize') int pageSize, + ); + + /// + @POST('/api/v1/class/assign-exam-result') + Future classAssignExamResult( + @Body() ExamResultFilterDto body); + + /// + ///@param classId + ///@param pageSize + @GET('/api/v1/class/assign-exam-top-needs-to-do-homework') + Future> classAssignExamTopNeedsToDoHomework( + @Query('classId') int classId, + @Query('pageSize') int pageSize, + ); + + /// + ///@param classId + @GET('/api/v1/class/assign-exam-result-export') + Future classAssignExamResultExport(@Query('classId') int classId); + + /// + @POST('/api/v1/class/assign-exam-list-by-class') + Future classAssignExamListByClass( + @Body() AssignExamListByClassQuery body); + + /// + @POST('/api/v1/class/assign-exam-add') + Future classAssignExamAdd(@Body() AssignExamAddDto body); + + /// + @POST('/api/v1/class/assign-exam-list-users') + Future> classAssignExamListUsers( + @Body() AssignExamListUserFilterDto body); + + /// + @PUT('/api/v1/class/assign-exam-update-time') + Future classAssignExamUpdateTime(@Body() AssignExamUpdateTimeDto body); + + /// + ///@param id + @GET('/api/v1/class/assign-exam-get-by-id') + Future classAssignExamGetById(@Query('id') int id); + + /// + ///@param id + @GET('/api/v1/class/assign-exam-get-detail') + Future classAssignExamGetDetail(@Query('id') int id); + + /// + @PUT('/api/v1/class/assign-exam-update-note') + Future classAssignExamUpdateNote(@Body() AssignExamUpdateNoteDto body); + + /// + ///@param assignExamId + ///@param userId + @GET('/api/v1/class/assign-exam-user-get-note') + Future classAssignExamUserGetNote( + @Query('assignExamId') int assignExamId, + @Query('userId') int userId, + ); + + /// + ///@param classId + @GET('/api/v1/class/class-with-pupils') + Future> classClassWithPupils( + @Query('classId') int classId); + + /// + @POST('/api/v1/class/pupil-change-password') + Future classPupilChangePassword( + @Body() PupilChangePasswordCommand body); + + /// + @POST('/api/v1/class/pupil-add-multi') + Future classPupilAddMulti(@Body() PupilAddMultiCommand body); + + /// + ///@param pageSize + @GET('/api/v1/class/class-of-pupil') + Future> classClassOfPupil( + @Query('pageSize') int pageSize); + + /// + ///@param classId + ///@param userId + @GET('/api/v1/class/teacher-get-subject') + Future> classTeacherGetSubject( + @Query('classId') int classId, + @Query('userId') int userId, + ); + + /// + ///@param schoolId + ///@param userId + @GET('/api/v1/class/class-get-by-user') + Future> classClassGetByUser( + @Query('schoolId') int schoolId, + @Query('userId') int userId, + ); + + /// + @POST('/api/v1/class/class-list-of-school') + Future classClassListOfSchool( + @Body() ClassListOfSchoolFilter body); + + /// + @POST('/api/v1/class/pupil-copy-from-class') + Future classPupilCopyFromClass(@Body() PupilCopyFromClassCommand body); + + /// + ///@param classId + @GET('/api/v1/class/pupil-check-go-to-class') + Future classPupilCheckGoToClass( + @Query('classId') int classId); + + /// + @POST('/api/v1/class/pupil-go-to-class') + Future classPupilGoToClass(@Body() PupilGoToClassCommand body); + + /// + ///@param classId + ///@param userId + @GET('/api/v1/class/class-analysis-data') + Future classClassAnalysisData( + @Query('classId') int classId, + @Query('userId') int userId, + ); + + /// + @POST('/api/v1/consultation-registration') + Future consultationRegistration( + @Body() ConsultationRegistrationSaveDto body); + + /// + @POST('/api/v1/consultation-registration/list') + Future + consultationRegistrationList( + @Body() ConsultationRegistrationGetListQuery body); + + /// + ///@param id + @PUT('/api/v1/consultation-registration/update-status/{id}') + Future consultationRegistrationUpdateStatusId( + @Path('id') int id, + @Body() ConsultationRegistrationUpdateStatusRequest body, + ); + + /// + @POST('/api/v1/contact') + Future contact(@Body() ContactSaveDto body); + + /// + @POST('/api/v1/contact/list') + Future contactList( + @Body() ContactGetListQuery body); + + /// + ///@param id + @PUT('/api/v1/contact/update-status/{id}') + Future contactUpdateStatusId( + @Path('id') int id, + @Body() ContactUpdateStatusRequest body, + ); + + /// + @POST('/api/v1/department/list') + Future departmentList( + @Body() DepartmentGetListQuery body); + + /// + @POST('/api/v1/department/schools') + Future departmentSchools( + @Body() DepartmentSchoolFilterDto body); + + /// + @POST('/api/v1/department/count') + Future departmentCount( + @Body() DepartmentCountQuery body); + + /// + @GET('/api/v1/department/manager-position') + Future departmentManagerPosition(); + + /// + @GET('/api/v1/documents/status') + Future documentsStatus(); + + /// + @GET('/api/v1/documents/export/srs-word') + Future documentsExportSrsWord(); + + /// + @GET('/api/v1/documents/export/brd-word') + Future documentsExportBrdWord(); + + /// + @GET('/api/v1/documents/brd/info') + Future documentsBrdInfo(); + + /// + @GET('/api/v1/documents/srs/info') + Future documentsSrsInfo(); + + /// + ///@param fileName + @GET('/api/v1/documents/brd/preview/{fileName}') + Future documentsBrdPreviewFileName( + @Path('fileName') String fileName); + + /// + ///@param fileName + @GET('/api/v1/documents/srs/preview/{fileName}') + Future documentsSrsPreviewFileName( + @Path('fileName') String fileName); + + /// + @POST('/api/v1/exam/list') + Future examList( + @Body() ExamGetListQuery body); + + /// + ///@param id + @GET('/api/v1/exam/get-by-id') + Future examGetById(@Query('id') int id); + + /// + ///@param id + @GET('/api/v1/exam/get-detail') + Future examGetDetail(@Query('id') int id); + + /// + ///@param id + @GET('/api/v1/exam/get-by-learn') + Future examGetByLearn(@Query('id') int id); + + /// + ///@param byImport + @POST('/api/v1/exam/save') + Future examSave( + @Query('byImport') bool byImport, + @Body() Object body, + ); + + /// + ///@param id + @DELETE('/api/v1/exam/delete') + Future examDelete(@Query('id') int id); + + /// + ///@param id + @GET('/api/v1/exam/ckeck-data-delete') + Future examCkeckDataDelete( + @Query('id') int id); + + /// + @POST('/api/v1/exam/save-file') + Future examSaveFile(@Body() ExamFileSaveDto body); + + /// + @PUT('/api/v1/exam/import') + Future examImport(@Body() Object body); + + /// + ///@param Id + ///@param id + @GET('/api/v1/file/{id}') + Future fileId( + @Query('Id') int id, + @Path('id') String id$, + ); + + /// + ///@param id + @GET('/api/v1/file/get-meta') + Future fileGetMeta(@Query('id') int id); + + /// + @POST('/api/v1/file') + Future file(@Body() FileUpdateCommand body); + + /// + @POST('/api/v1/file/avatar') + Future fileAvatar(@Body() FileUpdateAvatarCommand body); + + /// + @POST('/api/v1/file/name') + Future fileName(@Body() FileUpdateNameCommand body); + + /// + @POST('/api/v1/file/status') + Future fileStatus(@Body() FileUpdateStatusCommand body); + + /// + @POST('/api/v1/file/list') + Future fileList( + @Body() FileGetListQuery body); + + /// + ///@param request + @GET('/api/v1/file/folder-all') + Future> fileFolderAll( + @Query('request') FolderGetAllQuery request); + + /// + ///@param Id + ///@param id + @GET('/api/v1/file/folder/{id}') + Future fileFolderId( + @Query('Id') int id, + @Path('id') String id$, + ); + + /// + @POST('/api/v1/file/folder') + Future fileFolder(@Body() FolderUpdateCommand body); + + /// + @POST('/api/v1/file/folder/list') + Future fileFolderList( + @Body() FolderGetListQuery body); + + /// + @POST('/api/v1/file/folder/delete') + Future fileFolderDelete(@Body() FolderDeleteCommand body); + + /// + ///@param url + @POST('/api/v1/file/file/upload-by-url') + Future fileFileUploadByUrl( + @Query('url') String url); + + /// + ///@param id + @GET('/api/v1/gallery/{id}') + Future galleryId(@Path('id') int id); + + /// + @POST('/api/v1/gallery') + Future gallery(@Body() GallerySaveDto body); + + /// + @POST('/api/v1/gallery/list') + Future galleryList( + @Body() GalleryGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/gallery/delete/{id}') + Future galleryDeleteId(@Path('id') int id); + + /// + @GET('/api/v1/locality/ids') + Future localityIds(); + + /// + @POST('/api/v1/locality/list') + Future localityList( + @Body() LocalityGetListQuery body); + + /// + ///@param id + @GET('/api/v1/news/{id}') + Future newsId(@Path('id') int id); + + /// + @POST('/api/v1/news') + Future news(@Body() NewsSaveDto body); + + /// + @POST('/api/v1/news/list') + Future newsList( + @Body() NewsGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/news/delete/{id}') + Future newsDeleteId(@Path('id') int id); + + /// + ///@param page + ///@param pageSize + @POST('/api/v1/notification/list') + Future notificationList( + @Query('page') int page, + @Query('pageSize') int pageSize, + ); + + /// + ///@param notificationId + @POST('/api/v1/notification/{notificationId}/mark-as-read') + Future notificationNotificationIdMarkAsRead( + @Path('notificationId') int notificationId); + + /// + @POST('/api/v1/notification/mark-all-as-read') + Future notificationMarkAllAsRead(); + + /// + @GET('/api/v1/notification/count-un-read') + Future notificationCountUnRead(); + + /// + @POST('/api/v1/objectlike/object-like-save') + Future objectlikeObjectLikeSave(@Body() ObjectLikeSaveCommand body); + + /// + @POST('/api/v1/office/list') + Future officeList( + @Body() OfficeGetListQuery body); + + /// + @POST('/api/v1/order/create') + Future orderCreate(@Body() OrderCreateDto body); + + /// + @POST('/api/v1/order/list') + Future orderList( + @Body() OrderGetListQuery body); + + /// + @POST('/api/v1/order/list-my') + Future orderListMy( + @Body() OrderGetListQuery body); + + /// + ///@param id + @GET('/api/v1/order/{id}') + Future orderId(@Path('id') int id); + + /// + ///@param id + @PUT('/api/v1/order/{id}') + Future putOrderId( + @Path('id') int id, + @Body() OrderUpdateDto body, + ); + + /// + ///@param id + @PUT('/api/v1/order/{id}/status') + Future orderIdStatus( + @Path('id') int id, + @Body() Object body, + ); + + /// + ///@param id + @PUT('/api/v1/order/{id}/notes') + Future orderIdNotes( + @Path('id') int id, + @Body() String body, + ); + + /// + @POST('/api/v1/order/create-with-class') + Future orderCreateWithClass( + @Body() OrderCreateWithClassDto body); + + /// + ///@param id + @GET('/api/v1/product/{id}') + Future productId(@Path('id') int id); + + /// + ///@param id + @GET('/api/v1/product/detail/{id}') + Future productDetailId(@Path('id') int id); + + /// + @POST('/api/v1/product') + Future product(@Body() ProductSaveDto body); + + /// + @POST('/api/v1/product/list') + Future productList( + @Body() ProductGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/product/delete/{id}') + Future productDeleteId(@Path('id') int id); + + /// + ///@param id + @POST('/api/v1/product/{id}/reviews') + Future productIdReviews( + @Path('id') int id, + @Body() ProductReviewCreateDto body, + ); + + /// + ///@param id + @POST('/api/v1/product/{id}/reviews/list') + Future productIdReviewsList( + @Path('id') int id, + @Body() ProductReviewGetListQuery body, + ); + + /// + ///@param id + @POST('/api/v1/product/reviews/{id}/approve') + Future productReviewsIdApprove( + @Path('id') int id, + @Body() ProductReviewApproveCommand body, + ); + + /// + @POST('/api/v1/product/reviews/admin-list') + Future productReviewsAdminList( + @Body() ProductReviewGetListQuery body); + + /// + ///@param id + @POST('/api/v1/product/{id}/reviews/generate-ai') + Future productIdReviewsGenerateAi( + @Path('id') int id, + @Body() ProductReviewGenerateAiRequest body, + ); + + /// + @POST('/api/v1/product/by-ids') + Future productByIds( + @Body() ProductGetByIdsQuery body); + + /// + @GET('/api/v1/product/purchase-config') + Future productPurchaseConfig(); + + /// + ///@param id + ///@param onlyAvailable + @GET('/api/v1/product/{id}/classes') + Future productIdClasses( + @Path('id') int id, + @Query('onlyAvailable') bool onlyAvailable, + ); + + /// + ///@param classId + ///@param userId + ///@param subjectId + @GET('/api/v1/pupil/pupil-static') + Future pupilPupilStatic( + @Queries() PupilPupilStaticRequest pupilPupilStaticRequest); + + /// + @POST('/api/v1/pupil/pupil-history-do-exam') + Future pupilPupilHistoryDoExam( + @Body() PupilHistoryDoExamFilterDto body); + + /// + ///@param classId + ///@param userId + ///@param subjectId + @GET('/api/v1/pupil/pupil-static-by-type-exam') + Future pupilPupilStaticByTypeExam( + @Queries() + PupilPupilStaticByTypeExamRequest pupilPupilStaticByTypeExamRequest); + + /// + @POST('/api/v1/pupil/pupil-statistical-of-class') + Future pupilPupilStatisticalOfClass( + @Body() ClassPupilStatisticalFilter body); + + /// + @POST('/api/v1/question/list') + Future questionList( + @Body() QuestionGetListQuery body); + + /// + ///@param id + @GET('/api/v1/question/get-by-id') + Future questionGetById(@Query('id') int id); + + /// + @POST('/api/v1/question/get-by-ids') + Future> questionGetByIds(); + + /// + @POST('/api/v1/question/save') + Future questionSave(@Body() Object body); + + /// + ///@param id + @DELETE('/api/v1/question/delete') + Future questionDelete(@Query('id') int id); + + /// + @PUT('/api/v1/question/import') + Future questionImport(@Body() Object body); + + /// + @POST('/api/v1/role/save') + Future roleSave(@Body() RoleDto body); + + /// + ///@param id + @GET('/api/v1/role/{id}') + Future roleId(@Path('id') int id); + + /// + ///@param keyword + @GET('/api/v1/role/list') + Future roleList(@Query('keyword') String keyword); + + /// + @GET('/api/v1/role/list-module') + Future roleListModule(); + + /// + ///@param id + @DELETE('/api/v1/role/delete') + Future roleDelete(@Query('id') String id); + + /// + ///@param id + @GET('/api/v1/safety-skill/{id}') + Future safetySkillId(@Path('id') int id); + + /// + @POST('/api/v1/safety-skill') + Future safetySkill( + @Body() SafetySkillEntity body); + + /// + @POST('/api/v1/safety-skill/list') + Future safetySkillList( + @Body() SafetySkillGetListQuery body); + + /// + ///@param id + @DELETE('/api/v1/safety-skill/delete/{id}') + Future safetySkillDeleteId(@Path('id') int id); + + /// + @POST('/api/v1/school/list') + Future schoolList( + @Body() SchoolGetListQuery body); + + /// + ///@param id + @GET('/api/v1/school/get-by-id') + Future schoolGetById(@Query('id') int id); + + /// + @POST('/api/v1/school/save') + Future schoolSave(@Body() SchoolEntity body); + + /// + ///@param id + @DELETE('/api/v1/school/delete') + Future schoolDelete(@Query('id') int id); + + /// + ///@param schoolId + @PUT('/api/v1/school/quylx-school-import-pupil') + Future schoolQuylxSchoolImportPupil( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @PUT('/api/v1/school/quylx-school-import-teacher') + Future schoolQuylxSchoolImportTeacher( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @PUT('/api/v1/school/school-import-pupil') + Future schoolSchoolImportPupil( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @PUT('/api/v1/school/school-import-pupil-preview') + Future> schoolSchoolImportPupilPreview( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @PUT('/api/v1/school/school-import-teacher') + Future schoolSchoolImportTeacher( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @PUT('/api/v1/school/school-import-teacher-preview') + Future> schoolSchoolImportTeacherPreview( + @Query('schoolId') int schoolId, + @Body() Object body, + ); + + /// + ///@param schoolId + @POST('/api/v1/school/teacher-create') + Future schoolTeacherCreate( + @Query('schoolId') int schoolId, + @Body() TeacherCreateDto body, + ); + + /// + @POST('/api/v1/school/teacher-assign-existing') + Future schoolTeacherAssignExisting( + @Body() AssignExistingTeacherDto body); + + /// + @GET('/api/v1/school/list-by-user') + Future schoolListByUser(); + + /// + @POST('/api/v1/school/teacher-get-by-school') + Future schoolTeacherGetBySchool( + @Body() TeacherGetBySchoolFilterDto body); + + /// + ///@param schoolId + @GET('/api/v1/school/static-count') + Future schoolStaticCount( + @Query('schoolId') int schoolId); + + /// + ///@param schoolId + @GET('/api/v1/school/class-program-types') + Future schoolClassProgramTypes( + @Query('schoolId') int schoolId); + + /// + @POST('/api/v1/school/class-program-types') + Future postSchoolClassProgramTypes( + @Body() ClassProgramTypeEntity body); + + /// + ///@param id + @DELETE('/api/v1/school/class-program-types') + Future deleteSchoolClassProgramTypes(@Query('id') int id); + + /// + @GET('/api/v1/statistical/static-number') + Future statisticalStaticNumber(); + + /// + @GET('/api/v1/statistical/class') + Future statisticalClass(); + + /// + @GET('/api/v1/statistical/exam') + Future statisticalExam(); + + /// + @GET('/api/v1/statistical/question') + Future statisticalQuestion(); + + /// + @GET('/api/v1/statistical/pupil') + Future statisticalPupil(); + + /// + @GET('/api/v1/statistical/pupil-number') + Future statisticalPupilNumber(); + + /// + @GET('/api/v1/system/init') + Future systemInit(); + + /// + ///@param id + @GET('/api/v1/tag/{id}') + Future tagId(@Path('id') int id); + + /// + @POST('/api/v1/tag') + Future tag(@Body() TagDto body); + + /// + @POST('/api/v1/tag/list') + Future tagList( + @Body() TagGetListQuery body); + + /// + @POST('/api/v1/tag/list-by-ids') + Future tagListByIds(); + + /// + ///@param id + @DELETE('/api/v1/tag/delete/{id}') + Future tagDeleteId(@Path('id') int id); + + /// + ///@param id + ///@param IsHot + @PUT('/api/v1/tag/update-hot') + Future tagUpdateHot( + @Query('id') int id, + @Query('IsHot') bool isHot, + ); + + /// + ///@param id + ///@param newsId + @PUT('/api/v1/tag/remove-news') + Future tagRemoveNews( + @Query('id') int id, + @Query('newsId') int newsId, + ); + + /// + @PUT('/api/v1/tag/add-news') + Future tagAddNews(@Body() TagAddNewsDto body); + + /// + @POST('/api/v1/tag/list-with-news-count') + Future tagListWithNewsCount( + @Body() TagGetListWithNewsCountQuery body); + + /// + ///@param classId + ///@param userId + ///@param subjectId + @GET('/api/v1/teacher/static-by-type-exam') + Future teacherStaticByTypeExam( + @Queries() TeacherStaticByTypeExamRequest teacherStaticByTypeExamRequest); + + /// + @GET('/api/v1/test/test-kafka') + Future testTestKafka(); + + /// + @GET('/api/v1/test/test-parsejson') + Future testTestParsejson(); + + /// + @GET('/api/v1/test/test-log') + Future testTestLog(); + + /// + ///@param email + ///@param classId + @POST('/api/v1/user/get-by-email') + Future userGetByEmail( + @Query('email') String email, + @Query('classId') int classId, + ); + + /// + @GET('/api/v1/user/template-import') + Future userTemplateImport(); + + /// + @POST('/api/v1/user/import-user') + Future userImportUser(@Body() Object body); + + /// + ///@param id + @GET('/api/v1/user-exam-result/get-by-id') + Future userExamResultGetById( + @Query('id') int id); + + /// + @POST('/api/v1/user-exam-result/save') + Future userExamResultSave( + @Body() UserExamResultDto body); + + /// + @POST('/api/v1/user-exam-result/comment') + Future userExamResultComment( + @Body() UserAnswerEntity body); + + /// + ///@param userExamResultId + ///@param comment + @POST('/api/v1/user-exam-result/change-mark') + Future userExamResultChangeMark( + @Queries() + UserExamResultChangeMarkRequest userExamResultChangeMarkRequest); + + /// + @POST('/api/v1/user-exam-result/essay-suggestion-mark') + Future userExamResultEssaySuggestionMark( + @Body() EssaySuggestionMarkDto body); + + /// + @POST('/api/v1/user-mobile-token/save') + Future userMobileTokenSave( + @Body() UserMobileTokenUpdateCommand body); + + /// + ///@param UserId + ///@param id + @GET('/api/v1/user-permission/{id}') + Future userPermissionId( + @Query('UserId') int userId, + @Path('id') String id, + ); + + /// + @POST('/api/v1/user-web-token/save') + Future userWebTokenSave( + @Body() UserWebTokenUpdateCommand body); + + /// + @DELETE('/api/v1/user-web-token/delete') + Future userWebTokenDelete( + @Body() UserWebTokenDeleteCommand body); + + /// + @GET('/api/v1/user-web-token/generate') + Future userWebTokenGenerate(); +} diff --git a/lib/features/repositories/hra_repository.g.dart b/lib/features/repositories/hra_repository.g.dart new file mode 100644 index 0000000..2169297 --- /dev/null +++ b/lib/features/repositories/hra_repository.g.dart @@ -0,0 +1,6462 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hra_repository.dart'; + +// ************************************************************************** +// RetrofitGenerator +// ************************************************************************** + +// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers + +class _HraRepository implements HraRepository { + _HraRepository( + this._dio, { + this.baseUrl, + }); + + final Dio _dio; + + String? baseUrl; + + @override + Future academicYearGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/academic-year/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AcademicYearEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future academicYearSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/academic-year/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AcademicYearEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future academicYearGetAll() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/academic-year/get-all', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AcademicYearEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future academicYearDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/academic-year/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountRegister(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/register', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future accountLogin(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/login', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LoginResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountLoginWithGoogle(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/login-with-google', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LoginResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountLoginWithFacebook(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/login-with-facebook', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LoginResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountCaptcha() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/captcha', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DNTCaptchaApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountRefreshToken() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/refresh-token', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RefreshTokenResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountLoginWith2fa(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/login-with-2fa', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LoginResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountUserInfo() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/user-info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserInfoDto.fromJson(_result.data!); + return value; + } + + @override + Future accountChangePassword(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/change-password', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future accountSetup2fa() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/setup-2fa', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = Setup2FADto.fromJson(_result.data!); + return value; + } + + @override + Future accountEnable2fa(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/enable-2fa', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountGet2faStatus() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/get-2fa-status', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountDisable2fa(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/disable-2fa', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountUpdateAvatar(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/update-avatar', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UpdateAvatarDto.fromJson(_result.data!); + return value; + } + + @override + Future accountUpdateInfo(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/update-info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UpdateInfoDto.fromJson(_result.data!); + return value; + } + + @override + Future accountLogout() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/logout', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future accountTokenValidate(token) async { + const _extra = {}; + final queryParameters = {r'token': token}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/token/validate', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future accountCheckSession() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/check-session', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future accountCheckUsername(userName) async { + const _extra = {}; + final queryParameters = {r'userName': userName}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/check-username', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CurrentObjectDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountCheckFogotPasswordOtp(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/check-fogot-password-otp', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ObjectApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountResendOtp( + userName, + captcha, + ) async { + const _extra = {}; + final queryParameters = { + r'userName': userName, + r'captcha': captcha, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/resend-otp', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CurrentObjectDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountForgotPassword(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/forgot-password', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountGetList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/get-list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RegisterDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountGetPermission(userId) async { + const _extra = {}; + final queryParameters = {r'userId': userId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/get-permission', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RoleModuleDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountUpdate( + isRessPass, + body, + ) async { + const _extra = {}; + final queryParameters = {r'isRessPass': isRessPass}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/update', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountUpdatePermission( + userId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'userId': userId}; + final _headers = {}; + final _data = body.map((e) => e.toJson()).toList(); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/update-permission', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountUpdateEmail(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/update-email', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future accountGetListByType( + type) async { + const _extra = {}; + final queryParameters = {r'type': type}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/account/get-list-by-type', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserWithSimpleInfoDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activityId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ActivitySaveDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activity(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ActivityEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activityList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ActivityListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activityDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activityLog(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity-log', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ActivityLogEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future activityLogList( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/activity-log/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ListActivityLogDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiChatWithPrompt(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai/chat-with-prompt', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiChat(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai/chat', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiChatSimple(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai/chat-simple', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiPromptId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai-prompt/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiPromptEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiPromptByCodeCode( + aiPromptByCodeCodeRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(aiPromptByCodeCodeRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai-prompt/by-code/{code}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiPromptEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiPrompt(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai-prompt', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiPromptEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiPromptList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai-prompt/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + AiPromptListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future aiPromptDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/ai-prompt/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamListExamOfUser( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/list-exam-of-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + AssignExamListExamDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamUpdate(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-update', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamAddMultiple(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-add-multiple', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamCheckDoExam( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-check-do-exam', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamCheckDoExamDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamUserCount( + classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-user-count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamCountDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamDone( + pageSize) async { + const _extra = {}; + final queryParameters = {r'pageSize': pageSize}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-done', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamDoneDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamNeedDo( + pageSize) async { + const _extra = {}; + final queryParameters = {r'pageSize': pageSize}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-need-do', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamNeedDoDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future assignExamAssignExamDelete(assignExamId) async { + const _extra = {}; + final queryParameters = {r'assignExamId': assignExamId}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future + assignExamAssignExamTopDifficultQuestion(assignExamId) async { + const _extra = {}; + final queryParameters = {r'assignExamId': assignExamId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType( + Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-top-difficult-question', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamTopDifficultQuestionDtoListApiResponse.fromJson( + _result.data!); + return value; + } + + @override + Future + assignExamAssignExamScoreDistribution(assignExamId) async { + const _extra = {}; + final queryParameters = {r'assignExamId': assignExamId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-score-distribution', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + AssignExamScoreDistributionDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future + assignExamAssignExamListByExamId(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/assign-exam/assign-exam-list-by-exam-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamListByExamIdDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future cartMy() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/cart/my', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CartDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future cartAddItem(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/cart/add-item', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CartDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future cartUpdateItem(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/cart/update-item', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future cartRemoveItemCartItemId(cartItemId) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/cart/remove-item/${cartItemId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future cartClear() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/cart/clear', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future categoryId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CategoryEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future category(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = CategoryEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future categoryList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + CategoryListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future categoryListWithNewsCount( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category/list-with-news-count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + CategoryWithNewsCountDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future + categoryListWithGalleryCount(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category/list-with-gallery-count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + CategoryWithGalleryCountDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future categoryDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/category/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatListChatGroupOfUser( + chatListChatGroupOfUserRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(chatListChatGroupOfUserRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/list-chat-group-of-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ListChatGroupDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatCreateChatGroup(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/create-chat-group', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ChatGroupEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatGetDetailChatGroup( + chatGroupId) async { + const _extra = {}; + final queryParameters = {r'chatGroupId': chatGroupId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/get-detail-chat-group', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ChatGroupDetailDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future + chatGetListMessageByGroupid(chatGetListMessageByGroupidRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(chatGetListMessageByGroupidRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType( + Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/get-list-message-by-groupid', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ListChatMessageByGroupDtoFilterResultApiResponse.fromJson( + _result.data!); + return value; + } + + @override + Future chatGetListUserForCreateChat( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/get-list-user-for-create-chat', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatCreateChatGroupOfDocument( + documentId) async { + const _extra = {}; + final queryParameters = {r'documentId': documentId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/create-chat-group-of-document', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ChatGroupEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatAddUserToChatGroup(chatGroupId) async { + const _extra = {}; + final queryParameters = {r'chatGroupId': chatGroupId}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/add-user-to-chat-group', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future chatUpdateMessageUnRead(chatGroupId) async { + const _extra = {}; + final queryParameters = {r'chatGroupId': chatGroupId}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/chat/update-message-un-read', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future classList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassListDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future classGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassDetailDto.fromJson(_result.data!); + return value; + } + + @override + Future classSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future classChangeClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/change-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classAddListUser(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/add-list-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classAddTeacher(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body.map((e) => e.toJson()).toList(); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/add-teacher', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classUpdateManager(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/update-manager', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classRemoveUser(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/remove-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classGetPupilInClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/get-pupil-in-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = PupilListDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future classPupilExport(classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-export', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classGetTeacherInClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/get-teacher-in-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TeacherListDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future classTeacherExport(classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/teacher-export', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classTeacherUpdateSubjects(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/teacher-update-subjects', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future classTemplateImportTeacher() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/template-import-teacher', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classImportTeacher( + classId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/import-teacher', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classTemplateImportPupil() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/template-import-pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classImportPupil( + classId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/import-pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classClassStatistical(classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-statistical', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassStatisticalDto.fromJson(_result.data!); + return value; + } + + @override + Future> classAssignExamTopAverageScores( + classId, + pageSize, + ) async { + const _extra = {}; + final queryParameters = { + r'classId': classId, + r'pageSize': pageSize, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-top-average-scores', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => + TopAverageScoreDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future classAssignExamResult(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-result', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamResultDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future> classAssignExamTopNeedsToDoHomework( + classId, + pageSize, + ) async { + const _extra = {}; + final queryParameters = { + r'classId': classId, + r'pageSize': pageSize, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-top-needs-to-do-homework', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => + TopNeedsToDoHomeworkDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future classAssignExamResultExport(classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-result-export', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classAssignExamListByClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-list-by-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamListDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future classAssignExamAdd(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-add', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future> classAssignExamListUsers(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-list-users', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => + AssignExamListUserDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future classAssignExamUpdateTime(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-update-time', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classAssignExamGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamEditDto.fromJson(_result.data!); + return value; + } + + @override + Future classAssignExamGetDetail(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-get-detail', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AssignExamDetailDto.fromJson(_result.data!); + return value; + } + + @override + Future classAssignExamUpdateNote(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-update-note', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classAssignExamUserGetNote( + assignExamId, + userId, + ) async { + const _extra = {}; + final queryParameters = { + r'assignExamId': assignExamId, + r'userId': userId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/assign-exam-user-get-note', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future> classClassWithPupils(classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-with-pupils', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => SchoolClassDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future classPupilChangePassword(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-change-password', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classPupilAddMulti(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-add-multi', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future> classClassOfPupil(pageSize) async { + const _extra = {}; + final queryParameters = {r'pageSize': pageSize}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-of-pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => ClassPupilDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future> classTeacherGetSubject( + classId, + userId, + ) async { + const _extra = {}; + final queryParameters = { + r'classId': classId, + r'userId': userId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/teacher-get-subject', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => CategoryEntity.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future> classClassGetByUser( + schoolId, + userId, + ) async { + const _extra = {}; + final queryParameters = { + r'schoolId': schoolId, + r'userId': userId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-get-by-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => ClassByUserDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future classClassListOfSchool(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-list-of-school', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassListOfSchoolDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future classPupilCopyFromClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-copy-from-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classPupilCheckGoToClass( + classId) async { + const _extra = {}; + final queryParameters = {r'classId': classId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-check-go-to-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = PupilCheckGoToClassDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future classPupilGoToClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/pupil-go-to-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future classClassAnalysisData( + classId, + userId, + ) async { + const _extra = {}; + final queryParameters = { + r'classId': classId, + r'userId': userId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/class/class-analysis-data', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future consultationRegistration( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/consultation-registration', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ConsultationRegistrationEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future + consultationRegistrationList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType( + Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/consultation-registration/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ConsultationRegistrationListDtoFilterResultApiResponse.fromJson( + _result.data!); + return value; + } + + @override + Future consultationRegistrationUpdateStatusId( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/consultation-registration/update-status/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future contact(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/contact', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ContactEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future contactList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/contact/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ContactListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future contactUpdateStatusId( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/contact/update-status/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future departmentList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/department/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DepartmentDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future departmentSchools( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/department/schools', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + DepartmentSchoolListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future departmentCount(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/department/count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DepartmentCountDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future departmentManagerPosition() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/department/manager-position', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DeparmentGetManagerPositionDto.fromJson(_result.data!); + return value; + } + + @override + Future documentsStatus() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/status', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ObjectApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsExportSrsWord() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/export/srs-word', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ObjectApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsExportBrdWord() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/export/brd-word', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ObjectApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsBrdInfo() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/brd/info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DocumentInfoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsSrsInfo() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/srs/info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DocumentInfoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsBrdPreviewFileName( + fileName) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/brd/preview/${fileName}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DocumentPreviewResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future documentsSrsPreviewFileName( + fileName) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/documents/srs/preview/${fileName}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DocumentPreviewResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = + await _dio.fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamDto.fromJson(_result.data!); + return value; + } + + @override + Future examGetDetail(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = + await _dio.fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/get-detail', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamDto.fromJson(_result.data!); + return value; + } + + @override + Future examGetByLearn(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/get-by-learn', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamLearnDto.fromJson(_result.data!); + return value; + } + + @override + Future examSave( + byImport, + body, + ) async { + const _extra = {}; + final queryParameters = {r'byImport': byImport}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamSaveDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examCkeckDataDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/ckeck-data-delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamDataBeforeDeleteDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examSaveFile(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/save-file', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = Int64ApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future examImport(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/exam/import', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ExamDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future fileId( + id, + id$, + ) async { + const _extra = {}; + final queryParameters = {r'Id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/${id$}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FileEntity.fromJson(_result.data!); + return value; + } + + @override + Future fileGetMeta(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/get-meta', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FileMetaDataEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future file(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FileEntity.fromJson(_result.data!); + return value; + } + + @override + Future fileAvatar(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/avatar', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future fileName(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/name', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future fileStatus(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/status', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future fileList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FileEntityFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future> fileFolderAll(request) async { + const _extra = {}; + final queryParameters = {r'request': request.toJson()}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/folder-all', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => FolderEntity.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future fileFolderId( + id, + id$, + ) async { + const _extra = {}; + final queryParameters = {r'Id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/folder/${id$}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FolderEntity.fromJson(_result.data!); + return value; + } + + @override + Future fileFolder(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/folder', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FolderEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future fileFolderList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/folder/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FolderNodeDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future fileFolderDelete(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/folder/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future fileFileUploadByUrl(url) async { + const _extra = {}; + final queryParameters = {r'url': url}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/file/file/upload-by-url', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = FileUploadByUrlResponseDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future galleryId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/gallery/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = GallerySaveDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future gallery(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/gallery', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = GalleryEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future galleryList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/gallery/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = GalleryListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future galleryDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/gallery/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future localityIds() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/locality/ids', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LocalityEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future localityList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/locality/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = LocalityEntityFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future newsId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/news/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = NewsDetailDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future news(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/news', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = NewsEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future newsList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/news/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = NewsListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future newsDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/news/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future notificationList( + page, + pageSize, + ) async { + const _extra = {}; + final queryParameters = { + r'page': page, + r'pageSize': pageSize, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/notification/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = NotificationDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future notificationNotificationIdMarkAsRead(notificationId) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/notification/${notificationId}/mark-as-read', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future notificationMarkAllAsRead() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/notification/mark-all-as-read', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future notificationCountUnRead() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/notification/count-un-read', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future objectlikeObjectLikeSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/objectlike/object-like-save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future officeList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/office/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OfficeDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderCreate(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/create', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OrderDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OrderDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderListMy(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/list-my', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OrderDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OrderDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future putOrderId( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderIdStatus( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/${id}/status', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderIdNotes( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/${id}/notes', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future orderCreateWithClass(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/order/create-with-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = OrderEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductSaveDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productDetailId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/detail/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductDetailDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future product(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productIdReviews( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/${id}/reviews', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductReviewEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productIdReviewsList( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/${id}/reviews/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ProductReviewListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productReviewsIdApprove( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/reviews/${id}/approve', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productReviewsAdminList( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/reviews/admin-list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + ProductReviewListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productIdReviewsGenerateAi( + id, + body, + ) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/${id}/reviews/generate-ai', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductReviewEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productByIds(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/by-ids', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productPurchaseConfig() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/purchase-config', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future productIdClasses( + id, + onlyAvailable, + ) async { + const _extra = {}; + final queryParameters = {r'onlyAvailable': onlyAvailable}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/product/${id}/classes', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ProductClassDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future pupilPupilStatic( + pupilPupilStaticRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(pupilPupilStaticRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/pupil/pupil-static', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = PupilStaticDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future pupilPupilHistoryDoExam( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/pupil/pupil-history-do-exam', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + PupilHistoryDoExamDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future pupilPupilStaticByTypeExam( + pupilPupilStaticByTypeExamRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(pupilPupilStaticByTypeExamRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/pupil/pupil-static-by-type-exam', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + PupilStaticByTypeExamDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future pupilPupilStatisticalOfClass( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/pupil/pupil-statistical-of-class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassPupilStatisticalDtoFilterResult.fromJson(_result.data!); + return value; + } + + @override + Future questionList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + QuestionListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future questionGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = QuestionDto.fromJson(_result.data!); + return value; + } + + @override + Future> questionGetByIds() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/get-by-ids', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => QuestionDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future questionSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = QuestionDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future questionDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future questionImport(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/question/import', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = QuestionDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future roleSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/role/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = Int64ApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future roleId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/role/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RoleDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future roleList(keyword) async { + const _extra = {}; + final queryParameters = {r'keyword': keyword}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/role/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RoleDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future roleListModule() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/role/list-module', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = EnumListEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future roleDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/role/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future safetySkillId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/safety-skill/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SafetySkillEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future safetySkill(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/safety-skill', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SafetySkillEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future safetySkillList( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/safety-skill/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + SafetySkillListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future safetySkillDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/safety-skill/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SchoolListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SchoolDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SchoolEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolDelete(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future schoolQuylxSchoolImportPupil( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/quylx-school-import-pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future schoolQuylxSchoolImportTeacher( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/quylx-school-import-teacher', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future schoolSchoolImportPupil( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/school-import-pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future> schoolSchoolImportPupilPreview( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/school-import-pupil-preview', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map((dynamic i) => UserCreateDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future schoolSchoolImportTeacher( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/school-import-teacher', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future> schoolSchoolImportTeacherPreview( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = body; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/school-import-teacher-preview', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + var value = _result.data! + .map( + (dynamic i) => TeacherCreateDto.fromJson(i as Map)) + .toList(); + return value; + } + + @override + Future schoolTeacherCreate( + schoolId, + body, + ) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/teacher-create', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolTeacherAssignExisting(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/teacher-assign-existing', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolListByUser() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/list-by-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SchoolListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolTeacherGetBySchool( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/teacher-get-by-school', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + TeacherGetBySchoolDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolStaticCount(schoolId) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/static-count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SchoolStaticCountDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future schoolClassProgramTypes( + schoolId) async { + const _extra = {}; + final queryParameters = {r'schoolId': schoolId}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/class-program-types', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassProgramTypeEntityListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future postSchoolClassProgramTypes( + body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/class-program-types', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ClassProgramTypeEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future deleteSchoolClassProgramTypes(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/school/class-program-types', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalStaticNumber() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/static-number', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = StatisticalDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalClass() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/class', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + DashBoardClassStatisticalDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalExam() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/exam', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DashBoardExamListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalQuestion() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/question', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + DashBoardQuestionListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalPupil() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/pupil', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = DashBoardPupilListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future statisticalPupilNumber() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/statistical/pupil-number', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = PupilStatisticalDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future systemInit() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/system/init', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = SystemInitDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TagDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tag(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TagDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagList(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TagListDtoFilterResultApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagListByIds() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/list-by-ids', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TagDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagDeleteId(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/delete/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagUpdateHot( + id, + isHot, + ) async { + const _extra = {}; + final queryParameters = { + r'id': id, + r'IsHot': isHot, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/update-hot', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagRemoveNews( + id, + newsId, + ) async { + const _extra = {}; + final queryParameters = { + r'id': id, + r'newsId': newsId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/remove-news', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagAddNews(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/add-news', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future tagListWithNewsCount(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/tag/list-with-news-count', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = TagListDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future teacherStaticByTypeExam( + teacherStaticByTypeExamRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(teacherStaticByTypeExamRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/teacher/static-by-type-exam', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = + TeacherStaticByTypeExamDtoListApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future testTestKafka() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/test/test-kafka', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future testTestParsejson() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/test/test-parsejson', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = ResponseXApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future testTestLog() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/test/test-log', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userGetByEmail( + email, + classId, + ) async { + const _extra = {}; + final queryParameters = { + r'email': email, + r'classId': classId, + }; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user/get-by-email', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserInfoDtoApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userTemplateImport() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user/template-import', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future userImportUser(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user/import-user', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data!; + return value; + } + + @override + Future userExamResultGetById(id) async { + const _extra = {}; + final queryParameters = {r'id': id}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-exam-result/get-by-id', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserExamResultDetailWithMessageDto.fromJson(_result.data!); + return value; + } + + @override + Future userExamResultSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-exam-result/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserExamResultEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userExamResultComment(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-exam-result/comment', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userExamResultChangeMark( + userExamResultChangeMarkRequest) async { + const _extra = {}; + final queryParameters = {}; + queryParameters.addAll(userExamResultChangeMarkRequest.toJson()); + final _headers = {}; + final _data = {}; + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-exam-result/change-mark', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userExamResultEssaySuggestionMark(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-exam-result/essay-suggestion-mark', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = AiResponseApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userMobileTokenSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-mobile-token/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserMobileTokenEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userPermissionId( + userId, + id, + ) async { + const _extra = {}; + final queryParameters = {r'UserId': userId}; + final _headers = {}; + final _data = {}; + final _result = + await _dio.fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-permission/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = RoleDto.fromJson(_result.data!); + return value; + } + + @override + Future userWebTokenSave(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-web-token/save', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = UserWebTokenEntityApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userWebTokenDelete(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(body.toJson()); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-web-token/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = BooleanApiResponse.fromJson(_result.data!); + return value; + } + + @override + Future userWebTokenGenerate() async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/api/v1/user-web-token/generate', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = VapidDetailsApiResponse.fromJson(_result.data!); + return value; + } + + RequestOptions _setStreamType(RequestOptions requestOptions) { + if (T != dynamic && + !(requestOptions.responseType == ResponseType.bytes || + requestOptions.responseType == ResponseType.stream)) { + if (T == String) { + requestOptions.responseType = ResponseType.plain; + } else { + requestOptions.responseType = ResponseType.json; + } + } + return requestOptions; + } +} diff --git a/lib/features/repositories/hra_repository_enums.dart b/lib/features/repositories/hra_repository_enums.dart new file mode 100644 index 0000000..629611f --- /dev/null +++ b/lib/features/repositories/hra_repository_enums.dart @@ -0,0 +1,913 @@ +import 'package:json_annotation/json_annotation.dart'; + +enum AssignExamStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $AssignExamStatusEnumMap = { + AssignExamStatusEnum.value_0: '0', + AssignExamStatusEnum.value_1: '1', + AssignExamStatusEnum.value_2: '2', + AssignExamStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum AssignExamTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $AssignExamTypeEnumMap = { + AssignExamTypeEnum.value_0: '0', + AssignExamTypeEnum.value_1: '1', + AssignExamTypeEnum.value_2: '2', + AssignExamTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum AssignExamUserStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $AssignExamUserStatusEnumMap = { + AssignExamUserStatusEnum.value_0: '0', + AssignExamUserStatusEnum.value_1: '1', + AssignExamUserStatusEnum.value_2: '2', + AssignExamUserStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum AttendanceStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $AttendanceStatusEnumMap = { + AttendanceStatusEnum.value_1: '1', + AttendanceStatusEnum.value_2: '2', + AttendanceStatusEnum.value_3: '3', + AttendanceStatusEnum.value_4: '4', + AttendanceStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ClassListSearchTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3 +} + +const $ClassListSearchTypeEnumMap = { + ClassListSearchTypeEnum.value_0: '0', + ClassListSearchTypeEnum.value_1: '1', + ClassListSearchTypeEnum.value_2: '2', + ClassListSearchTypeEnum.value_3: '3', + ClassListSearchTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum ClassStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ClassStatusEnumMap = { + ClassStatusEnum.value_1: '1', + ClassStatusEnum.value_2: '2', + ClassStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ClassTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ClassTypeEnumMap = { + ClassTypeEnum.value_1: '1', + ClassTypeEnum.value_2: '2', + ClassTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum ClassUserRoleEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3 +} + +const $ClassUserRoleEnumMap = { + ClassUserRoleEnum.value_0: '0', + ClassUserRoleEnum.value_1: '1', + ClassUserRoleEnum.value_2: '2', + ClassUserRoleEnum.value_3: '3', + ClassUserRoleEnum.swaggerGeneratedUnknown: '' +}; + +enum ClassUserStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $ClassUserStatusEnumMap = { + ClassUserStatusEnum.value_1: '1', + ClassUserStatusEnum.value_2: '2', + ClassUserStatusEnum.value_3: '3', + ClassUserStatusEnum.value_4: '4', + ClassUserStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum CommonStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $CommonStatusEnumMap = { + CommonStatusEnum.value_1: '1', + CommonStatusEnum.value_2: '2', + CommonStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ConsultationStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3 +} + +const $ConsultationStatusEnumMap = { + ConsultationStatusEnum.value_0: '0', + ConsultationStatusEnum.value_1: '1', + ConsultationStatusEnum.value_2: '2', + ConsultationStatusEnum.value_3: '3', + ConsultationStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ContactStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3 +} + +const $ContactStatusEnumMap = { + ContactStatusEnum.value_0: '0', + ContactStatusEnum.value_1: '1', + ContactStatusEnum.value_2: '2', + ContactStatusEnum.value_3: '3', + ContactStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ErrorCodeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('100') + value_100, + @JsonValue('101') + value_101, + @JsonValue('102') + value_102, + @JsonValue('103') + value_103, + @JsonValue('104') + value_104, + @JsonValue('105') + value_105, + @JsonValue('106') + value_106, + @JsonValue('107') + value_107, + @JsonValue('108') + value_108, + @JsonValue('109') + value_109, + @JsonValue('110') + value_110, + @JsonValue('111') + value_111, + @JsonValue('112') + value_112, + @JsonValue('113') + value_113, + @JsonValue('114') + value_114, + @JsonValue('115') + value_115, + @JsonValue('116') + value_116, + @JsonValue('117') + value_117, + @JsonValue('118') + value_118, + @JsonValue('119') + value_119, + @JsonValue('120') + value_120, + @JsonValue('121') + value_121, + @JsonValue('122') + value_122, + @JsonValue('123') + value_123, + @JsonValue('200') + value_200, + @JsonValue('201') + value_201, + @JsonValue('202') + value_202, + @JsonValue('203') + value_203, + @JsonValue('204') + value_204, + @JsonValue('205') + value_205, + @JsonValue('206') + value_206, + @JsonValue('207') + value_207, + @JsonValue('208') + value_208, + @JsonValue('226') + value_226, + @JsonValue('300') + value_300, + @JsonValue('301') + value_301, + @JsonValue('302') + value_302, + @JsonValue('303') + value_303, + @JsonValue('304') + value_304, + @JsonValue('305') + value_305, + @JsonValue('306') + value_306, + @JsonValue('307') + value_307, + @JsonValue('308') + value_308, + @JsonValue('400') + value_400, + @JsonValue('401') + value_401, + @JsonValue('402') + value_402, + @JsonValue('403') + value_403, + @JsonValue('404') + value_404, + @JsonValue('405') + value_405, + @JsonValue('406') + value_406, + @JsonValue('407') + value_407, + @JsonValue('408') + value_408, + @JsonValue('409') + value_409, + @JsonValue('410') + value_410, + @JsonValue('411') + value_411, + @JsonValue('412') + value_412, + @JsonValue('413') + value_413, + @JsonValue('414') + value_414, + @JsonValue('415') + value_415, + @JsonValue('416') + value_416, + @JsonValue('417') + value_417, + @JsonValue('421') + value_421, + @JsonValue('422') + value_422, + @JsonValue('423') + value_423, + @JsonValue('424') + value_424, + @JsonValue('426') + value_426, + @JsonValue('428') + value_428, + @JsonValue('429') + value_429, + @JsonValue('431') + value_431, + @JsonValue('451') + value_451, + @JsonValue('500') + value_500, + @JsonValue('501') + value_501, + @JsonValue('502') + value_502, + @JsonValue('503') + value_503, + @JsonValue('504') + value_504, + @JsonValue('505') + value_505, + @JsonValue('506') + value_506, + @JsonValue('507') + value_507, + @JsonValue('508') + value_508, + @JsonValue('510') + value_510, + @JsonValue('511') + value_511, + @JsonValue('512') + value_512, + @JsonValue('513') + value_513, + @JsonValue('-1') + value_1 +} + +const $ErrorCodeEnumMap = { + ErrorCodeEnum.value_0: '0', + ErrorCodeEnum.value_100: '100', + ErrorCodeEnum.value_101: '101', + ErrorCodeEnum.value_102: '102', + ErrorCodeEnum.value_103: '103', + ErrorCodeEnum.value_104: '104', + ErrorCodeEnum.value_105: '105', + ErrorCodeEnum.value_106: '106', + ErrorCodeEnum.value_107: '107', + ErrorCodeEnum.value_108: '108', + ErrorCodeEnum.value_109: '109', + ErrorCodeEnum.value_110: '110', + ErrorCodeEnum.value_111: '111', + ErrorCodeEnum.value_112: '112', + ErrorCodeEnum.value_113: '113', + ErrorCodeEnum.value_114: '114', + ErrorCodeEnum.value_115: '115', + ErrorCodeEnum.value_116: '116', + ErrorCodeEnum.value_117: '117', + ErrorCodeEnum.value_118: '118', + ErrorCodeEnum.value_119: '119', + ErrorCodeEnum.value_120: '120', + ErrorCodeEnum.value_121: '121', + ErrorCodeEnum.value_122: '122', + ErrorCodeEnum.value_123: '123', + ErrorCodeEnum.value_200: '200', + ErrorCodeEnum.value_201: '201', + ErrorCodeEnum.value_202: '202', + ErrorCodeEnum.value_203: '203', + ErrorCodeEnum.value_204: '204', + ErrorCodeEnum.value_205: '205', + ErrorCodeEnum.value_206: '206', + ErrorCodeEnum.value_207: '207', + ErrorCodeEnum.value_208: '208', + ErrorCodeEnum.value_226: '226', + ErrorCodeEnum.value_300: '300', + ErrorCodeEnum.value_301: '301', + ErrorCodeEnum.value_302: '302', + ErrorCodeEnum.value_303: '303', + ErrorCodeEnum.value_304: '304', + ErrorCodeEnum.value_305: '305', + ErrorCodeEnum.value_306: '306', + ErrorCodeEnum.value_307: '307', + ErrorCodeEnum.value_308: '308', + ErrorCodeEnum.value_400: '400', + ErrorCodeEnum.value_401: '401', + ErrorCodeEnum.value_402: '402', + ErrorCodeEnum.value_403: '403', + ErrorCodeEnum.value_404: '404', + ErrorCodeEnum.value_405: '405', + ErrorCodeEnum.value_406: '406', + ErrorCodeEnum.value_407: '407', + ErrorCodeEnum.value_408: '408', + ErrorCodeEnum.value_409: '409', + ErrorCodeEnum.value_410: '410', + ErrorCodeEnum.value_411: '411', + ErrorCodeEnum.value_412: '412', + ErrorCodeEnum.value_413: '413', + ErrorCodeEnum.value_414: '414', + ErrorCodeEnum.value_415: '415', + ErrorCodeEnum.value_416: '416', + ErrorCodeEnum.value_417: '417', + ErrorCodeEnum.value_421: '421', + ErrorCodeEnum.value_422: '422', + ErrorCodeEnum.value_423: '423', + ErrorCodeEnum.value_424: '424', + ErrorCodeEnum.value_426: '426', + ErrorCodeEnum.value_428: '428', + ErrorCodeEnum.value_429: '429', + ErrorCodeEnum.value_431: '431', + ErrorCodeEnum.value_451: '451', + ErrorCodeEnum.value_500: '500', + ErrorCodeEnum.value_501: '501', + ErrorCodeEnum.value_502: '502', + ErrorCodeEnum.value_503: '503', + ErrorCodeEnum.value_504: '504', + ErrorCodeEnum.value_505: '505', + ErrorCodeEnum.value_506: '506', + ErrorCodeEnum.value_507: '507', + ErrorCodeEnum.value_508: '508', + ErrorCodeEnum.value_510: '510', + ErrorCodeEnum.value_511: '511', + ErrorCodeEnum.value_512: '512', + ErrorCodeEnum.value_513: '513', + ErrorCodeEnum.value_1: '-1', + ErrorCodeEnum.swaggerGeneratedUnknown: '' +}; + +enum ExamFileChoiceTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ExamFileChoiceTypeEnumMap = { + ExamFileChoiceTypeEnum.value_1: '1', + ExamFileChoiceTypeEnum.value_2: '2', + ExamFileChoiceTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum ExamFormatEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ExamFormatEnumMap = { + ExamFormatEnum.value_1: '1', + ExamFormatEnum.value_2: '2', + ExamFormatEnum.swaggerGeneratedUnknown: '' +}; + +enum ExamStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $ExamStatusEnumMap = { + ExamStatusEnum.value_1: '1', + ExamStatusEnum.value_2: '2', + ExamStatusEnum.value_3: '3', + ExamStatusEnum.value_4: '4', + ExamStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ExamTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ExamTypeEnumMap = { + ExamTypeEnum.value_0: '0', + ExamTypeEnum.value_1: '1', + ExamTypeEnum.value_2: '2', + ExamTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum FileStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4, + @JsonValue('5') + value_5, + @JsonValue('6') + value_6 +} + +const $FileStatusEnumMap = { + FileStatusEnum.value_0: '0', + FileStatusEnum.value_1: '1', + FileStatusEnum.value_2: '2', + FileStatusEnum.value_3: '3', + FileStatusEnum.value_4: '4', + FileStatusEnum.value_5: '5', + FileStatusEnum.value_6: '6', + FileStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum LessonTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $LessonTypeEnumMap = { + LessonTypeEnum.value_1: '1', + LessonTypeEnum.value_2: '2', + LessonTypeEnum.value_3: '3', + LessonTypeEnum.value_4: '4', + LessonTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum LocalityStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $LocalityStatusEnumMap = { + LocalityStatusEnum.value_0: '0', + LocalityStatusEnum.value_1: '1', + LocalityStatusEnum.value_2: '2', + LocalityStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum LocalityTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3 +} + +const $LocalityTypeEnumMap = { + LocalityTypeEnum.value_1: '1', + LocalityTypeEnum.value_2: '2', + LocalityTypeEnum.value_3: '3', + LocalityTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum ModuleEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4, + @JsonValue('5') + value_5, + @JsonValue('6') + value_6, + @JsonValue('7') + value_7, + @JsonValue('8') + value_8, + @JsonValue('9') + value_9, + @JsonValue('10') + value_10, + @JsonValue('11') + value_11, + @JsonValue('12') + value_12, + @JsonValue('13') + value_13, + @JsonValue('98') + value_98, + @JsonValue('99') + value_99 +} + +const $ModuleEnumMap = { + ModuleEnum.value_1: '1', + ModuleEnum.value_2: '2', + ModuleEnum.value_3: '3', + ModuleEnum.value_4: '4', + ModuleEnum.value_5: '5', + ModuleEnum.value_6: '6', + ModuleEnum.value_7: '7', + ModuleEnum.value_8: '8', + ModuleEnum.value_9: '9', + ModuleEnum.value_10: '10', + ModuleEnum.value_11: '11', + ModuleEnum.value_12: '12', + ModuleEnum.value_13: '13', + ModuleEnum.value_98: '98', + ModuleEnum.value_99: '99', + ModuleEnum.swaggerGeneratedUnknown: '' +}; + +enum ObjectTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ObjectTypeEnumMap = { + ObjectTypeEnum.value_0: '0', + ObjectTypeEnum.value_1: '1', + ObjectTypeEnum.value_2: '2', + ObjectTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum OrderStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4, + @JsonValue('5') + value_5 +} + +const $OrderStatusEnumMap = { + OrderStatusEnum.value_0: '0', + OrderStatusEnum.value_1: '1', + OrderStatusEnum.value_2: '2', + OrderStatusEnum.value_3: '3', + OrderStatusEnum.value_4: '4', + OrderStatusEnum.value_5: '5', + OrderStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ProductReviewStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ProductReviewStatusEnumMap = { + ProductReviewStatusEnum.value_0: '0', + ProductReviewStatusEnum.value_1: '1', + ProductReviewStatusEnum.value_2: '2', + ProductReviewStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum ProductTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $ProductTypeEnumMap = { + ProductTypeEnum.value_0: '0', + ProductTypeEnum.value_1: '1', + ProductTypeEnum.value_2: '2', + ProductTypeEnum.swaggerGeneratedUnknown: '' +}; + +enum QuestionLevelEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $QuestionLevelEnumMap = { + QuestionLevelEnum.value_1: '1', + QuestionLevelEnum.value_2: '2', + QuestionLevelEnum.value_3: '3', + QuestionLevelEnum.value_4: '4', + QuestionLevelEnum.swaggerGeneratedUnknown: '' +}; + +enum QuestionStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $QuestionStatusEnumMap = { + QuestionStatusEnum.value_0: '0', + QuestionStatusEnum.value_1: '1', + QuestionStatusEnum.value_2: '2', + QuestionStatusEnum.value_3: '3', + QuestionStatusEnum.value_4: '4', + QuestionStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum SchoolStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $SchoolStatusEnumMap = { + SchoolStatusEnum.value_0: '0', + SchoolStatusEnum.value_1: '1', + SchoolStatusEnum.value_2: '2', + SchoolStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum SessionStatusEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4 +} + +const $SessionStatusEnumMap = { + SessionStatusEnum.value_1: '1', + SessionStatusEnum.value_2: '2', + SessionStatusEnum.value_3: '3', + SessionStatusEnum.value_4: '4', + SessionStatusEnum.swaggerGeneratedUnknown: '' +}; + +enum UserExamResultStatus { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2 +} + +const $UserExamResultStatusMap = { + UserExamResultStatus.value_1: '1', + UserExamResultStatus.value_2: '2', + UserExamResultStatus.swaggerGeneratedUnknown: '' +}; + +enum UserTypeEnum { + @JsonValue('swaggerGeneratedUnknown') + swaggerGeneratedUnknown, + @JsonValue('0') + value_0, + @JsonValue('1') + value_1, + @JsonValue('2') + value_2, + @JsonValue('3') + value_3, + @JsonValue('4') + value_4, + @JsonValue('5') + value_5, + @JsonValue('6') + value_6, + @JsonValue('7') + value_7 +} + +const $UserTypeEnumMap = { + UserTypeEnum.value_0: '0', + UserTypeEnum.value_1: '1', + UserTypeEnum.value_2: '2', + UserTypeEnum.value_3: '3', + UserTypeEnum.value_4: '4', + UserTypeEnum.value_5: '5', + UserTypeEnum.value_6: '6', + UserTypeEnum.value_7: '7', + UserTypeEnum.swaggerGeneratedUnknown: '' +}; diff --git a/lib/features/repositories/hra_repository_models.dart b/lib/features/repositories/hra_repository_models.dart new file mode 100644 index 0000000..edf53f5 --- /dev/null +++ b/lib/features/repositories/hra_repository_models.dart @@ -0,0 +1,17441 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:collection/collection.dart'; +import 'hra_repository_enums.dart' as enums; + +part 'hra_repository_models.g.dart'; + +@JsonSerializable(explicitToJson: true) +class AcademicYearEntity { + AcademicYearEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.schoolId, + this.startPeriod1, + this.startPeriod2, + this.end, + this.name, + }); + + factory AcademicYearEntity.fromJson(Map json) => + _$AcademicYearEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'startPeriod1', includeIfNull: true) + DateTime? startPeriod1; + @JsonKey(name: 'startPeriod2', includeIfNull: true) + DateTime? startPeriod2; + @JsonKey(name: 'end', includeIfNull: true) + DateTime? end; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + static const fromJsonFactory = _$AcademicYearEntityFromJson; + static const toJsonFactory = _$AcademicYearEntityToJson; + Map toJson() => _$AcademicYearEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AcademicYearEntityApiResponse { + AcademicYearEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AcademicYearEntityApiResponse.fromJson(Map json) => + _$AcademicYearEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AcademicYearEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AcademicYearEntityApiResponseFromJson; + static const toJsonFactory = _$AcademicYearEntityApiResponseToJson; + Map toJson() => _$AcademicYearEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AcademicYearEntityListApiResponse { + AcademicYearEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AcademicYearEntityListApiResponse.fromJson( + Map json) => + _$AcademicYearEntityListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AcademicYearEntityListApiResponseFromJson; + static const toJsonFactory = _$AcademicYearEntityListApiResponseToJson; + Map toJson() => + _$AcademicYearEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityEntity { + ActivityEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.description, + this.videoUrl, + this.tag, + this.type, + this.imageUrl, + this.status, + this.displayOrder, + }); + + factory ActivityEntity.fromJson(Map json) => + _$ActivityEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'videoUrl', includeIfNull: true) + String? videoUrl; + @JsonKey(name: 'tag', includeIfNull: true) + String? tag; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'imageUrl', includeIfNull: true) + String? imageUrl; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'displayOrder', includeIfNull: true) + int? displayOrder; + static const fromJsonFactory = _$ActivityEntityFromJson; + static const toJsonFactory = _$ActivityEntityToJson; + Map toJson() => _$ActivityEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityEntityApiResponse { + ActivityEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ActivityEntityApiResponse.fromJson(Map json) => + _$ActivityEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ActivityEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ActivityEntityApiResponseFromJson; + static const toJsonFactory = _$ActivityEntityApiResponseToJson; + Map toJson() => _$ActivityEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityGetListQuery { + ActivityGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.status, + this.tag, + this.type, + }); + + factory ActivityGetListQuery.fromJson(Map json) => + _$ActivityGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'tag', includeIfNull: true) + String? tag; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + static const fromJsonFactory = _$ActivityGetListQueryFromJson; + static const toJsonFactory = _$ActivityGetListQueryToJson; + Map toJson() => _$ActivityGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityListDto { + ActivityListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.description, + this.videoUrl, + this.tag, + this.type, + this.imageUrl, + this.status, + this.displayOrder, + }); + + factory ActivityListDto.fromJson(Map json) => + _$ActivityListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'videoUrl', includeIfNull: true) + String? videoUrl; + @JsonKey(name: 'tag', includeIfNull: true) + String? tag; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'imageUrl', includeIfNull: true) + String? imageUrl; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'displayOrder', includeIfNull: true) + int? displayOrder; + static const fromJsonFactory = _$ActivityListDtoFromJson; + static const toJsonFactory = _$ActivityListDtoToJson; + Map toJson() => _$ActivityListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityListDtoFilterResult { + ActivityListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ActivityListDtoFilterResult.fromJson(Map json) => + _$ActivityListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ActivityListDtoFilterResultFromJson; + static const toJsonFactory = _$ActivityListDtoFilterResultToJson; + Map toJson() => _$ActivityListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityListDtoFilterResultApiResponse { + ActivityListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ActivityListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ActivityListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ActivityListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ActivityListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$ActivityListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ActivityListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityLogEntity { + ActivityLogEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.data, + this.objectType, + this.ip, + }); + + factory ActivityLogEntity.fromJson(Map json) => + _$ActivityLogEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'data', includeIfNull: true) + String? data; + @JsonKey(name: 'objectType', includeIfNull: true) + String? objectType; + @JsonKey(name: 'ip', includeIfNull: true) + String? ip; + static const fromJsonFactory = _$ActivityLogEntityFromJson; + static const toJsonFactory = _$ActivityLogEntityToJson; + Map toJson() => _$ActivityLogEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivityLogEntityApiResponse { + ActivityLogEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ActivityLogEntityApiResponse.fromJson(Map json) => + _$ActivityLogEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ActivityLogEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ActivityLogEntityApiResponseFromJson; + static const toJsonFactory = _$ActivityLogEntityApiResponseToJson; + Map toJson() => _$ActivityLogEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivitySaveDto { + ActivitySaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.description, + this.videoUrl, + this.tag, + this.type, + this.imageUrl, + this.status, + this.displayOrder, + }); + + factory ActivitySaveDto.fromJson(Map json) => + _$ActivitySaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'videoUrl', includeIfNull: true) + String? videoUrl; + @JsonKey(name: 'tag', includeIfNull: true) + String? tag; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'imageUrl', includeIfNull: true) + String? imageUrl; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'displayOrder', includeIfNull: true) + int? displayOrder; + static const fromJsonFactory = _$ActivitySaveDtoFromJson; + static const toJsonFactory = _$ActivitySaveDtoToJson; + Map toJson() => _$ActivitySaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ActivitySaveDtoApiResponse { + ActivitySaveDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ActivitySaveDtoApiResponse.fromJson(Map json) => + _$ActivitySaveDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ActivitySaveDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ActivitySaveDtoApiResponseFromJson; + static const toJsonFactory = _$ActivitySaveDtoApiResponseToJson; + Map toJson() => _$ActivitySaveDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiChatRequest { + AiChatRequest({ + this.systemPrompt, + this.userMessage, + this.userMessageContent, + this.model, + this.temperature, + this.maxTokens, + }); + + factory AiChatRequest.fromJson(Map json) => + _$AiChatRequestFromJson(json); + + @JsonKey(name: 'systemPrompt', includeIfNull: true) + String? systemPrompt; + @JsonKey(name: 'userMessage', includeIfNull: true) + String? userMessage; + @JsonKey( + name: 'userMessageContent', + includeIfNull: true, + defaultValue: []) + List? userMessageContent; + @JsonKey(name: 'model', includeIfNull: true) + String? model; + @JsonKey(name: 'temperature', includeIfNull: true) + double? temperature; + @JsonKey(name: 'maxTokens', includeIfNull: true) + int? maxTokens; + static const fromJsonFactory = _$AiChatRequestFromJson; + static const toJsonFactory = _$AiChatRequestToJson; + Map toJson() => _$AiChatRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiMessageContent { + AiMessageContent({ + this.type, + }); + + factory AiMessageContent.fromJson(Map json) => + _$AiMessageContentFromJson(json); + + @JsonKey(name: 'type', includeIfNull: true) + String? type; + static const fromJsonFactory = _$AiMessageContentFromJson; + static const toJsonFactory = _$AiMessageContentToJson; + Map toJson() => _$AiMessageContentToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptEntity { + AiPromptEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.grade, + this.categoryId, + this.code, + this.name, + this.description, + this.prompt, + this.category, + }); + + factory AiPromptEntity.fromJson(Map json) => + _$AiPromptEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'prompt', includeIfNull: true) + String? prompt; + @JsonKey(name: 'category', includeIfNull: true) + CategoryEntity? category; + static const fromJsonFactory = _$AiPromptEntityFromJson; + static const toJsonFactory = _$AiPromptEntityToJson; + Map toJson() => _$AiPromptEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptEntityApiResponse { + AiPromptEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AiPromptEntityApiResponse.fromJson(Map json) => + _$AiPromptEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AiPromptEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AiPromptEntityApiResponseFromJson; + static const toJsonFactory = _$AiPromptEntityApiResponseToJson; + Map toJson() => _$AiPromptEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptGetListQuery { + AiPromptGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.code, + this.grade, + this.categoryId, + }); + + factory AiPromptGetListQuery.fromJson(Map json) => + _$AiPromptGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + static const fromJsonFactory = _$AiPromptGetListQueryFromJson; + static const toJsonFactory = _$AiPromptGetListQueryToJson; + Map toJson() => _$AiPromptGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptListDto { + AiPromptListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.grade, + this.categoryId, + this.code, + this.name, + this.description, + this.prompt, + this.category, + this.categoryName, + }); + + factory AiPromptListDto.fromJson(Map json) => + _$AiPromptListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'prompt', includeIfNull: true) + String? prompt; + @JsonKey(name: 'category', includeIfNull: true) + CategoryEntity? category; + @JsonKey(name: 'categoryName', includeIfNull: true) + String? categoryName; + static const fromJsonFactory = _$AiPromptListDtoFromJson; + static const toJsonFactory = _$AiPromptListDtoToJson; + Map toJson() => _$AiPromptListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptListDtoFilterResult { + AiPromptListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory AiPromptListDtoFilterResult.fromJson(Map json) => + _$AiPromptListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$AiPromptListDtoFilterResultFromJson; + static const toJsonFactory = _$AiPromptListDtoFilterResultToJson; + Map toJson() => _$AiPromptListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptListDtoFilterResultApiResponse { + AiPromptListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AiPromptListDtoFilterResultApiResponse.fromJson( + Map json) => + _$AiPromptListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AiPromptListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$AiPromptListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$AiPromptListDtoFilterResultApiResponseToJson; + Map toJson() => + _$AiPromptListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptRequest { + AiPromptRequest({ + this.promptCode, + this.grade, + this.categoryId, + this.variables, + this.userMessage, + this.userMessageContent, + this.model, + this.temperature, + this.maxTokens, + }); + + factory AiPromptRequest.fromJson(Map json) => + _$AiPromptRequestFromJson(json); + + @JsonKey(name: 'promptCode', includeIfNull: true) + String? promptCode; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'variables', includeIfNull: true) + Object? variables; + @JsonKey(name: 'userMessage', includeIfNull: true) + String? userMessage; + @JsonKey( + name: 'userMessageContent', + includeIfNull: true, + defaultValue: []) + List? userMessageContent; + @JsonKey(name: 'model', includeIfNull: true) + String? model; + @JsonKey(name: 'temperature', includeIfNull: true) + double? temperature; + @JsonKey(name: 'maxTokens', includeIfNull: true) + int? maxTokens; + static const fromJsonFactory = _$AiPromptRequestFromJson; + static const toJsonFactory = _$AiPromptRequestToJson; + Map toJson() => _$AiPromptRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiResponse { + AiResponse({ + this.success, + this.content, + this.error, + this.model, + this.promptTokens, + this.completionTokens, + this.totalTokens, + }); + + factory AiResponse.fromJson(Map json) => + _$AiResponseFromJson(json); + + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'error', includeIfNull: true) + String? error; + @JsonKey(name: 'model', includeIfNull: true) + String? model; + @JsonKey(name: 'promptTokens', includeIfNull: true) + int? promptTokens; + @JsonKey(name: 'completionTokens', includeIfNull: true) + int? completionTokens; + @JsonKey(name: 'totalTokens', includeIfNull: true) + int? totalTokens; + static const fromJsonFactory = _$AiResponseFromJson; + static const toJsonFactory = _$AiResponseToJson; + Map toJson() => _$AiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiResponseApiResponse { + AiResponseApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AiResponseApiResponse.fromJson(Map json) => + _$AiResponseApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AiResponse? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AiResponseApiResponseFromJson; + static const toJsonFactory = _$AiResponseApiResponseToJson; + Map toJson() => _$AiResponseApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamAddDto { + AssignExamAddDto({ + this.id, + this.classId, + this.title, + this.examId, + this.fromDate, + this.toDate, + this.allowDeadline, + this.status, + this.type, + this.allowViewAnswer, + this.duration, + }); + + factory AssignExamAddDto.fromJson(Map json) => + _$AssignExamAddDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'allowDeadline', includeIfNull: true) + bool? allowDeadline; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'allowViewAnswer', includeIfNull: true) + bool? allowViewAnswer; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + static const fromJsonFactory = _$AssignExamAddDtoFromJson; + static const toJsonFactory = _$AssignExamAddDtoToJson; + Map toJson() => _$AssignExamAddDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamAddMultipleDto { + AssignExamAddMultipleDto({ + this.classes, + this.assignExam, + }); + + factory AssignExamAddMultipleDto.fromJson(Map json) => + _$AssignExamAddMultipleDtoFromJson(json); + + @JsonKey( + name: 'classes', includeIfNull: true, defaultValue: []) + List? classes; + @JsonKey(name: 'assignExam', includeIfNull: true) + AssignExamAddDto? assignExam; + static const fromJsonFactory = _$AssignExamAddMultipleDtoFromJson; + static const toJsonFactory = _$AssignExamAddMultipleDtoToJson; + Map toJson() => _$AssignExamAddMultipleDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamCheckDoExamDto { + AssignExamCheckDoExamDto({ + this.message, + this.isCanViewResult, + this.classId, + }); + + factory AssignExamCheckDoExamDto.fromJson(Map json) => + _$AssignExamCheckDoExamDtoFromJson(json); + + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'isCanViewResult', includeIfNull: true) + bool? isCanViewResult; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + static const fromJsonFactory = _$AssignExamCheckDoExamDtoFromJson; + static const toJsonFactory = _$AssignExamCheckDoExamDtoToJson; + Map toJson() => _$AssignExamCheckDoExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamCheckDoExamDtoApiResponse { + AssignExamCheckDoExamDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamCheckDoExamDtoApiResponse.fromJson( + Map json) => + _$AssignExamCheckDoExamDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AssignExamCheckDoExamDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AssignExamCheckDoExamDtoApiResponseFromJson; + static const toJsonFactory = _$AssignExamCheckDoExamDtoApiResponseToJson; + Map toJson() => + _$AssignExamCheckDoExamDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamCountDto { + AssignExamCountDto({ + this.countExam, + this.countTest, + this.countExercise, + }); + + factory AssignExamCountDto.fromJson(Map json) => + _$AssignExamCountDtoFromJson(json); + + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + @JsonKey(name: 'countTest', includeIfNull: true) + int? countTest; + @JsonKey(name: 'countExercise', includeIfNull: true) + int? countExercise; + static const fromJsonFactory = _$AssignExamCountDtoFromJson; + static const toJsonFactory = _$AssignExamCountDtoToJson; + Map toJson() => _$AssignExamCountDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamCountDtoApiResponse { + AssignExamCountDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamCountDtoApiResponse.fromJson(Map json) => + _$AssignExamCountDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AssignExamCountDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AssignExamCountDtoApiResponseFromJson; + static const toJsonFactory = _$AssignExamCountDtoApiResponseToJson; + Map toJson() => _$AssignExamCountDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamDetailDto { + AssignExamDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.classId, + this.examId, + this.fromDate, + this.toDate, + this.allowDeadline, + this.allowViewAnswer, + this.duration, + this.status, + this.type, + this.assignExamUsers, + this.subject, + this.questionCount, + this.canEdit, + }); + + factory AssignExamDetailDto.fromJson(Map json) => + _$AssignExamDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'allowDeadline', includeIfNull: true) + bool? allowDeadline; + @JsonKey(name: 'allowViewAnswer', includeIfNull: true) + bool? allowViewAnswer; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey( + name: 'assignExamUsers', + includeIfNull: true, + defaultValue: []) + List? assignExamUsers; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'questionCount', includeIfNull: true) + int? questionCount; + @JsonKey(name: 'canEdit', includeIfNull: true) + bool? canEdit; + static const fromJsonFactory = _$AssignExamDetailDtoFromJson; + static const toJsonFactory = _$AssignExamDetailDtoToJson; + Map toJson() => _$AssignExamDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamDoneDto { + AssignExamDoneDto({ + this.id, + this.title, + this.endDate, + this.mark, + this.totalMark, + this.examId, + this.examResultId, + this.status, + }); + + factory AssignExamDoneDto.fromJson(Map json) => + _$AssignExamDoneDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + static const fromJsonFactory = _$AssignExamDoneDtoFromJson; + static const toJsonFactory = _$AssignExamDoneDtoToJson; + Map toJson() => _$AssignExamDoneDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamDoneDtoListApiResponse { + AssignExamDoneDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamDoneDtoListApiResponse.fromJson( + Map json) => + _$AssignExamDoneDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AssignExamDoneDtoListApiResponseFromJson; + static const toJsonFactory = _$AssignExamDoneDtoListApiResponseToJson; + Map toJson() => + _$AssignExamDoneDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamEditDto { + AssignExamEditDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.classId, + this.examId, + this.fromDate, + this.toDate, + this.allowDeadline, + this.allowViewAnswer, + this.duration, + this.status, + this.type, + this.assignExamUsers, + this.assignUsers, + }); + + factory AssignExamEditDto.fromJson(Map json) => + _$AssignExamEditDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'allowDeadline', includeIfNull: true) + bool? allowDeadline; + @JsonKey(name: 'allowViewAnswer', includeIfNull: true) + bool? allowViewAnswer; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey( + name: 'assignExamUsers', + includeIfNull: true, + defaultValue: []) + List? assignExamUsers; + @JsonKey( + name: 'assignUsers', + includeIfNull: true, + defaultValue: []) + List? assignUsers; + static const fromJsonFactory = _$AssignExamEditDtoFromJson; + static const toJsonFactory = _$AssignExamEditDtoToJson; + Map toJson() => _$AssignExamEditDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamEntity { + AssignExamEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.classId, + this.examId, + this.fromDate, + this.toDate, + this.allowDeadline, + this.allowViewAnswer, + this.duration, + this.status, + this.type, + this.assignExamUsers, + }); + + factory AssignExamEntity.fromJson(Map json) => + _$AssignExamEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'allowDeadline', includeIfNull: true) + bool? allowDeadline; + @JsonKey(name: 'allowViewAnswer', includeIfNull: true) + bool? allowViewAnswer; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey( + name: 'assignExamUsers', + includeIfNull: true, + defaultValue: []) + List? assignExamUsers; + static const fromJsonFactory = _$AssignExamEntityFromJson; + static const toJsonFactory = _$AssignExamEntityToJson; + Map toJson() => _$AssignExamEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListByClassQuery { + AssignExamListByClassQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.subjectId, + this.fromDate, + this.toDate, + this.classId, + this.type, + this.userId, + this.isGetAll, + this.status, + }); + + factory AssignExamListByClassQuery.fromJson(Map json) => + _$AssignExamListByClassQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'isGetAll', includeIfNull: true) + bool? isGetAll; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + static const fromJsonFactory = _$AssignExamListByClassQueryFromJson; + static const toJsonFactory = _$AssignExamListByClassQueryToJson; + Map toJson() => _$AssignExamListByClassQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListByExamIdDto { + AssignExamListByExamIdDto({ + this.id, + this.examId, + this.className, + this.type, + this.fromDate, + this.countPupilDone, + this.countPupil, + this.countNeedMark, + this.classId, + this.createdBy, + }); + + factory AssignExamListByExamIdDto.fromJson(Map json) => + _$AssignExamListByExamIdDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'className', includeIfNull: true) + String? className; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'countPupilDone', includeIfNull: true) + int? countPupilDone; + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countNeedMark', includeIfNull: true) + int? countNeedMark; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + static const fromJsonFactory = _$AssignExamListByExamIdDtoFromJson; + static const toJsonFactory = _$AssignExamListByExamIdDtoToJson; + Map toJson() => _$AssignExamListByExamIdDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListByExamIdDtoFilterResult { + AssignExamListByExamIdDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory AssignExamListByExamIdDtoFilterResult.fromJson( + Map json) => + _$AssignExamListByExamIdDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = + _$AssignExamListByExamIdDtoFilterResultFromJson; + static const toJsonFactory = _$AssignExamListByExamIdDtoFilterResultToJson; + Map toJson() => + _$AssignExamListByExamIdDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListByExamIdFilterDto { + AssignExamListByExamIdFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.examId, + this.fromDate, + this.toDate, + this.type, + this.classId, + }); + + factory AssignExamListByExamIdFilterDto.fromJson(Map json) => + _$AssignExamListByExamIdFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + static const fromJsonFactory = _$AssignExamListByExamIdFilterDtoFromJson; + static const toJsonFactory = _$AssignExamListByExamIdFilterDtoToJson; + Map toJson() => + _$AssignExamListByExamIdFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListDto { + AssignExamListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.classId, + this.title, + this.subjectId, + this.subject, + this.fromDate, + this.isHot, + this.toDate, + this.status, + this.countPupil, + this.countPupilDone, + this.isOwner, + this.isTeacher, + this.examId, + this.mark, + this.userStatus, + this.examResultId, + this.allowViewAnswer, + this.pupilSubmissionTime, + this.countNeedMark, + this.duration, + }); + + factory AssignExamListDto.fromJson(Map json) => + _$AssignExamListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'isHot', includeIfNull: true) + bool? isHot; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countPupilDone', includeIfNull: true) + int? countPupilDone; + @JsonKey(name: 'isOwner', includeIfNull: true) + bool? isOwner; + @JsonKey(name: 'isTeacher', includeIfNull: true) + bool? isTeacher; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey( + name: 'userStatus', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? userStatus; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + @JsonKey(name: 'allowViewAnswer', includeIfNull: true) + bool? allowViewAnswer; + @JsonKey(name: 'pupilSubmissionTime', includeIfNull: true) + DateTime? pupilSubmissionTime; + @JsonKey(name: 'countNeedMark', includeIfNull: true) + int? countNeedMark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + static const fromJsonFactory = _$AssignExamListDtoFromJson; + static const toJsonFactory = _$AssignExamListDtoToJson; + Map toJson() => _$AssignExamListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListDtoFilterResult { + AssignExamListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory AssignExamListDtoFilterResult.fromJson(Map json) => + _$AssignExamListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$AssignExamListDtoFilterResultFromJson; + static const toJsonFactory = _$AssignExamListDtoFilterResultToJson; + Map toJson() => _$AssignExamListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListExamDto { + AssignExamListExamDto({ + this.id, + this.title, + this.subject, + this.fromDate, + this.toDate, + this.status, + this.type, + }); + + factory AssignExamListExamDto.fromJson(Map json) => + _$AssignExamListExamDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamStatusEnumToJson, + fromJson: assignExamStatusEnumFromJson) + enums.AssignExamStatusEnum? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + static const fromJsonFactory = _$AssignExamListExamDtoFromJson; + static const toJsonFactory = _$AssignExamListExamDtoToJson; + Map toJson() => _$AssignExamListExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListExamDtoFilterResult { + AssignExamListExamDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory AssignExamListExamDtoFilterResult.fromJson( + Map json) => + _$AssignExamListExamDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = _$AssignExamListExamDtoFilterResultFromJson; + static const toJsonFactory = _$AssignExamListExamDtoFilterResultToJson; + Map toJson() => + _$AssignExamListExamDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListExamDtoFilterResultApiResponse { + AssignExamListExamDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamListExamDtoFilterResultApiResponse.fromJson( + Map json) => + _$AssignExamListExamDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + AssignExamListExamDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$AssignExamListExamDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$AssignExamListExamDtoFilterResultApiResponseToJson; + Map toJson() => + _$AssignExamListExamDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListExamFilterDto { + AssignExamListExamFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.userId, + this.userStatus, + }); + + factory AssignExamListExamFilterDto.fromJson(Map json) => + _$AssignExamListExamFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey( + name: 'userStatus', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? userStatus; + static const fromJsonFactory = _$AssignExamListExamFilterDtoFromJson; + static const toJsonFactory = _$AssignExamListExamFilterDtoToJson; + Map toJson() => _$AssignExamListExamFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListUserDto { + AssignExamListUserDto({ + this.assignExamId, + this.userId, + this.status, + this.examResultId, + this.startDate, + this.mark, + this.duration, + this.endDate, + this.note, + this.avatar, + this.fullName, + this.overdue, + this.timeMarking, + }); + + factory AssignExamListUserDto.fromJson(Map json) => + _$AssignExamListUserDtoFromJson(json); + + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'note', includeIfNull: true) + String? note; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'overdue', includeIfNull: true) + bool? overdue; + @JsonKey(name: 'timeMarking', includeIfNull: true) + DateTime? timeMarking; + static const fromJsonFactory = _$AssignExamListUserDtoFromJson; + static const toJsonFactory = _$AssignExamListUserDtoToJson; + Map toJson() => _$AssignExamListUserDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamListUserFilterDto { + AssignExamListUserFilterDto({ + this.keyword, + this.id, + this.fromDate, + this.toDate, + this.status, + this.sortExpression, + }); + + factory AssignExamListUserFilterDto.fromJson(Map json) => + _$AssignExamListUserFilterDtoFromJson(json); + + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + static const fromJsonFactory = _$AssignExamListUserFilterDtoFromJson; + static const toJsonFactory = _$AssignExamListUserFilterDtoToJson; + Map toJson() => _$AssignExamListUserFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamNeedDoDto { + AssignExamNeedDoDto({ + this.examId, + this.id, + this.title, + this.subjectId, + this.subject, + this.toDate, + this.type, + this.duration, + }); + + factory AssignExamNeedDoDto.fromJson(Map json) => + _$AssignExamNeedDoDtoFromJson(json); + + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + static const fromJsonFactory = _$AssignExamNeedDoDtoFromJson; + static const toJsonFactory = _$AssignExamNeedDoDtoToJson; + Map toJson() => _$AssignExamNeedDoDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamNeedDoDtoListApiResponse { + AssignExamNeedDoDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamNeedDoDtoListApiResponse.fromJson( + Map json) => + _$AssignExamNeedDoDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$AssignExamNeedDoDtoListApiResponseFromJson; + static const toJsonFactory = _$AssignExamNeedDoDtoListApiResponseToJson; + Map toJson() => + _$AssignExamNeedDoDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamScoreDistributionDto { + AssignExamScoreDistributionDto({ + this.scoreName, + this.count, + }); + + factory AssignExamScoreDistributionDto.fromJson(Map json) => + _$AssignExamScoreDistributionDtoFromJson(json); + + @JsonKey(name: 'scoreName', includeIfNull: true) + String? scoreName; + @JsonKey(name: 'count', includeIfNull: true) + int? count; + static const fromJsonFactory = _$AssignExamScoreDistributionDtoFromJson; + static const toJsonFactory = _$AssignExamScoreDistributionDtoToJson; + Map toJson() => _$AssignExamScoreDistributionDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamScoreDistributionDtoListApiResponse { + AssignExamScoreDistributionDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamScoreDistributionDtoListApiResponse.fromJson( + Map json) => + _$AssignExamScoreDistributionDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$AssignExamScoreDistributionDtoListApiResponseFromJson; + static const toJsonFactory = + _$AssignExamScoreDistributionDtoListApiResponseToJson; + Map toJson() => + _$AssignExamScoreDistributionDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamTopDifficultQuestionDto { + AssignExamTopDifficultQuestionDto({ + this.questionId, + this.question, + this.count, + }); + + factory AssignExamTopDifficultQuestionDto.fromJson( + Map json) => + _$AssignExamTopDifficultQuestionDtoFromJson(json); + + @JsonKey(name: 'questionId', includeIfNull: true) + int? questionId; + @JsonKey(name: 'question', includeIfNull: true) + String? question; + @JsonKey(name: 'count', includeIfNull: true) + int? count; + static const fromJsonFactory = _$AssignExamTopDifficultQuestionDtoFromJson; + static const toJsonFactory = _$AssignExamTopDifficultQuestionDtoToJson; + Map toJson() => + _$AssignExamTopDifficultQuestionDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamTopDifficultQuestionDtoListApiResponse { + AssignExamTopDifficultQuestionDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory AssignExamTopDifficultQuestionDtoListApiResponse.fromJson( + Map json) => + _$AssignExamTopDifficultQuestionDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$AssignExamTopDifficultQuestionDtoListApiResponseFromJson; + static const toJsonFactory = + _$AssignExamTopDifficultQuestionDtoListApiResponseToJson; + Map toJson() => + _$AssignExamTopDifficultQuestionDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamUpdateNoteDto { + AssignExamUpdateNoteDto({ + this.id, + this.userId, + this.note, + }); + + factory AssignExamUpdateNoteDto.fromJson(Map json) => + _$AssignExamUpdateNoteDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'note', includeIfNull: true) + String? note; + static const fromJsonFactory = _$AssignExamUpdateNoteDtoFromJson; + static const toJsonFactory = _$AssignExamUpdateNoteDtoToJson; + Map toJson() => _$AssignExamUpdateNoteDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamUpdateTimeDto { + AssignExamUpdateTimeDto({ + this.id, + this.time, + }); + + factory AssignExamUpdateTimeDto.fromJson(Map json) => + _$AssignExamUpdateTimeDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'time', includeIfNull: true) + DateTime? time; + static const fromJsonFactory = _$AssignExamUpdateTimeDtoFromJson; + static const toJsonFactory = _$AssignExamUpdateTimeDtoToJson; + Map toJson() => _$AssignExamUpdateTimeDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamUserEditDto { + AssignExamUserEditDto({ + this.assignExamId, + this.userId, + this.status, + this.examResultId, + this.startDate, + this.mark, + this.duration, + this.endDate, + this.note, + this.classUserId, + }); + + factory AssignExamUserEditDto.fromJson(Map json) => + _$AssignExamUserEditDtoFromJson(json); + + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'note', includeIfNull: true) + String? note; + @JsonKey(name: 'classUserId', includeIfNull: true) + int? classUserId; + static const fromJsonFactory = _$AssignExamUserEditDtoFromJson; + static const toJsonFactory = _$AssignExamUserEditDtoToJson; + Map toJson() => _$AssignExamUserEditDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExamUserEntity { + AssignExamUserEntity({ + this.assignExamId, + this.userId, + this.status, + this.examResultId, + this.startDate, + this.mark, + this.duration, + this.endDate, + this.note, + }); + + factory AssignExamUserEntity.fromJson(Map json) => + _$AssignExamUserEntityFromJson(json); + + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'note', includeIfNull: true) + String? note; + static const fromJsonFactory = _$AssignExamUserEntityFromJson; + static const toJsonFactory = _$AssignExamUserEntityToJson; + Map toJson() => _$AssignExamUserEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AssignExistingTeacherDto { + AssignExistingTeacherDto({ + this.schoolId, + this.userId, + this.subject, + this.classManage, + this.classList, + }); + + factory AssignExistingTeacherDto.fromJson(Map json) => + _$AssignExistingTeacherDtoFromJson(json); + + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'subject', includeIfNull: true, defaultValue: []) + List? subject; + @JsonKey(name: 'classManage', includeIfNull: true, defaultValue: []) + List? classManage; + @JsonKey(name: 'classList', includeIfNull: true, defaultValue: []) + List? classList; + static const fromJsonFactory = _$AssignExistingTeacherDtoFromJson; + static const toJsonFactory = _$AssignExistingTeacherDtoToJson; + Map toJson() => _$AssignExistingTeacherDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class BooleanApiResponse { + BooleanApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory BooleanApiResponse.fromJson(Map json) => + _$BooleanApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + bool? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$BooleanApiResponseFromJson; + static const toJsonFactory = _$BooleanApiResponseToJson; + Map toJson() => _$BooleanApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartAddItemDto { + CartAddItemDto({ + this.productId, + this.quantity, + }); + + factory CartAddItemDto.fromJson(Map json) => + _$CartAddItemDtoFromJson(json); + + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + static const fromJsonFactory = _$CartAddItemDtoFromJson; + static const toJsonFactory = _$CartAddItemDtoToJson; + Map toJson() => _$CartAddItemDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartDto { + CartDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.notes, + this.items, + }); + + factory CartDto.fromJson(Map json) => + _$CartDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'items', includeIfNull: true, defaultValue: []) + List? items; + static const fromJsonFactory = _$CartDtoFromJson; + static const toJsonFactory = _$CartDtoToJson; + Map toJson() => _$CartDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartDtoApiResponse { + CartDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CartDtoApiResponse.fromJson(Map json) => + _$CartDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + CartDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$CartDtoApiResponseFromJson; + static const toJsonFactory = _$CartDtoApiResponseToJson; + Map toJson() => _$CartDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartEntity { + CartEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.notes, + this.items, + }); + + factory CartEntity.fromJson(Map json) => + _$CartEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'items', includeIfNull: true, defaultValue: []) + List? items; + static const fromJsonFactory = _$CartEntityFromJson; + static const toJsonFactory = _$CartEntityToJson; + Map toJson() => _$CartEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartItemDto { + CartItemDto({ + this.id, + this.cartId, + this.productId, + this.quantity, + this.product, + }); + + factory CartItemDto.fromJson(Map json) => + _$CartItemDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'cartId', includeIfNull: true) + int? cartId; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + @JsonKey(name: 'product', includeIfNull: true) + ProductListDto? product; + static const fromJsonFactory = _$CartItemDtoFromJson; + static const toJsonFactory = _$CartItemDtoToJson; + Map toJson() => _$CartItemDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartItemEntity { + CartItemEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.cartId, + this.productId, + this.quantity, + this.cart, + this.product, + }); + + factory CartItemEntity.fromJson(Map json) => + _$CartItemEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'cartId', includeIfNull: true) + int? cartId; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + @JsonKey(name: 'cart', includeIfNull: true) + CartEntity? cart; + @JsonKey(name: 'product', includeIfNull: true) + ProductEntity? product; + static const fromJsonFactory = _$CartItemEntityFromJson; + static const toJsonFactory = _$CartItemEntityToJson; + Map toJson() => _$CartItemEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CartUpdateItemDto { + CartUpdateItemDto({ + this.cartItemId, + this.quantity, + }); + + factory CartUpdateItemDto.fromJson(Map json) => + _$CartUpdateItemDtoFromJson(json); + + @JsonKey(name: 'cartItemId', includeIfNull: true) + int? cartItemId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + static const fromJsonFactory = _$CartUpdateItemDtoFromJson; + static const toJsonFactory = _$CartUpdateItemDtoToJson; + Map toJson() => _$CartUpdateItemDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryClassLevelEntity { + CategoryClassLevelEntity({ + this.categoryId, + this.classLevel, + this.category, + }); + + factory CategoryClassLevelEntity.fromJson(Map json) => + _$CategoryClassLevelEntityFromJson(json); + + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'category', includeIfNull: true) + CategoryEntity? category; + static const fromJsonFactory = _$CategoryClassLevelEntityFromJson; + static const toJsonFactory = _$CategoryClassLevelEntityToJson; + Map toJson() => _$CategoryClassLevelEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryEntity { + CategoryEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.url, + this.code, + this.parentId, + this.level, + this.path, + this.icon, + this.status, + this.categoryClassLevels, + }); + + factory CategoryEntity.fromJson(Map json) => + _$CategoryEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'level', includeIfNull: true) + int? level; + @JsonKey(name: 'path', includeIfNull: true) + String? path; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey( + name: 'categoryClassLevels', + includeIfNull: true, + defaultValue: []) + List? categoryClassLevels; + static const fromJsonFactory = _$CategoryEntityFromJson; + static const toJsonFactory = _$CategoryEntityToJson; + Map toJson() => _$CategoryEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryEntityApiResponse { + CategoryEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CategoryEntityApiResponse.fromJson(Map json) => + _$CategoryEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + CategoryEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$CategoryEntityApiResponseFromJson; + static const toJsonFactory = _$CategoryEntityApiResponseToJson; + Map toJson() => _$CategoryEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryGetListQuery { + CategoryGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.zoneId, + this.code, + }); + + factory CategoryGetListQuery.fromJson(Map json) => + _$CategoryGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'zoneId', includeIfNull: true) + int? zoneId; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + static const fromJsonFactory = _$CategoryGetListQueryFromJson; + static const toJsonFactory = _$CategoryGetListQueryToJson; + Map toJson() => _$CategoryGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryGetListWithGalleryCountQuery { + CategoryGetListWithGalleryCountQuery({ + this.code, + this.includeTotal, + }); + + factory CategoryGetListWithGalleryCountQuery.fromJson( + Map json) => + _$CategoryGetListWithGalleryCountQueryFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'includeTotal', includeIfNull: true) + bool? includeTotal; + static const fromJsonFactory = _$CategoryGetListWithGalleryCountQueryFromJson; + static const toJsonFactory = _$CategoryGetListWithGalleryCountQueryToJson; + Map toJson() => + _$CategoryGetListWithGalleryCountQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryGetListWithNewsCountQuery { + CategoryGetListWithNewsCountQuery({ + this.code, + this.includeTotal, + }); + + factory CategoryGetListWithNewsCountQuery.fromJson( + Map json) => + _$CategoryGetListWithNewsCountQueryFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'includeTotal', includeIfNull: true) + bool? includeTotal; + static const fromJsonFactory = _$CategoryGetListWithNewsCountQueryFromJson; + static const toJsonFactory = _$CategoryGetListWithNewsCountQueryToJson; + Map toJson() => + _$CategoryGetListWithNewsCountQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryListDto { + CategoryListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.url, + this.code, + this.parentId, + this.level, + this.path, + this.icon, + this.status, + this.categoryClassLevels, + }); + + factory CategoryListDto.fromJson(Map json) => + _$CategoryListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'level', includeIfNull: true) + int? level; + @JsonKey(name: 'path', includeIfNull: true) + String? path; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey( + name: 'categoryClassLevels', + includeIfNull: true, + defaultValue: []) + List? categoryClassLevels; + static const fromJsonFactory = _$CategoryListDtoFromJson; + static const toJsonFactory = _$CategoryListDtoToJson; + Map toJson() => _$CategoryListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryListDtoFilterResult { + CategoryListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory CategoryListDtoFilterResult.fromJson(Map json) => + _$CategoryListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$CategoryListDtoFilterResultFromJson; + static const toJsonFactory = _$CategoryListDtoFilterResultToJson; + Map toJson() => _$CategoryListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryListDtoFilterResultApiResponse { + CategoryListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CategoryListDtoFilterResultApiResponse.fromJson( + Map json) => + _$CategoryListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + CategoryListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$CategoryListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$CategoryListDtoFilterResultApiResponseToJson; + Map toJson() => + _$CategoryListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryWithGalleryCountDto { + CategoryWithGalleryCountDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.url, + this.code, + this.parentId, + this.level, + this.path, + this.icon, + this.status, + this.categoryClassLevels, + this.galleryCount, + }); + + factory CategoryWithGalleryCountDto.fromJson(Map json) => + _$CategoryWithGalleryCountDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'level', includeIfNull: true) + int? level; + @JsonKey(name: 'path', includeIfNull: true) + String? path; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey( + name: 'categoryClassLevels', + includeIfNull: true, + defaultValue: []) + List? categoryClassLevels; + @JsonKey(name: 'galleryCount', includeIfNull: true) + int? galleryCount; + static const fromJsonFactory = _$CategoryWithGalleryCountDtoFromJson; + static const toJsonFactory = _$CategoryWithGalleryCountDtoToJson; + Map toJson() => _$CategoryWithGalleryCountDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryWithGalleryCountDtoListApiResponse { + CategoryWithGalleryCountDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CategoryWithGalleryCountDtoListApiResponse.fromJson( + Map json) => + _$CategoryWithGalleryCountDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$CategoryWithGalleryCountDtoListApiResponseFromJson; + static const toJsonFactory = + _$CategoryWithGalleryCountDtoListApiResponseToJson; + Map toJson() => + _$CategoryWithGalleryCountDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryWithNewsCountDto { + CategoryWithNewsCountDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.url, + this.code, + this.parentId, + this.level, + this.path, + this.icon, + this.status, + this.categoryClassLevels, + this.newsCount, + }); + + factory CategoryWithNewsCountDto.fromJson(Map json) => + _$CategoryWithNewsCountDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'level', includeIfNull: true) + int? level; + @JsonKey(name: 'path', includeIfNull: true) + String? path; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey( + name: 'categoryClassLevels', + includeIfNull: true, + defaultValue: []) + List? categoryClassLevels; + @JsonKey(name: 'newsCount', includeIfNull: true) + int? newsCount; + static const fromJsonFactory = _$CategoryWithNewsCountDtoFromJson; + static const toJsonFactory = _$CategoryWithNewsCountDtoToJson; + Map toJson() => _$CategoryWithNewsCountDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CategoryWithNewsCountDtoListApiResponse { + CategoryWithNewsCountDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CategoryWithNewsCountDtoListApiResponse.fromJson( + Map json) => + _$CategoryWithNewsCountDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$CategoryWithNewsCountDtoListApiResponseFromJson; + static const toJsonFactory = _$CategoryWithNewsCountDtoListApiResponseToJson; + Map toJson() => + _$CategoryWithNewsCountDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChangeEmailDto { + ChangeEmailDto({ + this.id, + this.password, + this.email, + }); + + factory ChangeEmailDto.fromJson(Map json) => + _$ChangeEmailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + static const fromJsonFactory = _$ChangeEmailDtoFromJson; + static const toJsonFactory = _$ChangeEmailDtoToJson; + Map toJson() => _$ChangeEmailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChangePasswordDto { + ChangePasswordDto({ + this.oldPassword, + this.newPassword, + this.reNewPassword, + }); + + factory ChangePasswordDto.fromJson(Map json) => + _$ChangePasswordDtoFromJson(json); + + @JsonKey(name: 'oldPassword', includeIfNull: true) + String? oldPassword; + @JsonKey(name: 'newPassword', includeIfNull: true) + String? newPassword; + @JsonKey(name: 'reNewPassword', includeIfNull: true) + String? reNewPassword; + static const fromJsonFactory = _$ChangePasswordDtoFromJson; + static const toJsonFactory = _$ChangePasswordDtoToJson; + Map toJson() => _$ChangePasswordDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatGroupDetailDto { + ChatGroupDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.avatar, + this.status, + this.type, + this.documentId, + this.listUserOfGroup, + this.isOnline, + }); + + factory ChatGroupDetailDto.fromJson(Map json) => + _$ChatGroupDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'documentId', includeIfNull: true) + int? documentId; + @JsonKey( + name: 'listUserOfGroup', + includeIfNull: true, + defaultValue: []) + List? listUserOfGroup; + @JsonKey(name: 'isOnline', includeIfNull: true) + bool? isOnline; + static const fromJsonFactory = _$ChatGroupDetailDtoFromJson; + static const toJsonFactory = _$ChatGroupDetailDtoToJson; + Map toJson() => _$ChatGroupDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatGroupDetailDtoApiResponse { + ChatGroupDetailDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ChatGroupDetailDtoApiResponse.fromJson(Map json) => + _$ChatGroupDetailDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ChatGroupDetailDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ChatGroupDetailDtoApiResponseFromJson; + static const toJsonFactory = _$ChatGroupDetailDtoApiResponseToJson; + Map toJson() => _$ChatGroupDetailDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatGroupEntity { + ChatGroupEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.avatar, + this.status, + this.type, + this.documentId, + }); + + factory ChatGroupEntity.fromJson(Map json) => + _$ChatGroupEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'documentId', includeIfNull: true) + int? documentId; + static const fromJsonFactory = _$ChatGroupEntityFromJson; + static const toJsonFactory = _$ChatGroupEntityToJson; + Map toJson() => _$ChatGroupEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatGroupEntityApiResponse { + ChatGroupEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ChatGroupEntityApiResponse.fromJson(Map json) => + _$ChatGroupEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ChatGroupEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ChatGroupEntityApiResponseFromJson; + static const toJsonFactory = _$ChatGroupEntityApiResponseToJson; + Map toJson() => _$ChatGroupEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassAddListUserCommand { + ClassAddListUserCommand({ + this.userIds, + this.classId, + this.role, + }); + + factory ClassAddListUserCommand.fromJson(Map json) => + _$ClassAddListUserCommandFromJson(json); + + @JsonKey(name: 'userIds', includeIfNull: true, defaultValue: []) + List? userIds; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey( + name: 'role', + includeIfNull: true, + toJson: classUserRoleEnumToJson, + fromJson: classUserRoleEnumFromJson) + enums.ClassUserRoleEnum? role; + static const fromJsonFactory = _$ClassAddListUserCommandFromJson; + static const toJsonFactory = _$ClassAddListUserCommandToJson; + Map toJson() => _$ClassAddListUserCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassByUserDto { + ClassByUserDto({ + this.id, + this.name, + }); + + factory ClassByUserDto.fromJson(Map json) => + _$ClassByUserDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + static const fromJsonFactory = _$ClassByUserDtoFromJson; + static const toJsonFactory = _$ClassByUserDtoToJson; + Map toJson() => _$ClassByUserDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassChangeClassCommand { + ClassChangeClassCommand({ + this.userIds, + this.oldClassId, + this.newClassId, + this.status, + }); + + factory ClassChangeClassCommand.fromJson(Map json) => + _$ClassChangeClassCommandFromJson(json); + + @JsonKey(name: 'userIds', includeIfNull: true, defaultValue: []) + List? userIds; + @JsonKey(name: 'oldClassId', includeIfNull: true) + int? oldClassId; + @JsonKey(name: 'newClassId', includeIfNull: true) + int? newClassId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + static const fromJsonFactory = _$ClassChangeClassCommandFromJson; + static const toJsonFactory = _$ClassChangeClassCommandToJson; + Map toJson() => _$ClassChangeClassCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassDetailDto { + ClassDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.schoolId, + this.academicYearId, + this.status, + this.grade, + this.classProgramTypeId, + this.classProgramType, + this.classType, + this.productId, + this.maxStudents, + this.startDate, + this.endDate, + this.zoomMeetingId, + this.zoomPassword, + this.description, + this.classUsers, + this.assignExams, + this.classSessions, + this.currentRole, + }); + + factory ClassDetailDto.fromJson(Map json) => + _$ClassDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'academicYearId', includeIfNull: true) + int? academicYearId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classStatusEnumToJson, + fromJson: classStatusEnumFromJson) + enums.ClassStatusEnum? status; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'classProgramTypeId', includeIfNull: true) + int? classProgramTypeId; + @JsonKey(name: 'classProgramType', includeIfNull: true) + ClassProgramTypeEntity? classProgramType; + @JsonKey( + name: 'classType', + includeIfNull: true, + toJson: classTypeEnumToJson, + fromJson: classTypeEnumFromJson) + enums.ClassTypeEnum? classType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'maxStudents', includeIfNull: true) + int? maxStudents; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'zoomMeetingId', includeIfNull: true) + String? zoomMeetingId; + @JsonKey(name: 'zoomPassword', includeIfNull: true) + String? zoomPassword; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'classUsers', + includeIfNull: true, + defaultValue: []) + List? classUsers; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + @JsonKey( + name: 'classSessions', + includeIfNull: true, + defaultValue: []) + List? classSessions; + @JsonKey( + name: 'currentRole', + includeIfNull: true, + toJson: classUserRoleEnumToJson, + fromJson: classUserRoleEnumFromJson) + enums.ClassUserRoleEnum? currentRole; + static const fromJsonFactory = _$ClassDetailDtoFromJson; + static const toJsonFactory = _$ClassDetailDtoToJson; + Map toJson() => _$ClassDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassEntity { + ClassEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.schoolId, + this.academicYearId, + this.status, + this.grade, + this.classProgramTypeId, + this.classProgramType, + this.classType, + this.productId, + this.maxStudents, + this.startDate, + this.endDate, + this.zoomMeetingId, + this.zoomPassword, + this.description, + this.classUsers, + this.assignExams, + this.classSessions, + }); + + factory ClassEntity.fromJson(Map json) => + _$ClassEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'academicYearId', includeIfNull: true) + int? academicYearId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classStatusEnumToJson, + fromJson: classStatusEnumFromJson) + enums.ClassStatusEnum? status; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'classProgramTypeId', includeIfNull: true) + int? classProgramTypeId; + @JsonKey(name: 'classProgramType', includeIfNull: true) + ClassProgramTypeEntity? classProgramType; + @JsonKey( + name: 'classType', + includeIfNull: true, + toJson: classTypeEnumToJson, + fromJson: classTypeEnumFromJson) + enums.ClassTypeEnum? classType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'maxStudents', includeIfNull: true) + int? maxStudents; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'zoomMeetingId', includeIfNull: true) + String? zoomMeetingId; + @JsonKey(name: 'zoomPassword', includeIfNull: true) + String? zoomPassword; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'classUsers', + includeIfNull: true, + defaultValue: []) + List? classUsers; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + @JsonKey( + name: 'classSessions', + includeIfNull: true, + defaultValue: []) + List? classSessions; + static const fromJsonFactory = _$ClassEntityFromJson; + static const toJsonFactory = _$ClassEntityToJson; + Map toJson() => _$ClassEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassGetListFilter { + ClassGetListFilter({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.schoolId, + this.academicYearId, + this.status, + this.isGetAll, + this.userId, + this.grade, + this.searchType, + }); + + factory ClassGetListFilter.fromJson(Map json) => + _$ClassGetListFilterFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'academicYearId', includeIfNull: true) + int? academicYearId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classStatusEnumToJson, + fromJson: classStatusEnumFromJson) + enums.ClassStatusEnum? status; + @JsonKey(name: 'isGetAll', includeIfNull: true) + bool? isGetAll; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey( + name: 'searchType', + includeIfNull: true, + toJson: classListSearchTypeEnumToJson, + fromJson: classListSearchTypeEnumFromJson) + enums.ClassListSearchTypeEnum? searchType; + static const fromJsonFactory = _$ClassGetListFilterFromJson; + static const toJsonFactory = _$ClassGetListFilterToJson; + Map toJson() => _$ClassGetListFilterToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassLevel { + ClassLevel({ + this.id, + this.grade, + this.name, + this.subjects, + }); + + factory ClassLevel.fromJson(Map json) => + _$ClassLevelFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'subjects', includeIfNull: true, defaultValue: []) + List? subjects; + static const fromJsonFactory = _$ClassLevelFromJson; + static const toJsonFactory = _$ClassLevelToJson; + Map toJson() => _$ClassLevelToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassListDto { + ClassListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.schoolId, + this.academicYearId, + this.status, + this.grade, + this.classProgramTypeId, + this.classProgramType, + this.classType, + this.productId, + this.maxStudents, + this.startDate, + this.endDate, + this.zoomMeetingId, + this.zoomPassword, + this.description, + this.classUsers, + this.assignExams, + this.classSessions, + this.countPupil, + this.countExercise, + this.countTest, + this.countNeedMark, + this.testAverageScore, + this.studentCountTest, + this.studentCountTestDone, + this.currentRole, + this.isManager, + this.schoolName, + this.subject, + }); + + factory ClassListDto.fromJson(Map json) => + _$ClassListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'academicYearId', includeIfNull: true) + int? academicYearId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classStatusEnumToJson, + fromJson: classStatusEnumFromJson) + enums.ClassStatusEnum? status; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'classProgramTypeId', includeIfNull: true) + int? classProgramTypeId; + @JsonKey(name: 'classProgramType', includeIfNull: true) + ClassProgramTypeEntity? classProgramType; + @JsonKey( + name: 'classType', + includeIfNull: true, + toJson: classTypeEnumToJson, + fromJson: classTypeEnumFromJson) + enums.ClassTypeEnum? classType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'maxStudents', includeIfNull: true) + int? maxStudents; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey(name: 'zoomMeetingId', includeIfNull: true) + String? zoomMeetingId; + @JsonKey(name: 'zoomPassword', includeIfNull: true) + String? zoomPassword; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'classUsers', + includeIfNull: true, + defaultValue: []) + List? classUsers; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + @JsonKey( + name: 'classSessions', + includeIfNull: true, + defaultValue: []) + List? classSessions; + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countExercise', includeIfNull: true) + int? countExercise; + @JsonKey(name: 'countTest', includeIfNull: true) + int? countTest; + @JsonKey(name: 'countNeedMark', includeIfNull: true) + int? countNeedMark; + @JsonKey(name: 'testAverageScore', includeIfNull: true) + double? testAverageScore; + @JsonKey(name: 'studentCountTest', includeIfNull: true) + int? studentCountTest; + @JsonKey(name: 'studentCountTestDone', includeIfNull: true) + int? studentCountTestDone; + @JsonKey( + name: 'currentRole', + includeIfNull: true, + toJson: classUserRoleEnumToJson, + fromJson: classUserRoleEnumFromJson) + enums.ClassUserRoleEnum? currentRole; + @JsonKey(name: 'isManager', includeIfNull: true) + bool? isManager; + @JsonKey(name: 'schoolName', includeIfNull: true) + String? schoolName; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + static const fromJsonFactory = _$ClassListDtoFromJson; + static const toJsonFactory = _$ClassListDtoToJson; + Map toJson() => _$ClassListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassListDtoFilterResult { + ClassListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ClassListDtoFilterResult.fromJson(Map json) => + _$ClassListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ClassListDtoFilterResultFromJson; + static const toJsonFactory = _$ClassListDtoFilterResultToJson; + Map toJson() => _$ClassListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassListOfSchoolDto { + ClassListOfSchoolDto({ + this.id, + this.name, + this.grade, + this.countPupil, + this.countTeacher, + this.countExam, + this.countNeedMark, + this.testAverageScore, + }); + + factory ClassListOfSchoolDto.fromJson(Map json) => + _$ClassListOfSchoolDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countTeacher', includeIfNull: true) + int? countTeacher; + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + @JsonKey(name: 'countNeedMark', includeIfNull: true) + int? countNeedMark; + @JsonKey(name: 'testAverageScore', includeIfNull: true) + double? testAverageScore; + static const fromJsonFactory = _$ClassListOfSchoolDtoFromJson; + static const toJsonFactory = _$ClassListOfSchoolDtoToJson; + Map toJson() => _$ClassListOfSchoolDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassListOfSchoolDtoFilterResult { + ClassListOfSchoolDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ClassListOfSchoolDtoFilterResult.fromJson( + Map json) => + _$ClassListOfSchoolDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ClassListOfSchoolDtoFilterResultFromJson; + static const toJsonFactory = _$ClassListOfSchoolDtoFilterResultToJson; + Map toJson() => + _$ClassListOfSchoolDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassListOfSchoolFilter { + ClassListOfSchoolFilter({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.schoolId, + this.keyword, + this.grade, + }); + + factory ClassListOfSchoolFilter.fromJson(Map json) => + _$ClassListOfSchoolFilterFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + static const fromJsonFactory = _$ClassListOfSchoolFilterFromJson; + static const toJsonFactory = _$ClassListOfSchoolFilterToJson; + Map toJson() => _$ClassListOfSchoolFilterToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassProgramTypeEntity { + ClassProgramTypeEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.schoolId, + this.description, + }); + + factory ClassProgramTypeEntity.fromJson(Map json) => + _$ClassProgramTypeEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + static const fromJsonFactory = _$ClassProgramTypeEntityFromJson; + static const toJsonFactory = _$ClassProgramTypeEntityToJson; + Map toJson() => _$ClassProgramTypeEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassProgramTypeEntityApiResponse { + ClassProgramTypeEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ClassProgramTypeEntityApiResponse.fromJson( + Map json) => + _$ClassProgramTypeEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ClassProgramTypeEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ClassProgramTypeEntityApiResponseFromJson; + static const toJsonFactory = _$ClassProgramTypeEntityApiResponseToJson; + Map toJson() => + _$ClassProgramTypeEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassProgramTypeEntityListApiResponse { + ClassProgramTypeEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ClassProgramTypeEntityListApiResponse.fromJson( + Map json) => + _$ClassProgramTypeEntityListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ClassProgramTypeEntityListApiResponseFromJson; + static const toJsonFactory = _$ClassProgramTypeEntityListApiResponseToJson; + Map toJson() => + _$ClassProgramTypeEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassPupilDto { + ClassPupilDto({ + this.id, + this.name, + this.countExamNeedDo, + this.countUser, + }); + + factory ClassPupilDto.fromJson(Map json) => + _$ClassPupilDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'countExamNeedDo', includeIfNull: true) + int? countExamNeedDo; + @JsonKey(name: 'countUser', includeIfNull: true) + int? countUser; + static const fromJsonFactory = _$ClassPupilDtoFromJson; + static const toJsonFactory = _$ClassPupilDtoToJson; + Map toJson() => _$ClassPupilDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassPupilStatisticalDto { + ClassPupilStatisticalDto({ + this.userId, + this.avatar, + this.fullName, + this.fullNameNonAccent, + this.joinDate, + this.percentHomeWorkDone, + this.countExam, + this.averageScoreExam, + this.averageScoreTest, + }); + + factory ClassPupilStatisticalDto.fromJson(Map json) => + _$ClassPupilStatisticalDtoFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'fullNameNonAccent', includeIfNull: true) + String? fullNameNonAccent; + @JsonKey(name: 'joinDate', includeIfNull: true) + DateTime? joinDate; + @JsonKey(name: 'percentHomeWorkDone', includeIfNull: true) + double? percentHomeWorkDone; + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + @JsonKey(name: 'averageScoreExam', includeIfNull: true) + double? averageScoreExam; + @JsonKey(name: 'averageScoreTest', includeIfNull: true) + double? averageScoreTest; + static const fromJsonFactory = _$ClassPupilStatisticalDtoFromJson; + static const toJsonFactory = _$ClassPupilStatisticalDtoToJson; + Map toJson() => _$ClassPupilStatisticalDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassPupilStatisticalDtoFilterResult { + ClassPupilStatisticalDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ClassPupilStatisticalDtoFilterResult.fromJson( + Map json) => + _$ClassPupilStatisticalDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = _$ClassPupilStatisticalDtoFilterResultFromJson; + static const toJsonFactory = _$ClassPupilStatisticalDtoFilterResultToJson; + Map toJson() => + _$ClassPupilStatisticalDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassPupilStatisticalFilter { + ClassPupilStatisticalFilter({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.classId, + this.keyword, + this.subjectId, + }); + + factory ClassPupilStatisticalFilter.fromJson(Map json) => + _$ClassPupilStatisticalFilterFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + static const fromJsonFactory = _$ClassPupilStatisticalFilterFromJson; + static const toJsonFactory = _$ClassPupilStatisticalFilterToJson; + Map toJson() => _$ClassPupilStatisticalFilterToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassRemoveUserCommand { + ClassRemoveUserCommand({ + this.userId, + this.classId, + }); + + factory ClassRemoveUserCommand.fromJson(Map json) => + _$ClassRemoveUserCommandFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + static const fromJsonFactory = _$ClassRemoveUserCommandFromJson; + static const toJsonFactory = _$ClassRemoveUserCommandToJson; + Map toJson() => _$ClassRemoveUserCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassSessionEntity { + ClassSessionEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.classId, + this.productLessonId, + this.sessionNumber, + this.sessionName, + this.description, + this.startTime, + this.endTime, + this.zoomMeetingId, + this.zoomJoinLink, + this.zoomStartLink, + this.zoomPassword, + this.recordingUrl, + this.actualDurationMinutes, + this.status, + this.notes, + this.$class, + this.productLesson, + this.attendances, + }); + + factory ClassSessionEntity.fromJson(Map json) => + _$ClassSessionEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'productLessonId', includeIfNull: true) + int? productLessonId; + @JsonKey(name: 'sessionNumber', includeIfNull: true) + int? sessionNumber; + @JsonKey(name: 'sessionName', includeIfNull: true) + String? sessionName; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'startTime', includeIfNull: true) + DateTime? startTime; + @JsonKey(name: 'endTime', includeIfNull: true) + DateTime? endTime; + @JsonKey(name: 'zoomMeetingId', includeIfNull: true) + String? zoomMeetingId; + @JsonKey(name: 'zoomJoinLink', includeIfNull: true) + String? zoomJoinLink; + @JsonKey(name: 'zoomStartLink', includeIfNull: true) + String? zoomStartLink; + @JsonKey(name: 'zoomPassword', includeIfNull: true) + String? zoomPassword; + @JsonKey(name: 'recordingUrl', includeIfNull: true) + String? recordingUrl; + @JsonKey(name: 'actualDurationMinutes', includeIfNull: true) + int? actualDurationMinutes; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: sessionStatusEnumToJson, + fromJson: sessionStatusEnumFromJson) + enums.SessionStatusEnum? status; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'class', includeIfNull: true) + ClassEntity? $class; + @JsonKey(name: 'productLesson', includeIfNull: true) + ProductLessonEntity? productLesson; + @JsonKey( + name: 'attendances', + includeIfNull: true, + defaultValue: []) + List? attendances; + static const fromJsonFactory = _$ClassSessionEntityFromJson; + static const toJsonFactory = _$ClassSessionEntityToJson; + Map toJson() => _$ClassSessionEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassShortDto { + ClassShortDto({ + this.id, + this.name, + this.grade, + this.schoolId, + this.classUsers, + }); + + factory ClassShortDto.fromJson(Map json) => + _$ClassShortDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'grade', includeIfNull: true) + String? grade; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey( + name: 'classUsers', + includeIfNull: true, + defaultValue: []) + List? classUsers; + static const fromJsonFactory = _$ClassShortDtoFromJson; + static const toJsonFactory = _$ClassShortDtoToJson; + Map toJson() => _$ClassShortDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassStatisticalDto { + ClassStatisticalDto({ + this.waitingGrading, + this.countTeacher, + this.countPupil, + this.countExam, + }); + + factory ClassStatisticalDto.fromJson(Map json) => + _$ClassStatisticalDtoFromJson(json); + + @JsonKey(name: 'waitingGrading', includeIfNull: true) + int? waitingGrading; + @JsonKey(name: 'countTeacher', includeIfNull: true) + int? countTeacher; + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + static const fromJsonFactory = _$ClassStatisticalDtoFromJson; + static const toJsonFactory = _$ClassStatisticalDtoToJson; + Map toJson() => _$ClassStatisticalDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassUserEntity { + ClassUserEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.classId, + this.role, + this.status, + this.note, + this.subjectIds, + this.isManager, + }); + + factory ClassUserEntity.fromJson(Map json) => + _$ClassUserEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey( + name: 'role', + includeIfNull: true, + toJson: classUserRoleEnumToJson, + fromJson: classUserRoleEnumFromJson) + enums.ClassUserRoleEnum? role; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + @JsonKey(name: 'note', includeIfNull: true) + String? note; + @JsonKey(name: 'subjectIds', includeIfNull: true, defaultValue: []) + List? subjectIds; + @JsonKey(name: 'isManager', includeIfNull: true) + bool? isManager; + static const fromJsonFactory = _$ClassUserEntityFromJson; + static const toJsonFactory = _$ClassUserEntityToJson; + Map toJson() => _$ClassUserEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ClassUserShortDto { + ClassUserShortDto({ + this.id, + this.fullName, + this.avatar, + }); + + factory ClassUserShortDto.fromJson(Map json) => + _$ClassUserShortDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + static const fromJsonFactory = _$ClassUserShortDtoFromJson; + static const toJsonFactory = _$ClassUserShortDtoToJson; + Map toJson() => _$ClassUserShortDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationEntity { + ConsultationRegistrationEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.phone, + this.email, + this.message, + this.planType, + this.productId, + this.status, + this.adminNote, + this.contactedDate, + this.contactedBy, + }); + + factory ConsultationRegistrationEntity.fromJson(Map json) => + _$ConsultationRegistrationEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'planType', includeIfNull: true) + String? planType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: consultationStatusEnumToJson, + fromJson: consultationStatusEnumFromJson) + enums.ConsultationStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + @JsonKey(name: 'contactedDate', includeIfNull: true) + DateTime? contactedDate; + @JsonKey(name: 'contactedBy', includeIfNull: true) + int? contactedBy; + static const fromJsonFactory = _$ConsultationRegistrationEntityFromJson; + static const toJsonFactory = _$ConsultationRegistrationEntityToJson; + Map toJson() => _$ConsultationRegistrationEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationEntityApiResponse { + ConsultationRegistrationEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ConsultationRegistrationEntityApiResponse.fromJson( + Map json) => + _$ConsultationRegistrationEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ConsultationRegistrationEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ConsultationRegistrationEntityApiResponseFromJson; + static const toJsonFactory = + _$ConsultationRegistrationEntityApiResponseToJson; + Map toJson() => + _$ConsultationRegistrationEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationGetListQuery { + ConsultationRegistrationGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.status, + this.planType, + this.fromDate, + this.toDate, + }); + + factory ConsultationRegistrationGetListQuery.fromJson( + Map json) => + _$ConsultationRegistrationGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: consultationStatusEnumToJson, + fromJson: consultationStatusEnumFromJson) + enums.ConsultationStatusEnum? status; + @JsonKey(name: 'planType', includeIfNull: true) + String? planType; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + static const fromJsonFactory = _$ConsultationRegistrationGetListQueryFromJson; + static const toJsonFactory = _$ConsultationRegistrationGetListQueryToJson; + Map toJson() => + _$ConsultationRegistrationGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationListDto { + ConsultationRegistrationListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.phone, + this.email, + this.message, + this.planType, + this.productId, + this.status, + this.adminNote, + this.contactedDate, + this.contactedBy, + this.productName, + this.contactedByName, + }); + + factory ConsultationRegistrationListDto.fromJson(Map json) => + _$ConsultationRegistrationListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'planType', includeIfNull: true) + String? planType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: consultationStatusEnumToJson, + fromJson: consultationStatusEnumFromJson) + enums.ConsultationStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + @JsonKey(name: 'contactedDate', includeIfNull: true) + DateTime? contactedDate; + @JsonKey(name: 'contactedBy', includeIfNull: true) + int? contactedBy; + @JsonKey(name: 'productName', includeIfNull: true) + String? productName; + @JsonKey(name: 'contactedByName', includeIfNull: true) + String? contactedByName; + static const fromJsonFactory = _$ConsultationRegistrationListDtoFromJson; + static const toJsonFactory = _$ConsultationRegistrationListDtoToJson; + Map toJson() => + _$ConsultationRegistrationListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationListDtoFilterResult { + ConsultationRegistrationListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ConsultationRegistrationListDtoFilterResult.fromJson( + Map json) => + _$ConsultationRegistrationListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = + _$ConsultationRegistrationListDtoFilterResultFromJson; + static const toJsonFactory = + _$ConsultationRegistrationListDtoFilterResultToJson; + Map toJson() => + _$ConsultationRegistrationListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationListDtoFilterResultApiResponse { + ConsultationRegistrationListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ConsultationRegistrationListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ConsultationRegistrationListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ConsultationRegistrationListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ConsultationRegistrationListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$ConsultationRegistrationListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ConsultationRegistrationListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationSaveDto { + ConsultationRegistrationSaveDto({ + this.name, + this.phone, + this.email, + this.message, + this.planType, + this.productId, + }); + + factory ConsultationRegistrationSaveDto.fromJson(Map json) => + _$ConsultationRegistrationSaveDtoFromJson(json); + + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'planType', includeIfNull: true) + String? planType; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + static const fromJsonFactory = _$ConsultationRegistrationSaveDtoFromJson; + static const toJsonFactory = _$ConsultationRegistrationSaveDtoToJson; + Map toJson() => + _$ConsultationRegistrationSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ConsultationRegistrationUpdateStatusRequest { + ConsultationRegistrationUpdateStatusRequest({ + this.status, + this.adminNote, + }); + + factory ConsultationRegistrationUpdateStatusRequest.fromJson( + Map json) => + _$ConsultationRegistrationUpdateStatusRequestFromJson(json); + + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: consultationStatusEnumToJson, + fromJson: consultationStatusEnumFromJson) + enums.ConsultationStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + static const fromJsonFactory = + _$ConsultationRegistrationUpdateStatusRequestFromJson; + static const toJsonFactory = + _$ConsultationRegistrationUpdateStatusRequestToJson; + Map toJson() => + _$ConsultationRegistrationUpdateStatusRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactEntity { + ContactEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.fullName, + this.phone, + this.message, + this.status, + this.adminNote, + this.contactedDate, + this.contactedBy, + }); + + factory ContactEntity.fromJson(Map json) => + _$ContactEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: contactStatusEnumToJson, + fromJson: contactStatusEnumFromJson) + enums.ContactStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + @JsonKey(name: 'contactedDate', includeIfNull: true) + DateTime? contactedDate; + @JsonKey(name: 'contactedBy', includeIfNull: true) + int? contactedBy; + static const fromJsonFactory = _$ContactEntityFromJson; + static const toJsonFactory = _$ContactEntityToJson; + Map toJson() => _$ContactEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactEntityApiResponse { + ContactEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ContactEntityApiResponse.fromJson(Map json) => + _$ContactEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ContactEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ContactEntityApiResponseFromJson; + static const toJsonFactory = _$ContactEntityApiResponseToJson; + Map toJson() => _$ContactEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactGetListQuery { + ContactGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.status, + this.fromDate, + this.toDate, + }); + + factory ContactGetListQuery.fromJson(Map json) => + _$ContactGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: contactStatusEnumToJson, + fromJson: contactStatusEnumFromJson) + enums.ContactStatusEnum? status; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + static const fromJsonFactory = _$ContactGetListQueryFromJson; + static const toJsonFactory = _$ContactGetListQueryToJson; + Map toJson() => _$ContactGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactListDto { + ContactListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.fullName, + this.phone, + this.message, + this.status, + this.adminNote, + this.contactedDate, + this.contactedBy, + this.contactedByName, + }); + + factory ContactListDto.fromJson(Map json) => + _$ContactListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: contactStatusEnumToJson, + fromJson: contactStatusEnumFromJson) + enums.ContactStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + @JsonKey(name: 'contactedDate', includeIfNull: true) + DateTime? contactedDate; + @JsonKey(name: 'contactedBy', includeIfNull: true) + int? contactedBy; + @JsonKey(name: 'contactedByName', includeIfNull: true) + String? contactedByName; + static const fromJsonFactory = _$ContactListDtoFromJson; + static const toJsonFactory = _$ContactListDtoToJson; + Map toJson() => _$ContactListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactListDtoFilterResult { + ContactListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ContactListDtoFilterResult.fromJson(Map json) => + _$ContactListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ContactListDtoFilterResultFromJson; + static const toJsonFactory = _$ContactListDtoFilterResultToJson; + Map toJson() => _$ContactListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactListDtoFilterResultApiResponse { + ContactListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ContactListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ContactListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ContactListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ContactListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$ContactListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ContactListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactSaveDto { + ContactSaveDto({ + this.fullName, + this.phone, + this.message, + }); + + factory ContactSaveDto.fromJson(Map json) => + _$ContactSaveDtoFromJson(json); + + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + static const fromJsonFactory = _$ContactSaveDtoFromJson; + static const toJsonFactory = _$ContactSaveDtoToJson; + Map toJson() => _$ContactSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ContactUpdateStatusRequest { + ContactUpdateStatusRequest({ + this.status, + this.adminNote, + }); + + factory ContactUpdateStatusRequest.fromJson(Map json) => + _$ContactUpdateStatusRequestFromJson(json); + + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: contactStatusEnumToJson, + fromJson: contactStatusEnumFromJson) + enums.ContactStatusEnum? status; + @JsonKey(name: 'adminNote', includeIfNull: true) + String? adminNote; + static const fromJsonFactory = _$ContactUpdateStatusRequestFromJson; + static const toJsonFactory = _$ContactUpdateStatusRequestToJson; + Map toJson() => _$ContactUpdateStatusRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CreateChatGroupDto { + CreateChatGroupDto({ + this.userIds, + this.name, + this.type, + this.documentId, + }); + + factory CreateChatGroupDto.fromJson(Map json) => + _$CreateChatGroupDtoFromJson(json); + + @JsonKey(name: 'userIds', includeIfNull: true, defaultValue: []) + List? userIds; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'documentId', includeIfNull: true) + int? documentId; + static const fromJsonFactory = _$CreateChatGroupDtoFromJson; + static const toJsonFactory = _$CreateChatGroupDtoToJson; + Map toJson() => _$CreateChatGroupDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CurrentObjectDto { + CurrentObjectDto({ + this.id, + this.type, + this.name, + }); + + factory CurrentObjectDto.fromJson(Map json) => + _$CurrentObjectDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + static const fromJsonFactory = _$CurrentObjectDtoFromJson; + static const toJsonFactory = _$CurrentObjectDtoToJson; + Map toJson() => _$CurrentObjectDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class CurrentObjectDtoApiResponse { + CurrentObjectDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory CurrentObjectDtoApiResponse.fromJson(Map json) => + _$CurrentObjectDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + CurrentObjectDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$CurrentObjectDtoApiResponseFromJson; + static const toJsonFactory = _$CurrentObjectDtoApiResponseToJson; + Map toJson() => _$CurrentObjectDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DNTCaptchaApiResponse { + DNTCaptchaApiResponse({ + this.dntCaptchaImgUrl, + this.dntCaptchaId, + this.dntCaptchaTextValue, + this.dntCaptchaTokenValue, + }); + + factory DNTCaptchaApiResponse.fromJson(Map json) => + _$DNTCaptchaApiResponseFromJson(json); + + @JsonKey(name: 'dntCaptchaImgUrl', includeIfNull: true) + String? dntCaptchaImgUrl; + @JsonKey(name: 'dntCaptchaId', includeIfNull: true) + String? dntCaptchaId; + @JsonKey(name: 'dntCaptchaTextValue', includeIfNull: true) + String? dntCaptchaTextValue; + @JsonKey(name: 'dntCaptchaTokenValue', includeIfNull: true) + String? dntCaptchaTokenValue; + static const fromJsonFactory = _$DNTCaptchaApiResponseFromJson; + static const toJsonFactory = _$DNTCaptchaApiResponseToJson; + Map toJson() => _$DNTCaptchaApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardClassStatisticalDto { + DashBoardClassStatisticalDto({ + this.id, + this.name, + this.totalStudent, + this.totalExamNeedMark, + }); + + factory DashBoardClassStatisticalDto.fromJson(Map json) => + _$DashBoardClassStatisticalDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'totalStudent', includeIfNull: true) + int? totalStudent; + @JsonKey(name: 'totalExamNeedMark', includeIfNull: true) + int? totalExamNeedMark; + static const fromJsonFactory = _$DashBoardClassStatisticalDtoFromJson; + static const toJsonFactory = _$DashBoardClassStatisticalDtoToJson; + Map toJson() => _$DashBoardClassStatisticalDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardClassStatisticalDtoListApiResponse { + DashBoardClassStatisticalDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DashBoardClassStatisticalDtoListApiResponse.fromJson( + Map json) => + _$DashBoardClassStatisticalDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$DashBoardClassStatisticalDtoListApiResponseFromJson; + static const toJsonFactory = + _$DashBoardClassStatisticalDtoListApiResponseToJson; + Map toJson() => + _$DashBoardClassStatisticalDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardExamListDto { + DashBoardExamListDto({ + this.id, + this.title, + this.status, + this.createdDate, + }); + + factory DashBoardExamListDto.fromJson(Map json) => + _$DashBoardExamListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + static const fromJsonFactory = _$DashBoardExamListDtoFromJson; + static const toJsonFactory = _$DashBoardExamListDtoToJson; + Map toJson() => _$DashBoardExamListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardExamListDtoListApiResponse { + DashBoardExamListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DashBoardExamListDtoListApiResponse.fromJson( + Map json) => + _$DashBoardExamListDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DashBoardExamListDtoListApiResponseFromJson; + static const toJsonFactory = _$DashBoardExamListDtoListApiResponseToJson; + Map toJson() => + _$DashBoardExamListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardPupilListDto { + DashBoardPupilListDto({ + this.userId, + this.avatar, + this.fullName, + this.countExam, + this.countExamDone, + this.classId, + this.className, + this.percentDone, + }); + + factory DashBoardPupilListDto.fromJson(Map json) => + _$DashBoardPupilListDtoFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + @JsonKey(name: 'countExamDone', includeIfNull: true) + int? countExamDone; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'className', includeIfNull: true) + String? className; + @JsonKey(name: 'percentDone', includeIfNull: true) + double? percentDone; + static const fromJsonFactory = _$DashBoardPupilListDtoFromJson; + static const toJsonFactory = _$DashBoardPupilListDtoToJson; + Map toJson() => _$DashBoardPupilListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardPupilListDtoListApiResponse { + DashBoardPupilListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DashBoardPupilListDtoListApiResponse.fromJson( + Map json) => + _$DashBoardPupilListDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DashBoardPupilListDtoListApiResponseFromJson; + static const toJsonFactory = _$DashBoardPupilListDtoListApiResponseToJson; + Map toJson() => + _$DashBoardPupilListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardQuestionListDto { + DashBoardQuestionListDto({ + this.id, + this.type, + this.classLevel, + this.subjectId, + this.level, + }); + + factory DashBoardQuestionListDto.fromJson(Map json) => + _$DashBoardQuestionListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'level', + includeIfNull: true, + toJson: questionLevelEnumToJson, + fromJson: questionLevelEnumFromJson) + enums.QuestionLevelEnum? level; + static const fromJsonFactory = _$DashBoardQuestionListDtoFromJson; + static const toJsonFactory = _$DashBoardQuestionListDtoToJson; + Map toJson() => _$DashBoardQuestionListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DashBoardQuestionListDtoListApiResponse { + DashBoardQuestionListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DashBoardQuestionListDtoListApiResponse.fromJson( + Map json) => + _$DashBoardQuestionListDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$DashBoardQuestionListDtoListApiResponseFromJson; + static const toJsonFactory = _$DashBoardQuestionListDtoListApiResponseToJson; + Map toJson() => + _$DashBoardQuestionListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DeparmentGetManagerPositionDto { + DeparmentGetManagerPositionDto({ + this.name, + this.provinceId, + }); + + factory DeparmentGetManagerPositionDto.fromJson(Map json) => + _$DeparmentGetManagerPositionDtoFromJson(json); + + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + static const fromJsonFactory = _$DeparmentGetManagerPositionDtoFromJson; + static const toJsonFactory = _$DeparmentGetManagerPositionDtoToJson; + Map toJson() => _$DeparmentGetManagerPositionDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentCountDto { + DepartmentCountDto({ + this.schoolCount, + this.teacherCount, + this.studentCount, + this.classCount, + }); + + factory DepartmentCountDto.fromJson(Map json) => + _$DepartmentCountDtoFromJson(json); + + @JsonKey(name: 'schoolCount', includeIfNull: true) + int? schoolCount; + @JsonKey(name: 'teacherCount', includeIfNull: true) + int? teacherCount; + @JsonKey(name: 'studentCount', includeIfNull: true) + int? studentCount; + @JsonKey(name: 'classCount', includeIfNull: true) + int? classCount; + static const fromJsonFactory = _$DepartmentCountDtoFromJson; + static const toJsonFactory = _$DepartmentCountDtoToJson; + Map toJson() => _$DepartmentCountDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentCountDtoApiResponse { + DepartmentCountDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DepartmentCountDtoApiResponse.fromJson(Map json) => + _$DepartmentCountDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + DepartmentCountDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DepartmentCountDtoApiResponseFromJson; + static const toJsonFactory = _$DepartmentCountDtoApiResponseToJson; + Map toJson() => _$DepartmentCountDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentCountQuery { + DepartmentCountQuery({ + this.fromDate, + this.toDate, + }); + + factory DepartmentCountQuery.fromJson(Map json) => + _$DepartmentCountQueryFromJson(json); + + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + static const fromJsonFactory = _$DepartmentCountQueryFromJson; + static const toJsonFactory = _$DepartmentCountQueryToJson; + Map toJson() => _$DepartmentCountQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentDto { + DepartmentDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.fullName, + this.otherName, + this.url, + this.unitType, + this.parentId, + this.priority, + this.type, + this.status, + this.officeCount, + this.schoolCount, + this.schoolActiveCount, + }); + + factory DepartmentDto.fromJson(Map json) => + _$DepartmentDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'otherName', includeIfNull: true) + String? otherName; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'unitType', includeIfNull: true) + String? unitType; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'priority', includeIfNull: true) + int? priority; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: localityTypeEnumToJson, + fromJson: localityTypeEnumFromJson) + enums.LocalityTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: localityStatusEnumToJson, + fromJson: localityStatusEnumFromJson) + enums.LocalityStatusEnum? status; + @JsonKey(name: 'officeCount', includeIfNull: true) + int? officeCount; + @JsonKey(name: 'schoolCount', includeIfNull: true) + int? schoolCount; + @JsonKey(name: 'schoolActiveCount', includeIfNull: true) + int? schoolActiveCount; + static const fromJsonFactory = _$DepartmentDtoFromJson; + static const toJsonFactory = _$DepartmentDtoToJson; + Map toJson() => _$DepartmentDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentDtoFilterResult { + DepartmentDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory DepartmentDtoFilterResult.fromJson(Map json) => + _$DepartmentDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$DepartmentDtoFilterResultFromJson; + static const toJsonFactory = _$DepartmentDtoFilterResultToJson; + Map toJson() => _$DepartmentDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentDtoFilterResultApiResponse { + DepartmentDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DepartmentDtoFilterResultApiResponse.fromJson( + Map json) => + _$DepartmentDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + DepartmentDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DepartmentDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$DepartmentDtoFilterResultApiResponseToJson; + Map toJson() => + _$DepartmentDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentGetListQuery { + DepartmentGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + }); + + factory DepartmentGetListQuery.fromJson(Map json) => + _$DepartmentGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + static const fromJsonFactory = _$DepartmentGetListQueryFromJson; + static const toJsonFactory = _$DepartmentGetListQueryToJson; + Map toJson() => _$DepartmentGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentSchoolFilterDto { + DepartmentSchoolFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.fromDate, + this.toDate, + this.keyword, + this.type, + this.provinceId, + this.districtId, + this.status, + }); + + factory DepartmentSchoolFilterDto.fromJson(Map json) => + _$DepartmentSchoolFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'fromDate', includeIfNull: true) + DateTime? fromDate; + @JsonKey(name: 'toDate', includeIfNull: true) + DateTime? toDate; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'districtId', includeIfNull: true) + int? districtId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + static const fromJsonFactory = _$DepartmentSchoolFilterDtoFromJson; + static const toJsonFactory = _$DepartmentSchoolFilterDtoToJson; + Map toJson() => _$DepartmentSchoolFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentSchoolListDto { + DepartmentSchoolListDto({ + this.id, + this.name, + this.type, + this.provinceId, + this.averageAssignmentsPerTeacher, + this.averageAssignmentsPerStudent, + this.provinceName, + this.districtId, + this.districtName, + this.status, + }); + + factory DepartmentSchoolListDto.fromJson(Map json) => + _$DepartmentSchoolListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'averageAssignmentsPerTeacher', includeIfNull: true) + double? averageAssignmentsPerTeacher; + @JsonKey(name: 'averageAssignmentsPerStudent', includeIfNull: true) + double? averageAssignmentsPerStudent; + @JsonKey(name: 'provinceName', includeIfNull: true) + String? provinceName; + @JsonKey(name: 'districtId', includeIfNull: true) + int? districtId; + @JsonKey(name: 'districtName', includeIfNull: true) + String? districtName; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + static const fromJsonFactory = _$DepartmentSchoolListDtoFromJson; + static const toJsonFactory = _$DepartmentSchoolListDtoToJson; + Map toJson() => _$DepartmentSchoolListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentSchoolListDtoFilterResult { + DepartmentSchoolListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory DepartmentSchoolListDtoFilterResult.fromJson( + Map json) => + _$DepartmentSchoolListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = _$DepartmentSchoolListDtoFilterResultFromJson; + static const toJsonFactory = _$DepartmentSchoolListDtoFilterResultToJson; + Map toJson() => + _$DepartmentSchoolListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DepartmentSchoolListDtoFilterResultApiResponse { + DepartmentSchoolListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DepartmentSchoolListDtoFilterResultApiResponse.fromJson( + Map json) => + _$DepartmentSchoolListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + DepartmentSchoolListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$DepartmentSchoolListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$DepartmentSchoolListDtoFilterResultApiResponseToJson; + Map toJson() => + _$DepartmentSchoolListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Disable2FADto { + Disable2FADto({ + this.code, + }); + + factory Disable2FADto.fromJson(Map json) => + _$Disable2FADtoFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + static const fromJsonFactory = _$Disable2FADtoFromJson; + static const toJsonFactory = _$Disable2FADtoToJson; + Map toJson() => _$Disable2FADtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DocumentFileInfo { + DocumentFileInfo({ + this.fileName, + this.displayName, + this.size, + this.lineCount, + this.lastModified, + this.exists, + }); + + factory DocumentFileInfo.fromJson(Map json) => + _$DocumentFileInfoFromJson(json); + + @JsonKey(name: 'fileName', includeIfNull: true) + String? fileName; + @JsonKey(name: 'displayName', includeIfNull: true) + String? displayName; + @JsonKey(name: 'size', includeIfNull: true) + int? size; + @JsonKey(name: 'lineCount', includeIfNull: true) + int? lineCount; + @JsonKey(name: 'lastModified', includeIfNull: true) + DateTime? lastModified; + @JsonKey(name: 'exists', includeIfNull: true) + bool? exists; + static const fromJsonFactory = _$DocumentFileInfoFromJson; + static const toJsonFactory = _$DocumentFileInfoToJson; + Map toJson() => _$DocumentFileInfoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DocumentInfo { + DocumentInfo({ + this.files, + this.totalFiles, + this.existingFiles, + this.totalSize, + this.lastUpdated, + }); + + factory DocumentInfo.fromJson(Map json) => + _$DocumentInfoFromJson(json); + + @JsonKey( + name: 'files', includeIfNull: true, defaultValue: []) + List? files; + @JsonKey(name: 'totalFiles', includeIfNull: true) + int? totalFiles; + @JsonKey(name: 'existingFiles', includeIfNull: true) + int? existingFiles; + @JsonKey(name: 'totalSize', includeIfNull: true) + int? totalSize; + @JsonKey(name: 'lastUpdated', includeIfNull: true) + DateTime? lastUpdated; + static const fromJsonFactory = _$DocumentInfoFromJson; + static const toJsonFactory = _$DocumentInfoToJson; + Map toJson() => _$DocumentInfoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DocumentInfoApiResponse { + DocumentInfoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DocumentInfoApiResponse.fromJson(Map json) => + _$DocumentInfoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + DocumentInfo? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DocumentInfoApiResponseFromJson; + static const toJsonFactory = _$DocumentInfoApiResponseToJson; + Map toJson() => _$DocumentInfoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DocumentPreviewResponse { + DocumentPreviewResponse({ + this.fileName, + this.displayName, + this.previewContent, + this.totalLines, + this.previewLines, + this.hasMore, + this.fileSize, + }); + + factory DocumentPreviewResponse.fromJson(Map json) => + _$DocumentPreviewResponseFromJson(json); + + @JsonKey(name: 'fileName', includeIfNull: true) + String? fileName; + @JsonKey(name: 'displayName', includeIfNull: true) + String? displayName; + @JsonKey(name: 'previewContent', includeIfNull: true) + String? previewContent; + @JsonKey(name: 'totalLines', includeIfNull: true) + int? totalLines; + @JsonKey(name: 'previewLines', includeIfNull: true) + int? previewLines; + @JsonKey(name: 'hasMore', includeIfNull: true) + bool? hasMore; + @JsonKey(name: 'fileSize', includeIfNull: true) + int? fileSize; + static const fromJsonFactory = _$DocumentPreviewResponseFromJson; + static const toJsonFactory = _$DocumentPreviewResponseToJson; + Map toJson() => _$DocumentPreviewResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class DocumentPreviewResponseApiResponse { + DocumentPreviewResponseApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory DocumentPreviewResponseApiResponse.fromJson( + Map json) => + _$DocumentPreviewResponseApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + DocumentPreviewResponse? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$DocumentPreviewResponseApiResponseFromJson; + static const toJsonFactory = _$DocumentPreviewResponseApiResponseToJson; + Map toJson() => + _$DocumentPreviewResponseApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Enable2FADto { + Enable2FADto({ + this.code, + }); + + factory Enable2FADto.fromJson(Map json) => + _$Enable2FADtoFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + static const fromJsonFactory = _$Enable2FADtoFromJson; + static const toJsonFactory = _$Enable2FADtoToJson; + Map toJson() => _$Enable2FADtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Enum { + Enum(); + + factory Enum.fromJson(Map json) => _$EnumFromJson(json); + + static const fromJsonFactory = _$EnumFromJson; + static const toJsonFactory = _$EnumToJson; + Map toJson() => _$EnumToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class EnumItemEntity { + EnumItemEntity({ + this.id, + this.name, + this.code, + }); + + factory EnumItemEntity.fromJson(Map json) => + _$EnumItemEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + static const fromJsonFactory = _$EnumItemEntityFromJson; + static const toJsonFactory = _$EnumItemEntityToJson; + Map toJson() => _$EnumItemEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class EnumListEntity { + EnumListEntity({ + this.value, + this.code, + this.name, + this.isZone, + this.permissions, + }); + + factory EnumListEntity.fromJson(Map json) => + _$EnumListEntityFromJson(json); + + @JsonKey(name: 'value', includeIfNull: true) + int? value; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'isZone', includeIfNull: true) + bool? isZone; + @JsonKey( + name: 'permissions', + includeIfNull: true, + defaultValue: []) + List? permissions; + static const fromJsonFactory = _$EnumListEntityFromJson; + static const toJsonFactory = _$EnumListEntityToJson; + Map toJson() => _$EnumListEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class EnumListEntityListApiResponse { + EnumListEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory EnumListEntityListApiResponse.fromJson(Map json) => + _$EnumListEntityListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$EnumListEntityListApiResponseFromJson; + static const toJsonFactory = _$EnumListEntityListApiResponseToJson; + Map toJson() => _$EnumListEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class EssaySuggestionMarkDto { + EssaySuggestionMarkDto({ + this.categoryId, + this.grade, + this.result, + this.content, + this.mark, + this.images, + }); + + factory EssaySuggestionMarkDto.fromJson(Map json) => + _$EssaySuggestionMarkDtoFromJson(json); + + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'result', includeIfNull: true) + String? result; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'images', includeIfNull: true, defaultValue: []) + List? images; + static const fromJsonFactory = _$EssaySuggestionMarkDtoFromJson; + static const toJsonFactory = _$EssaySuggestionMarkDtoToJson; + Map toJson() => _$EssaySuggestionMarkDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDataBeforeDeleteDto { + ExamDataBeforeDeleteDto({ + this.countPupil, + this.countPupilDone, + }); + + factory ExamDataBeforeDeleteDto.fromJson(Map json) => + _$ExamDataBeforeDeleteDtoFromJson(json); + + @JsonKey(name: 'countPupil', includeIfNull: true) + int? countPupil; + @JsonKey(name: 'countPupilDone', includeIfNull: true) + int? countPupilDone; + static const fromJsonFactory = _$ExamDataBeforeDeleteDtoFromJson; + static const toJsonFactory = _$ExamDataBeforeDeleteDtoToJson; + Map toJson() => _$ExamDataBeforeDeleteDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDataBeforeDeleteDtoApiResponse { + ExamDataBeforeDeleteDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ExamDataBeforeDeleteDtoApiResponse.fromJson( + Map json) => + _$ExamDataBeforeDeleteDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ExamDataBeforeDeleteDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ExamDataBeforeDeleteDtoApiResponseFromJson; + static const toJsonFactory = _$ExamDataBeforeDeleteDtoApiResponseToJson; + Map toJson() => + _$ExamDataBeforeDeleteDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDataDto { + ExamDataDto({ + this.parts, + }); + + factory ExamDataDto.fromJson(Map json) => + _$ExamDataDtoFromJson(json); + + @JsonKey(name: 'parts', includeIfNull: true, defaultValue: []) + List? parts; + static const fromJsonFactory = _$ExamDataDtoFromJson; + static const toJsonFactory = _$ExamDataDtoToJson; + Map toJson() => _$ExamDataDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDataSaveDto { + ExamDataSaveDto({ + this.parts, + }); + + factory ExamDataSaveDto.fromJson(Map json) => + _$ExamDataSaveDtoFromJson(json); + + @JsonKey( + name: 'parts', includeIfNull: true, defaultValue: []) + List? parts; + static const fromJsonFactory = _$ExamDataSaveDtoFromJson; + static const toJsonFactory = _$ExamDataSaveDtoToJson; + Map toJson() => _$ExamDataSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDto { + ExamDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.avatar, + this.duration, + this.type, + this.status, + this.totalMark, + this.totalQuestion, + this.schoolId, + this.classLevel, + this.subjectId, + this.format, + this.fileUrl, + this.data, + this.categoryId, + this.isSystem, + this.isAutoScoring, + this.fileChoiceType, + this.questions, + this.assignExams, + this.tagIds, + this.tags, + this.canEdit, + }); + + factory ExamDto.fromJson(Map json) => + _$ExamDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'data', includeIfNull: true) + ExamDataDto? data; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'isAutoScoring', includeIfNull: true) + bool? isAutoScoring; + @JsonKey( + name: 'fileChoiceType', + includeIfNull: true, + toJson: examFileChoiceTypeEnumToJson, + fromJson: examFileChoiceTypeEnumFromJson) + enums.ExamFileChoiceTypeEnum? fileChoiceType; + @JsonKey( + name: 'questions', + includeIfNull: true, + defaultValue: []) + List? questions; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + @JsonKey(name: 'tags', includeIfNull: true, defaultValue: []) + List? tags; + @JsonKey(name: 'canEdit', includeIfNull: true) + bool? canEdit; + static const fromJsonFactory = _$ExamDtoFromJson; + static const toJsonFactory = _$ExamDtoToJson; + Map toJson() => _$ExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamDtoApiResponse { + ExamDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ExamDtoApiResponse.fromJson(Map json) => + _$ExamDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ExamDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ExamDtoApiResponseFromJson; + static const toJsonFactory = _$ExamDtoApiResponseToJson; + Map toJson() => _$ExamDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamFileSaveDto { + ExamFileSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.avatar, + this.duration, + this.type, + this.status, + this.totalMark, + this.totalQuestion, + this.schoolId, + this.classLevel, + this.subjectId, + this.format, + this.fileUrl, + this.data, + this.categoryId, + this.isSystem, + this.isAutoScoring, + this.fileChoiceType, + this.questions, + this.assignExams, + }); + + factory ExamFileSaveDto.fromJson(Map json) => + _$ExamFileSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'data', includeIfNull: true) + String? data; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'isAutoScoring', includeIfNull: true) + bool? isAutoScoring; + @JsonKey( + name: 'fileChoiceType', + includeIfNull: true, + toJson: examFileChoiceTypeEnumToJson, + fromJson: examFileChoiceTypeEnumFromJson) + enums.ExamFileChoiceTypeEnum? fileChoiceType; + @JsonKey( + name: 'questions', includeIfNull: true, defaultValue: []) + List? questions; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + static const fromJsonFactory = _$ExamFileSaveDtoFromJson; + static const toJsonFactory = _$ExamFileSaveDtoToJson; + Map toJson() => _$ExamFileSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamGetListQuery { + ExamGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.schoolId, + this.userId, + this.classLevel, + this.type, + this.status, + this.format, + this.subjectId, + this.filterType, + this.ids, + }); + + factory ExamGetListQuery.fromJson(Map json) => + _$ExamGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'filterType', includeIfNull: true) + int? filterType; + @JsonKey(name: 'ids', includeIfNull: true, defaultValue: []) + List? ids; + static const fromJsonFactory = _$ExamGetListQueryFromJson; + static const toJsonFactory = _$ExamGetListQueryToJson; + Map toJson() => _$ExamGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamLearnDto { + ExamLearnDto({ + this.id, + this.title, + this.avatar, + this.duration, + this.type, + this.status, + this.totalMark, + this.totalQuestion, + this.schoolId, + this.classLevel, + this.subjectId, + this.format, + this.fileUrl, + this.categoryId, + this.fileChoiceType, + this.data, + }); + + factory ExamLearnDto.fromJson(Map json) => + _$ExamLearnDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'fileChoiceType', + includeIfNull: true, + toJson: examFileChoiceTypeEnumToJson, + fromJson: examFileChoiceTypeEnumFromJson) + enums.ExamFileChoiceTypeEnum? fileChoiceType; + @JsonKey(name: 'data', includeIfNull: true) + ExamDataDto? data; + static const fromJsonFactory = _$ExamLearnDtoFromJson; + static const toJsonFactory = _$ExamLearnDtoToJson; + Map toJson() => _$ExamLearnDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamListDto { + ExamListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.duration, + this.avatar, + this.type, + this.status, + this.totalMark, + this.totalQuestion, + this.schoolId, + this.classLevel, + this.subjectId, + this.format, + this.fileUrl, + this.categoryId, + this.isLike, + this.isSystem, + this.canEdit, + this.isAutoScoring, + this.tags, + this.assignExamCount, + }); + + factory ExamListDto.fromJson(Map json) => + _$ExamListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isLike', includeIfNull: true) + bool? isLike; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'canEdit', includeIfNull: true) + bool? canEdit; + @JsonKey(name: 'isAutoScoring', includeIfNull: true) + bool? isAutoScoring; + @JsonKey(name: 'tags', includeIfNull: true, defaultValue: []) + List? tags; + @JsonKey(name: 'assignExamCount', includeIfNull: true) + int? assignExamCount; + static const fromJsonFactory = _$ExamListDtoFromJson; + static const toJsonFactory = _$ExamListDtoToJson; + Map toJson() => _$ExamListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamListDtoFilterResult { + ExamListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ExamListDtoFilterResult.fromJson(Map json) => + _$ExamListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ExamListDtoFilterResultFromJson; + static const toJsonFactory = _$ExamListDtoFilterResultToJson; + Map toJson() => _$ExamListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamListDtoFilterResultApiResponse { + ExamListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ExamListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ExamListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ExamListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ExamListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$ExamListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ExamListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamPartDto { + ExamPartDto({ + this.id, + this.title, + this.description, + this.partTime, + this.totalMark, + this.numberOfQuestion, + this.questions, + }); + + factory ExamPartDto.fromJson(Map json) => + _$ExamPartDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + String? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'partTime', includeIfNull: true) + int? partTime; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'numberOfQuestion', includeIfNull: true) + int? numberOfQuestion; + @JsonKey( + name: 'questions', includeIfNull: true, defaultValue: []) + List? questions; + static const fromJsonFactory = _$ExamPartDtoFromJson; + static const toJsonFactory = _$ExamPartDtoToJson; + Map toJson() => _$ExamPartDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamPartQuestionSaveDto { + ExamPartQuestionSaveDto({ + this.id, + this.mark, + this.parentId, + }); + + factory ExamPartQuestionSaveDto.fromJson(Map json) => + _$ExamPartQuestionSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$ExamPartQuestionSaveDtoFromJson; + static const toJsonFactory = _$ExamPartQuestionSaveDtoToJson; + Map toJson() => _$ExamPartQuestionSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamPartSaveDto { + ExamPartSaveDto({ + this.id, + this.title, + this.partTime, + this.totalMark, + this.description, + this.numberOfQuestion, + this.questions, + }); + + factory ExamPartSaveDto.fromJson(Map json) => + _$ExamPartSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + String? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'partTime', includeIfNull: true) + int? partTime; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'numberOfQuestion', includeIfNull: true) + int? numberOfQuestion; + @JsonKey( + name: 'questions', + includeIfNull: true, + defaultValue: []) + List? questions; + static const fromJsonFactory = _$ExamPartSaveDtoFromJson; + static const toJsonFactory = _$ExamPartSaveDtoToJson; + Map toJson() => _$ExamPartSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamQuestionEntity { + ExamQuestionEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.examId, + this.questionId, + this.mark, + this.parentId, + }); + + factory ExamQuestionEntity.fromJson(Map json) => + _$ExamQuestionEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'questionId', includeIfNull: true) + int? questionId; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$ExamQuestionEntityFromJson; + static const toJsonFactory = _$ExamQuestionEntityToJson; + Map toJson() => _$ExamQuestionEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamResultDto { + ExamResultDto({ + this.userId, + this.avatar, + this.fullName, + this.totalExam, + this.totalExamDone, + this.countTest, + this.countTestDone, + this.averageScoreTest, + }); + + factory ExamResultDto.fromJson(Map json) => + _$ExamResultDtoFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'totalExam', includeIfNull: true) + int? totalExam; + @JsonKey(name: 'totalExamDone', includeIfNull: true) + int? totalExamDone; + @JsonKey(name: 'countTest', includeIfNull: true) + int? countTest; + @JsonKey(name: 'countTestDone', includeIfNull: true) + int? countTestDone; + @JsonKey(name: 'averageScoreTest', includeIfNull: true) + double? averageScoreTest; + static const fromJsonFactory = _$ExamResultDtoFromJson; + static const toJsonFactory = _$ExamResultDtoToJson; + Map toJson() => _$ExamResultDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamResultDtoFilterResult { + ExamResultDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ExamResultDtoFilterResult.fromJson(Map json) => + _$ExamResultDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ExamResultDtoFilterResultFromJson; + static const toJsonFactory = _$ExamResultDtoFilterResultToJson; + Map toJson() => _$ExamResultDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamResultFilterDto { + ExamResultFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.classId, + }); + + factory ExamResultFilterDto.fromJson(Map json) => + _$ExamResultFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + static const fromJsonFactory = _$ExamResultFilterDtoFromJson; + static const toJsonFactory = _$ExamResultFilterDtoToJson; + Map toJson() => _$ExamResultFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamSaveDto { + ExamSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.avatar, + this.duration, + this.type, + this.status, + this.totalMark, + this.totalQuestion, + this.schoolId, + this.classLevel, + this.subjectId, + this.format, + this.fileUrl, + this.data, + this.categoryId, + this.isSystem, + this.isAutoScoring, + this.fileChoiceType, + this.questions, + this.assignExams, + this.tagIds, + }); + + factory ExamSaveDto.fromJson(Map json) => + _$ExamSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: examTypeEnumToJson, + fromJson: examTypeEnumFromJson) + enums.ExamTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: examStatusEnumToJson, + fromJson: examStatusEnumFromJson) + enums.ExamStatusEnum? status; + @JsonKey(name: 'totalMark', includeIfNull: true) + double? totalMark; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'data', includeIfNull: true) + ExamDataSaveDto? data; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'isAutoScoring', includeIfNull: true) + bool? isAutoScoring; + @JsonKey( + name: 'fileChoiceType', + includeIfNull: true, + toJson: examFileChoiceTypeEnumToJson, + fromJson: examFileChoiceTypeEnumFromJson) + enums.ExamFileChoiceTypeEnum? fileChoiceType; + @JsonKey( + name: 'questions', + includeIfNull: true, + defaultValue: []) + List? questions; + @JsonKey( + name: 'assignExams', + includeIfNull: true, + defaultValue: []) + List? assignExams; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + static const fromJsonFactory = _$ExamSaveDtoFromJson; + static const toJsonFactory = _$ExamSaveDtoToJson; + Map toJson() => _$ExamSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ExamSaveDtoApiResponse { + ExamSaveDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ExamSaveDtoApiResponse.fromJson(Map json) => + _$ExamSaveDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ExamSaveDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ExamSaveDtoApiResponseFromJson; + static const toJsonFactory = _$ExamSaveDtoApiResponseToJson; + Map toJson() => _$ExamSaveDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FacebookLoginDto { + FacebookLoginDto({ + this.code, + this.accessToken, + }); + + factory FacebookLoginDto.fromJson(Map json) => + _$FacebookLoginDtoFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'accessToken', includeIfNull: true) + String? accessToken; + static const fromJsonFactory = _$FacebookLoginDtoFromJson; + static const toJsonFactory = _$FacebookLoginDtoToJson; + Map toJson() => _$FacebookLoginDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileEntity { + FileEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.path, + this.contentType, + this.width, + this.height, + this.size, + this.extension, + this.folderId, + this.status, + this.avatar, + this.thumbnails, + this.streamUrl, + this.duration, + this.fileType, + this.objectType, + this.parentId, + this.metaDatas, + }); + + factory FileEntity.fromJson(Map json) => + _$FileEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'path', includeIfNull: true) + String? path; + @JsonKey(name: 'contentType', includeIfNull: true) + String? contentType; + @JsonKey(name: 'width', includeIfNull: true) + int? width; + @JsonKey(name: 'height', includeIfNull: true) + int? height; + @JsonKey(name: 'size', includeIfNull: true) + int? size; + @JsonKey(name: 'extension', includeIfNull: true) + String? extension; + @JsonKey(name: 'folderId', includeIfNull: true) + int? folderId; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'thumbnails', includeIfNull: true) + String? thumbnails; + @JsonKey(name: 'streamUrl', includeIfNull: true) + String? streamUrl; + @JsonKey(name: 'duration', includeIfNull: true) + double? duration; + @JsonKey(name: 'fileType', includeIfNull: true) + String? fileType; + @JsonKey(name: 'objectType', includeIfNull: true) + int? objectType; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey( + name: 'metaDatas', + includeIfNull: true, + defaultValue: []) + List? metaDatas; + static const fromJsonFactory = _$FileEntityFromJson; + static const toJsonFactory = _$FileEntityToJson; + Map toJson() => _$FileEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileEntityFilterResult { + FileEntityFilterResult({ + this.totalRows, + this.data, + }); + + factory FileEntityFilterResult.fromJson(Map json) => + _$FileEntityFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$FileEntityFilterResultFromJson; + static const toJsonFactory = _$FileEntityFilterResultToJson; + Map toJson() => _$FileEntityFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileEntityFilterResultApiResponse { + FileEntityFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory FileEntityFilterResultApiResponse.fromJson( + Map json) => + _$FileEntityFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + FileEntityFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$FileEntityFilterResultApiResponseFromJson; + static const toJsonFactory = _$FileEntityFilterResultApiResponseToJson; + Map toJson() => + _$FileEntityFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileGetListQuery { + FileGetListQuery({ + this.userId, + this.keyword, + this.folderId, + this.extensions, + this.isGetAll, + this.status, + this.sortBy, + this.sortDirection, + this.pageIndex, + this.pageSize, + }); + + factory FileGetListQuery.fromJson(Map json) => + _$FileGetListQueryFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'folderId', includeIfNull: true) + int? folderId; + @JsonKey(name: 'extensions', includeIfNull: true) + String? extensions; + @JsonKey(name: 'isGetAll', includeIfNull: true) + bool? isGetAll; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'sortBy', includeIfNull: true) + String? sortBy; + @JsonKey(name: 'sortDirection', includeIfNull: true) + String? sortDirection; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + static const fromJsonFactory = _$FileGetListQueryFromJson; + static const toJsonFactory = _$FileGetListQueryToJson; + Map toJson() => _$FileGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileMetaDataEntity { + FileMetaDataEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.fileId, + this.metaDirectory, + this.metaKey, + this.metaValue, + }); + + factory FileMetaDataEntity.fromJson(Map json) => + _$FileMetaDataEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'fileId', includeIfNull: true) + int? fileId; + @JsonKey(name: 'metaDirectory', includeIfNull: true) + String? metaDirectory; + @JsonKey(name: 'metaKey', includeIfNull: true) + String? metaKey; + @JsonKey(name: 'metaValue', includeIfNull: true) + String? metaValue; + static const fromJsonFactory = _$FileMetaDataEntityFromJson; + static const toJsonFactory = _$FileMetaDataEntityToJson; + Map toJson() => _$FileMetaDataEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileMetaDataEntityListApiResponse { + FileMetaDataEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory FileMetaDataEntityListApiResponse.fromJson( + Map json) => + _$FileMetaDataEntityListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$FileMetaDataEntityListApiResponseFromJson; + static const toJsonFactory = _$FileMetaDataEntityListApiResponseToJson; + Map toJson() => + _$FileMetaDataEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUpdateAvatarCommand { + FileUpdateAvatarCommand({ + this.id, + this.avatar, + }); + + factory FileUpdateAvatarCommand.fromJson(Map json) => + _$FileUpdateAvatarCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + static const fromJsonFactory = _$FileUpdateAvatarCommandFromJson; + static const toJsonFactory = _$FileUpdateAvatarCommandToJson; + Map toJson() => _$FileUpdateAvatarCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUpdateCommand { + FileUpdateCommand({ + this.file, + }); + + factory FileUpdateCommand.fromJson(Map json) => + _$FileUpdateCommandFromJson(json); + + @JsonKey(name: 'file', includeIfNull: true) + FileEntity? file; + static const fromJsonFactory = _$FileUpdateCommandFromJson; + static const toJsonFactory = _$FileUpdateCommandToJson; + Map toJson() => _$FileUpdateCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUpdateNameCommand { + FileUpdateNameCommand({ + this.id, + this.name, + }); + + factory FileUpdateNameCommand.fromJson(Map json) => + _$FileUpdateNameCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + static const fromJsonFactory = _$FileUpdateNameCommandFromJson; + static const toJsonFactory = _$FileUpdateNameCommandToJson; + Map toJson() => _$FileUpdateNameCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUpdateStatusCommand { + FileUpdateStatusCommand({ + this.id, + this.status, + }); + + factory FileUpdateStatusCommand.fromJson(Map json) => + _$FileUpdateStatusCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: fileStatusEnumToJson, + fromJson: fileStatusEnumFromJson) + enums.FileStatusEnum? status; + static const fromJsonFactory = _$FileUpdateStatusCommandFromJson; + static const toJsonFactory = _$FileUpdateStatusCommandToJson; + Map toJson() => _$FileUpdateStatusCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUploadByUrlResponseDto { + FileUploadByUrlResponseDto({ + this.path, + }); + + factory FileUploadByUrlResponseDto.fromJson(Map json) => + _$FileUploadByUrlResponseDtoFromJson(json); + + @JsonKey(name: 'path', includeIfNull: true) + String? path; + static const fromJsonFactory = _$FileUploadByUrlResponseDtoFromJson; + static const toJsonFactory = _$FileUploadByUrlResponseDtoToJson; + Map toJson() => _$FileUploadByUrlResponseDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FileUploadByUrlResponseDtoApiResponse { + FileUploadByUrlResponseDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory FileUploadByUrlResponseDtoApiResponse.fromJson( + Map json) => + _$FileUploadByUrlResponseDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + FileUploadByUrlResponseDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$FileUploadByUrlResponseDtoApiResponseFromJson; + static const toJsonFactory = _$FileUploadByUrlResponseDtoApiResponseToJson; + Map toJson() => + _$FileUploadByUrlResponseDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderDeleteCommand { + FolderDeleteCommand({ + this.id, + this.moveFileToFolderId, + }); + + factory FolderDeleteCommand.fromJson(Map json) => + _$FolderDeleteCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'moveFileToFolderId', includeIfNull: true) + int? moveFileToFolderId; + static const fromJsonFactory = _$FolderDeleteCommandFromJson; + static const toJsonFactory = _$FolderDeleteCommandToJson; + Map toJson() => _$FolderDeleteCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderEntity { + FolderEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.parentId, + }); + + factory FolderEntity.fromJson(Map json) => + _$FolderEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$FolderEntityFromJson; + static const toJsonFactory = _$FolderEntityToJson; + Map toJson() => _$FolderEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderEntityApiResponse { + FolderEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory FolderEntityApiResponse.fromJson(Map json) => + _$FolderEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + FolderEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$FolderEntityApiResponseFromJson; + static const toJsonFactory = _$FolderEntityApiResponseToJson; + Map toJson() => _$FolderEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderGetAllQuery { + FolderGetAllQuery(); + + factory FolderGetAllQuery.fromJson(Map json) => + _$FolderGetAllQueryFromJson(json); + + static const fromJsonFactory = _$FolderGetAllQueryFromJson; + static const toJsonFactory = _$FolderGetAllQueryToJson; + Map toJson() => _$FolderGetAllQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderGetListQuery { + FolderGetListQuery({ + this.keyword, + this.isGetAll, + }); + + factory FolderGetListQuery.fromJson(Map json) => + _$FolderGetListQueryFromJson(json); + + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'isGetAll', includeIfNull: true) + bool? isGetAll; + static const fromJsonFactory = _$FolderGetListQueryFromJson; + static const toJsonFactory = _$FolderGetListQueryToJson; + Map toJson() => _$FolderGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderNodeDataDto { + FolderNodeDataDto({ + this.id, + this.parentId, + this.fileCount, + this.createdBy, + }); + + factory FolderNodeDataDto.fromJson(Map json) => + _$FolderNodeDataDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'fileCount', includeIfNull: true) + int? fileCount; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + static const fromJsonFactory = _$FolderNodeDataDtoFromJson; + static const toJsonFactory = _$FolderNodeDataDtoToJson; + Map toJson() => _$FolderNodeDataDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderNodeDto { + FolderNodeDto({ + this.id, + this.text, + this.data, + this.children, + this.state, + }); + + factory FolderNodeDto.fromJson(Map json) => + _$FolderNodeDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + String? id; + @JsonKey(name: 'text', includeIfNull: true) + String? text; + @JsonKey(name: 'data', includeIfNull: true) + FolderNodeDataDto? data; + @JsonKey( + name: 'children', includeIfNull: true, defaultValue: []) + List? children; + @JsonKey(name: 'state', includeIfNull: true) + FolderNodeStateDto? state; + static const fromJsonFactory = _$FolderNodeDtoFromJson; + static const toJsonFactory = _$FolderNodeDtoToJson; + Map toJson() => _$FolderNodeDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderNodeDtoListApiResponse { + FolderNodeDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory FolderNodeDtoListApiResponse.fromJson(Map json) => + _$FolderNodeDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$FolderNodeDtoListApiResponseFromJson; + static const toJsonFactory = _$FolderNodeDtoListApiResponseToJson; + Map toJson() => _$FolderNodeDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderNodeStateDto { + FolderNodeStateDto({ + this.selected, + this.opened, + this.disabled, + }); + + factory FolderNodeStateDto.fromJson(Map json) => + _$FolderNodeStateDtoFromJson(json); + + @JsonKey(name: 'selected', includeIfNull: true) + bool? selected; + @JsonKey(name: 'opened', includeIfNull: true) + bool? opened; + @JsonKey(name: 'disabled', includeIfNull: true) + bool? disabled; + static const fromJsonFactory = _$FolderNodeStateDtoFromJson; + static const toJsonFactory = _$FolderNodeStateDtoToJson; + Map toJson() => _$FolderNodeStateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderUpdateCommand { + FolderUpdateCommand({ + this.folder, + }); + + factory FolderUpdateCommand.fromJson(Map json) => + _$FolderUpdateCommandFromJson(json); + + @JsonKey(name: 'folder', includeIfNull: true) + FolderUpdateDto? folder; + static const fromJsonFactory = _$FolderUpdateCommandFromJson; + static const toJsonFactory = _$FolderUpdateCommandToJson; + Map toJson() => _$FolderUpdateCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class FolderUpdateDto { + FolderUpdateDto({ + this.id, + this.name, + this.parentId, + }); + + factory FolderUpdateDto.fromJson(Map json) => + _$FolderUpdateDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$FolderUpdateDtoFromJson; + static const toJsonFactory = _$FolderUpdateDtoToJson; + Map toJson() => _$FolderUpdateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ForgotPasswordCheckOTPResource { + ForgotPasswordCheckOTPResource({ + this.username, + this.otp, + }); + + factory ForgotPasswordCheckOTPResource.fromJson(Map json) => + _$ForgotPasswordCheckOTPResourceFromJson(json); + + @JsonKey(name: 'username', includeIfNull: true) + String? username; + @JsonKey(name: 'otp', includeIfNull: true) + String? otp; + static const fromJsonFactory = _$ForgotPasswordCheckOTPResourceFromJson; + static const toJsonFactory = _$ForgotPasswordCheckOTPResourceToJson; + Map toJson() => _$ForgotPasswordCheckOTPResourceToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryEntity { + GalleryEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.media, + this.categoryId, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + }); + + factory GalleryEntity.fromJson(Map json) => + _$GalleryEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'media', includeIfNull: true) + String? media; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + static const fromJsonFactory = _$GalleryEntityFromJson; + static const toJsonFactory = _$GalleryEntityToJson; + Map toJson() => _$GalleryEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryEntityApiResponse { + GalleryEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory GalleryEntityApiResponse.fromJson(Map json) => + _$GalleryEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + GalleryEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$GalleryEntityApiResponseFromJson; + static const toJsonFactory = _$GalleryEntityApiResponseToJson; + Map toJson() => _$GalleryEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryGetListQuery { + GalleryGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.categoryId, + this.categoryUrl, + this.status, + }); + + factory GalleryGetListQuery.fromJson(Map json) => + _$GalleryGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'categoryUrl', includeIfNull: true) + String? categoryUrl; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + static const fromJsonFactory = _$GalleryGetListQueryFromJson; + static const toJsonFactory = _$GalleryGetListQueryToJson; + Map toJson() => _$GalleryGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryListDto { + GalleryListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.media, + this.categoryId, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.tagIds, + }); + + factory GalleryListDto.fromJson(Map json) => + _$GalleryListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'media', includeIfNull: true) + String? media; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + static const fromJsonFactory = _$GalleryListDtoFromJson; + static const toJsonFactory = _$GalleryListDtoToJson; + Map toJson() => _$GalleryListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryListDtoFilterResult { + GalleryListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory GalleryListDtoFilterResult.fromJson(Map json) => + _$GalleryListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$GalleryListDtoFilterResultFromJson; + static const toJsonFactory = _$GalleryListDtoFilterResultToJson; + Map toJson() => _$GalleryListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GalleryListDtoFilterResultApiResponse { + GalleryListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory GalleryListDtoFilterResultApiResponse.fromJson( + Map json) => + _$GalleryListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + GalleryListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$GalleryListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$GalleryListDtoFilterResultApiResponseToJson; + Map toJson() => + _$GalleryListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GallerySaveDto { + GallerySaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.description, + this.media, + this.categoryId, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.tagIds, + }); + + factory GallerySaveDto.fromJson(Map json) => + _$GallerySaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'media', includeIfNull: true) + String? media; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + static const fromJsonFactory = _$GallerySaveDtoFromJson; + static const toJsonFactory = _$GallerySaveDtoToJson; + Map toJson() => _$GallerySaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GallerySaveDtoApiResponse { + GallerySaveDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory GallerySaveDtoApiResponse.fromJson(Map json) => + _$GallerySaveDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + GallerySaveDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$GallerySaveDtoApiResponseFromJson; + static const toJsonFactory = _$GallerySaveDtoApiResponseToJson; + Map toJson() => _$GallerySaveDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GetListLogQuery { + GetListLogQuery({ + this.keyword, + this.objectType, + this.pageIndex, + this.pageSize, + }); + + factory GetListLogQuery.fromJson(Map json) => + _$GetListLogQueryFromJson(json); + + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'objectType', includeIfNull: true) + String? objectType; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + static const fromJsonFactory = _$GetListLogQueryFromJson; + static const toJsonFactory = _$GetListLogQueryToJson; + Map toJson() => _$GetListLogQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GetListUserForCreateChatGroupQuery { + GetListUserForCreateChatGroupQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.status, + this.chatGroupType, + this.keyword, + this.roleIds, + this.type, + this.objectId, + }); + + factory GetListUserForCreateChatGroupQuery.fromJson( + Map json) => + _$GetListUserForCreateChatGroupQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'chatGroupType', includeIfNull: true) + int? chatGroupType; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'roleIds', includeIfNull: true, defaultValue: []) + List? roleIds; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + static const fromJsonFactory = _$GetListUserForCreateChatGroupQueryFromJson; + static const toJsonFactory = _$GetListUserForCreateChatGroupQueryToJson; + Map toJson() => + _$GetListUserForCreateChatGroupQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class GoogleLoginDto { + GoogleLoginDto({ + this.code, + this.accessToken, + }); + + factory GoogleLoginDto.fromJson(Map json) => + _$GoogleLoginDtoFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'accessToken', includeIfNull: true) + String? accessToken; + static const fromJsonFactory = _$GoogleLoginDtoFromJson; + static const toJsonFactory = _$GoogleLoginDtoToJson; + Map toJson() => _$GoogleLoginDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Int64ApiResponse { + Int64ApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory Int64ApiResponse.fromJson(Map json) => + _$Int64ApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + int? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$Int64ApiResponseFromJson; + static const toJsonFactory = _$Int64ApiResponseToJson; + Map toJson() => _$Int64ApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListActivityLogDto { + ListActivityLogDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.data, + this.objectType, + this.ip, + this.createdName, + this.createdAvatar, + }); + + factory ListActivityLogDto.fromJson(Map json) => + _$ListActivityLogDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'data', includeIfNull: true) + String? data; + @JsonKey(name: 'objectType', includeIfNull: true) + String? objectType; + @JsonKey(name: 'ip', includeIfNull: true) + String? ip; + @JsonKey(name: 'createdName', includeIfNull: true) + String? createdName; + @JsonKey(name: 'createdAvatar', includeIfNull: true) + String? createdAvatar; + static const fromJsonFactory = _$ListActivityLogDtoFromJson; + static const toJsonFactory = _$ListActivityLogDtoToJson; + Map toJson() => _$ListActivityLogDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListActivityLogDtoFilterResult { + ListActivityLogDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ListActivityLogDtoFilterResult.fromJson(Map json) => + _$ListActivityLogDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ListActivityLogDtoFilterResultFromJson; + static const toJsonFactory = _$ListActivityLogDtoFilterResultToJson; + Map toJson() => _$ListActivityLogDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListActivityLogDtoFilterResultApiResponse { + ListActivityLogDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ListActivityLogDtoFilterResultApiResponse.fromJson( + Map json) => + _$ListActivityLogDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ListActivityLogDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ListActivityLogDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$ListActivityLogDtoFilterResultApiResponseToJson; + Map toJson() => + _$ListActivityLogDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatGroupDto { + ListChatGroupDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.avatar, + this.status, + this.type, + this.documentId, + this.lastMessage, + this.lastMessageDate, + this.isOnline, + this.lastMessageType, + this.friendId, + this.lastMessageId, + this.lastMessageIsRead, + }); + + factory ListChatGroupDto.fromJson(Map json) => + _$ListChatGroupDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'documentId', includeIfNull: true) + int? documentId; + @JsonKey(name: 'lastMessage', includeIfNull: true) + String? lastMessage; + @JsonKey(name: 'lastMessageDate', includeIfNull: true) + DateTime? lastMessageDate; + @JsonKey(name: 'isOnline', includeIfNull: true) + bool? isOnline; + @JsonKey(name: 'lastMessageType', includeIfNull: true) + int? lastMessageType; + @JsonKey(name: 'friendId', includeIfNull: true) + int? friendId; + @JsonKey(name: 'lastMessageId', includeIfNull: true) + int? lastMessageId; + @JsonKey(name: 'lastMessageIsRead', includeIfNull: true) + bool? lastMessageIsRead; + static const fromJsonFactory = _$ListChatGroupDtoFromJson; + static const toJsonFactory = _$ListChatGroupDtoToJson; + Map toJson() => _$ListChatGroupDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatGroupDtoFilterResult { + ListChatGroupDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ListChatGroupDtoFilterResult.fromJson(Map json) => + _$ListChatGroupDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ListChatGroupDtoFilterResultFromJson; + static const toJsonFactory = _$ListChatGroupDtoFilterResultToJson; + Map toJson() => _$ListChatGroupDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatGroupDtoFilterResultApiResponse { + ListChatGroupDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ListChatGroupDtoFilterResultApiResponse.fromJson( + Map json) => + _$ListChatGroupDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ListChatGroupDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ListChatGroupDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$ListChatGroupDtoFilterResultApiResponseToJson; + Map toJson() => + _$ListChatGroupDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatMessageByGroupDto { + ListChatMessageByGroupDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.senderId, + this.chatGroupId, + this.content, + this.type, + this.senderName, + this.senderAvatar, + this.chatGroupName, + this.chatGroupAvatar, + this.listFilePath, + this.isOnline, + this.chatGroupType, + this.isRead, + }); + + factory ListChatMessageByGroupDto.fromJson(Map json) => + _$ListChatMessageByGroupDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'senderId', includeIfNull: true) + int? senderId; + @JsonKey(name: 'chatGroupId', includeIfNull: true) + int? chatGroupId; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey(name: 'senderName', includeIfNull: true) + String? senderName; + @JsonKey(name: 'senderAvatar', includeIfNull: true) + String? senderAvatar; + @JsonKey(name: 'chatGroupName', includeIfNull: true) + String? chatGroupName; + @JsonKey(name: 'chatGroupAvatar', includeIfNull: true) + String? chatGroupAvatar; + @JsonKey(name: 'listFilePath', includeIfNull: true, defaultValue: []) + List? listFilePath; + @JsonKey(name: 'isOnline', includeIfNull: true) + bool? isOnline; + @JsonKey(name: 'chatGroupType', includeIfNull: true) + int? chatGroupType; + @JsonKey(name: 'isRead', includeIfNull: true) + bool? isRead; + static const fromJsonFactory = _$ListChatMessageByGroupDtoFromJson; + static const toJsonFactory = _$ListChatMessageByGroupDtoToJson; + Map toJson() => _$ListChatMessageByGroupDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatMessageByGroupDtoFilterResult { + ListChatMessageByGroupDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ListChatMessageByGroupDtoFilterResult.fromJson( + Map json) => + _$ListChatMessageByGroupDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = + _$ListChatMessageByGroupDtoFilterResultFromJson; + static const toJsonFactory = _$ListChatMessageByGroupDtoFilterResultToJson; + Map toJson() => + _$ListChatMessageByGroupDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ListChatMessageByGroupDtoFilterResultApiResponse { + ListChatMessageByGroupDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ListChatMessageByGroupDtoFilterResultApiResponse.fromJson( + Map json) => + _$ListChatMessageByGroupDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ListChatMessageByGroupDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ListChatMessageByGroupDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$ListChatMessageByGroupDtoFilterResultApiResponseToJson; + Map toJson() => + _$ListChatMessageByGroupDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LocalityEntity { + LocalityEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.fullName, + this.otherName, + this.url, + this.unitType, + this.parentId, + this.priority, + this.type, + this.status, + }); + + factory LocalityEntity.fromJson(Map json) => + _$LocalityEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'otherName', includeIfNull: true) + String? otherName; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'unitType', includeIfNull: true) + String? unitType; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'priority', includeIfNull: true) + int? priority; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: localityTypeEnumToJson, + fromJson: localityTypeEnumFromJson) + enums.LocalityTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: localityStatusEnumToJson, + fromJson: localityStatusEnumFromJson) + enums.LocalityStatusEnum? status; + static const fromJsonFactory = _$LocalityEntityFromJson; + static const toJsonFactory = _$LocalityEntityToJson; + Map toJson() => _$LocalityEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LocalityEntityFilterResult { + LocalityEntityFilterResult({ + this.totalRows, + this.data, + }); + + factory LocalityEntityFilterResult.fromJson(Map json) => + _$LocalityEntityFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$LocalityEntityFilterResultFromJson; + static const toJsonFactory = _$LocalityEntityFilterResultToJson; + Map toJson() => _$LocalityEntityFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LocalityEntityFilterResultApiResponse { + LocalityEntityFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory LocalityEntityFilterResultApiResponse.fromJson( + Map json) => + _$LocalityEntityFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + LocalityEntityFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$LocalityEntityFilterResultApiResponseFromJson; + static const toJsonFactory = _$LocalityEntityFilterResultApiResponseToJson; + Map toJson() => + _$LocalityEntityFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LocalityEntityListApiResponse { + LocalityEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory LocalityEntityListApiResponse.fromJson(Map json) => + _$LocalityEntityListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$LocalityEntityListApiResponseFromJson; + static const toJsonFactory = _$LocalityEntityListApiResponseToJson; + Map toJson() => _$LocalityEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LocalityGetListQuery { + LocalityGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.type, + this.parentId, + }); + + factory LocalityGetListQuery.fromJson(Map json) => + _$LocalityGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: localityTypeEnumToJson, + fromJson: localityTypeEnumFromJson) + enums.LocalityTypeEnum? type; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$LocalityGetListQueryFromJson; + static const toJsonFactory = _$LocalityGetListQueryToJson; + Map toJson() => _$LocalityGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LoginResponseDto { + LoginResponseDto({ + this.require2Fa, + this.token, + this.refreshToken, + this.userInfo, + }); + + factory LoginResponseDto.fromJson(Map json) => + _$LoginResponseDtoFromJson(json); + + @JsonKey(name: 'require2Fa', includeIfNull: true) + bool? require2Fa; + @JsonKey(name: 'token', includeIfNull: true) + String? token; + @JsonKey(name: 'refreshToken', includeIfNull: true) + String? refreshToken; + @JsonKey(name: 'userInfo', includeIfNull: true) + UserInfoDto? userInfo; + static const fromJsonFactory = _$LoginResponseDtoFromJson; + static const toJsonFactory = _$LoginResponseDtoToJson; + Map toJson() => _$LoginResponseDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LoginResponseDtoApiResponse { + LoginResponseDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory LoginResponseDtoApiResponse.fromJson(Map json) => + _$LoginResponseDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + LoginResponseDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$LoginResponseDtoApiResponseFromJson; + static const toJsonFactory = _$LoginResponseDtoApiResponseToJson; + Map toJson() => _$LoginResponseDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class LoginWith2FADto { + LoginWith2FADto({ + this.userName, + this.code, + }); + + factory LoginWith2FADto.fromJson(Map json) => + _$LoginWith2FADtoFromJson(json); + + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + static const fromJsonFactory = _$LoginWith2FADtoFromJson; + static const toJsonFactory = _$LoginWith2FADtoToJson; + Map toJson() => _$LoginWith2FADtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsDetailDto { + NewsDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.summary, + this.content, + this.image, + this.author, + this.publishedDate, + this.viewCount, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.categoryId, + this.isFeatured, + this.relatedNewsIds, + this.tagIds, + this.tags, + this.relatedNews, + this.category, + }); + + factory NewsDetailDto.fromJson(Map json) => + _$NewsDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'author', includeIfNull: true) + String? author; + @JsonKey(name: 'publishedDate', includeIfNull: true) + DateTime? publishedDate; + @JsonKey(name: 'viewCount', includeIfNull: true) + int? viewCount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isFeatured', includeIfNull: true) + bool? isFeatured; + @JsonKey(name: 'relatedNewsIds', includeIfNull: true, defaultValue: []) + List? relatedNewsIds; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + @JsonKey(name: 'tags', includeIfNull: true, defaultValue: []) + List? tags; + @JsonKey( + name: 'relatedNews', includeIfNull: true, defaultValue: []) + List? relatedNews; + @JsonKey(name: 'category', includeIfNull: true) + dynamic category; + static const fromJsonFactory = _$NewsDetailDtoFromJson; + static const toJsonFactory = _$NewsDetailDtoToJson; + Map toJson() => _$NewsDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsDetailDtoApiResponse { + NewsDetailDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory NewsDetailDtoApiResponse.fromJson(Map json) => + _$NewsDetailDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + NewsDetailDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$NewsDetailDtoApiResponseFromJson; + static const toJsonFactory = _$NewsDetailDtoApiResponseToJson; + Map toJson() => _$NewsDetailDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsEntity { + NewsEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.summary, + this.content, + this.image, + this.author, + this.publishedDate, + this.viewCount, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.categoryId, + this.isFeatured, + this.relatedNewsIds, + }); + + factory NewsEntity.fromJson(Map json) => + _$NewsEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'author', includeIfNull: true) + String? author; + @JsonKey(name: 'publishedDate', includeIfNull: true) + DateTime? publishedDate; + @JsonKey(name: 'viewCount', includeIfNull: true) + int? viewCount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isFeatured', includeIfNull: true) + bool? isFeatured; + @JsonKey(name: 'relatedNewsIds', includeIfNull: true) + String? relatedNewsIds; + static const fromJsonFactory = _$NewsEntityFromJson; + static const toJsonFactory = _$NewsEntityToJson; + Map toJson() => _$NewsEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsEntityApiResponse { + NewsEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory NewsEntityApiResponse.fromJson(Map json) => + _$NewsEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + NewsEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$NewsEntityApiResponseFromJson; + static const toJsonFactory = _$NewsEntityApiResponseToJson; + Map toJson() => _$NewsEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsGetListQuery { + NewsGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.categoryId, + this.categoryUrl, + this.tagId, + this.status, + this.isFeatured, + this.excludeIds, + this.includeIds, + }); + + factory NewsGetListQuery.fromJson(Map json) => + _$NewsGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'categoryUrl', includeIfNull: true) + String? categoryUrl; + @JsonKey(name: 'tagId', includeIfNull: true) + int? tagId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'isFeatured', includeIfNull: true) + bool? isFeatured; + @JsonKey(name: 'excludeIds', includeIfNull: true, defaultValue: []) + List? excludeIds; + @JsonKey(name: 'includeIds', includeIfNull: true, defaultValue: []) + List? includeIds; + static const fromJsonFactory = _$NewsGetListQueryFromJson; + static const toJsonFactory = _$NewsGetListQueryToJson; + Map toJson() => _$NewsGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsListDto { + NewsListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.summary, + this.content, + this.image, + this.author, + this.publishedDate, + this.viewCount, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.categoryId, + this.isFeatured, + this.relatedNewsIds, + this.tagIds, + }); + + factory NewsListDto.fromJson(Map json) => + _$NewsListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'author', includeIfNull: true) + String? author; + @JsonKey(name: 'publishedDate', includeIfNull: true) + DateTime? publishedDate; + @JsonKey(name: 'viewCount', includeIfNull: true) + int? viewCount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isFeatured', includeIfNull: true) + bool? isFeatured; + @JsonKey(name: 'relatedNewsIds', includeIfNull: true, defaultValue: []) + List? relatedNewsIds; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + static const fromJsonFactory = _$NewsListDtoFromJson; + static const toJsonFactory = _$NewsListDtoToJson; + Map toJson() => _$NewsListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsListDtoFilterResult { + NewsListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory NewsListDtoFilterResult.fromJson(Map json) => + _$NewsListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$NewsListDtoFilterResultFromJson; + static const toJsonFactory = _$NewsListDtoFilterResultToJson; + Map toJson() => _$NewsListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsListDtoFilterResultApiResponse { + NewsListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory NewsListDtoFilterResultApiResponse.fromJson( + Map json) => + _$NewsListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + NewsListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$NewsListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$NewsListDtoFilterResultApiResponseToJson; + Map toJson() => + _$NewsListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NewsSaveDto { + NewsSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.title, + this.summary, + this.content, + this.image, + this.author, + this.publishedDate, + this.viewCount, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.categoryId, + this.isFeatured, + this.relatedNewsIds, + this.tagIds, + }); + + factory NewsSaveDto.fromJson(Map json) => + _$NewsSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'author', includeIfNull: true) + String? author; + @JsonKey(name: 'publishedDate', includeIfNull: true) + DateTime? publishedDate; + @JsonKey(name: 'viewCount', includeIfNull: true) + int? viewCount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey(name: 'isFeatured', includeIfNull: true) + bool? isFeatured; + @JsonKey(name: 'relatedNewsIds', includeIfNull: true, defaultValue: []) + List? relatedNewsIds; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + static const fromJsonFactory = _$NewsSaveDtoFromJson; + static const toJsonFactory = _$NewsSaveDtoToJson; + Map toJson() => _$NewsSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NotificationDto { + NotificationDto({ + this.id, + this.title, + this.content, + this.type, + this.createdDate, + this.isRead, + this.url, + }); + + factory NotificationDto.fromJson(Map json) => + _$NotificationDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'isRead', includeIfNull: true) + bool? isRead; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + static const fromJsonFactory = _$NotificationDtoFromJson; + static const toJsonFactory = _$NotificationDtoToJson; + Map toJson() => _$NotificationDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class NotificationDtoFilterResult { + NotificationDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory NotificationDtoFilterResult.fromJson(Map json) => + _$NotificationDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$NotificationDtoFilterResultFromJson; + static const toJsonFactory = _$NotificationDtoFilterResultToJson; + Map toJson() => _$NotificationDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ObjectApiResponse { + ObjectApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ObjectApiResponse.fromJson(Map json) => + _$ObjectApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + dynamic data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ObjectApiResponseFromJson; + static const toJsonFactory = _$ObjectApiResponseToJson; + Map toJson() => _$ObjectApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ObjectLikeSaveCommand { + ObjectLikeSaveCommand({ + this.objectId, + this.objectType, + }); + + factory ObjectLikeSaveCommand.fromJson(Map json) => + _$ObjectLikeSaveCommandFromJson(json); + + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey( + name: 'objectType', + includeIfNull: true, + toJson: objectTypeEnumToJson, + fromJson: objectTypeEnumFromJson) + enums.ObjectTypeEnum? objectType; + static const fromJsonFactory = _$ObjectLikeSaveCommandFromJson; + static const toJsonFactory = _$ObjectLikeSaveCommandToJson; + Map toJson() => _$ObjectLikeSaveCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OfficeDto { + OfficeDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.fullName, + this.otherName, + this.url, + this.unitType, + this.parentId, + this.priority, + this.type, + this.status, + this.parentName, + this.schoolCount, + this.schoolActiveCount, + }); + + factory OfficeDto.fromJson(Map json) => + _$OfficeDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'otherName', includeIfNull: true) + String? otherName; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'unitType', includeIfNull: true) + String? unitType; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'priority', includeIfNull: true) + int? priority; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: localityTypeEnumToJson, + fromJson: localityTypeEnumFromJson) + enums.LocalityTypeEnum? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: localityStatusEnumToJson, + fromJson: localityStatusEnumFromJson) + enums.LocalityStatusEnum? status; + @JsonKey(name: 'parentName', includeIfNull: true) + String? parentName; + @JsonKey(name: 'schoolCount', includeIfNull: true) + int? schoolCount; + @JsonKey(name: 'schoolActiveCount', includeIfNull: true) + int? schoolActiveCount; + static const fromJsonFactory = _$OfficeDtoFromJson; + static const toJsonFactory = _$OfficeDtoToJson; + Map toJson() => _$OfficeDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OfficeDtoFilterResult { + OfficeDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory OfficeDtoFilterResult.fromJson(Map json) => + _$OfficeDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$OfficeDtoFilterResultFromJson; + static const toJsonFactory = _$OfficeDtoFilterResultToJson; + Map toJson() => _$OfficeDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OfficeDtoFilterResultApiResponse { + OfficeDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory OfficeDtoFilterResultApiResponse.fromJson( + Map json) => + _$OfficeDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + OfficeDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$OfficeDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$OfficeDtoFilterResultApiResponseToJson; + Map toJson() => + _$OfficeDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OfficeGetListQuery { + OfficeGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.parentId, + }); + + factory OfficeGetListQuery.fromJson(Map json) => + _$OfficeGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + static const fromJsonFactory = _$OfficeGetListQueryFromJson; + static const toJsonFactory = _$OfficeGetListQueryToJson; + Map toJson() => _$OfficeGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderCreateDto { + OrderCreateDto({ + this.fullName, + this.phone, + this.address, + this.notes, + }); + + factory OrderCreateDto.fromJson(Map json) => + _$OrderCreateDtoFromJson(json); + + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + static const fromJsonFactory = _$OrderCreateDtoFromJson; + static const toJsonFactory = _$OrderCreateDtoToJson; + Map toJson() => _$OrderCreateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderCreateWithClassDto { + OrderCreateWithClassDto({ + this.productId, + this.classId, + this.fullName, + this.phone, + this.address, + this.notes, + }); + + factory OrderCreateWithClassDto.fromJson(Map json) => + _$OrderCreateWithClassDtoFromJson(json); + + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + static const fromJsonFactory = _$OrderCreateWithClassDtoFromJson; + static const toJsonFactory = _$OrderCreateWithClassDtoToJson; + Map toJson() => _$OrderCreateWithClassDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderDto { + OrderDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.fullName, + this.phone, + this.address, + this.notes, + this.totalAmount, + this.status, + this.items, + }); + + factory OrderDto.fromJson(Map json) => + _$OrderDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'totalAmount', includeIfNull: true) + double? totalAmount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: orderStatusEnumToJson, + fromJson: orderStatusEnumFromJson) + enums.OrderStatusEnum? status; + @JsonKey(name: 'items', includeIfNull: true, defaultValue: []) + List? items; + static const fromJsonFactory = _$OrderDtoFromJson; + static const toJsonFactory = _$OrderDtoToJson; + Map toJson() => _$OrderDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderDtoApiResponse { + OrderDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory OrderDtoApiResponse.fromJson(Map json) => + _$OrderDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + OrderDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$OrderDtoApiResponseFromJson; + static const toJsonFactory = _$OrderDtoApiResponseToJson; + Map toJson() => _$OrderDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderDtoFilterResult { + OrderDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory OrderDtoFilterResult.fromJson(Map json) => + _$OrderDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$OrderDtoFilterResultFromJson; + static const toJsonFactory = _$OrderDtoFilterResultToJson; + Map toJson() => _$OrderDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderDtoFilterResultApiResponse { + OrderDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory OrderDtoFilterResultApiResponse.fromJson(Map json) => + _$OrderDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + OrderDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$OrderDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$OrderDtoFilterResultApiResponseToJson; + Map toJson() => + _$OrderDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderEntity { + OrderEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.fullName, + this.phone, + this.address, + this.notes, + this.totalAmount, + this.status, + this.items, + }); + + factory OrderEntity.fromJson(Map json) => + _$OrderEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'totalAmount', includeIfNull: true) + double? totalAmount; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: orderStatusEnumToJson, + fromJson: orderStatusEnumFromJson) + enums.OrderStatusEnum? status; + @JsonKey( + name: 'items', includeIfNull: true, defaultValue: []) + List? items; + static const fromJsonFactory = _$OrderEntityFromJson; + static const toJsonFactory = _$OrderEntityToJson; + Map toJson() => _$OrderEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderEntityApiResponse { + OrderEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory OrderEntityApiResponse.fromJson(Map json) => + _$OrderEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + OrderEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$OrderEntityApiResponseFromJson; + static const toJsonFactory = _$OrderEntityApiResponseToJson; + Map toJson() => _$OrderEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderGetListQuery { + OrderGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.userId, + this.status, + }); + + factory OrderGetListQuery.fromJson(Map json) => + _$OrderGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: orderStatusEnumToJson, + fromJson: orderStatusEnumFromJson) + enums.OrderStatusEnum? status; + static const fromJsonFactory = _$OrderGetListQueryFromJson; + static const toJsonFactory = _$OrderGetListQueryToJson; + Map toJson() => _$OrderGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderItemDto { + OrderItemDto({ + this.id, + this.orderId, + this.productId, + this.quantity, + this.unitPrice, + this.salePrice, + this.totalPrice, + this.product, + }); + + factory OrderItemDto.fromJson(Map json) => + _$OrderItemDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'orderId', includeIfNull: true) + int? orderId; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + @JsonKey(name: 'unitPrice', includeIfNull: true) + double? unitPrice; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey(name: 'totalPrice', includeIfNull: true) + double? totalPrice; + @JsonKey(name: 'product', includeIfNull: true) + ProductListDto? product; + static const fromJsonFactory = _$OrderItemDtoFromJson; + static const toJsonFactory = _$OrderItemDtoToJson; + Map toJson() => _$OrderItemDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderItemEntity { + OrderItemEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.orderId, + this.productId, + this.quantity, + this.unitPrice, + this.salePrice, + this.totalPrice, + this.order, + this.product, + }); + + factory OrderItemEntity.fromJson(Map json) => + _$OrderItemEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'orderId', includeIfNull: true) + int? orderId; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'quantity', includeIfNull: true) + int? quantity; + @JsonKey(name: 'unitPrice', includeIfNull: true) + double? unitPrice; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey(name: 'totalPrice', includeIfNull: true) + double? totalPrice; + @JsonKey(name: 'order', includeIfNull: true) + OrderEntity? order; + @JsonKey(name: 'product', includeIfNull: true) + ProductEntity? product; + static const fromJsonFactory = _$OrderItemEntityFromJson; + static const toJsonFactory = _$OrderItemEntityToJson; + Map toJson() => _$OrderItemEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class OrderUpdateDto { + OrderUpdateDto({ + this.status, + this.notes, + this.fullName, + this.phone, + this.address, + }); + + factory OrderUpdateDto.fromJson(Map json) => + _$OrderUpdateDtoFromJson(json); + + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: orderStatusEnumToJson, + fromJson: orderStatusEnumFromJson) + enums.OrderStatusEnum? status; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + static const fromJsonFactory = _$OrderUpdateDtoFromJson; + static const toJsonFactory = _$OrderUpdateDtoToJson; + Map toJson() => _$OrderUpdateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductAttributeSaveDto { + ProductAttributeSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.productId, + this.name, + this.icon, + this.sortOrder, + }); + + factory ProductAttributeSaveDto.fromJson(Map json) => + _$ProductAttributeSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + static const fromJsonFactory = _$ProductAttributeSaveDtoFromJson; + static const toJsonFactory = _$ProductAttributeSaveDtoToJson; + Map toJson() => _$ProductAttributeSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductChapterDetailDto { + ProductChapterDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.productId, + this.name, + this.description, + this.sortOrder, + this.lessons, + }); + + factory ProductChapterDetailDto.fromJson(Map json) => + _$ProductChapterDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + @JsonKey( + name: 'lessons', + includeIfNull: true, + defaultValue: []) + List? lessons; + static const fromJsonFactory = _$ProductChapterDetailDtoFromJson; + static const toJsonFactory = _$ProductChapterDetailDtoToJson; + Map toJson() => _$ProductChapterDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductChapterSaveDto { + ProductChapterSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.productId, + this.name, + this.description, + this.sortOrder, + this.lessons, + }); + + factory ProductChapterSaveDto.fromJson(Map json) => + _$ProductChapterSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + @JsonKey( + name: 'lessons', + includeIfNull: true, + defaultValue: []) + List? lessons; + static const fromJsonFactory = _$ProductChapterSaveDtoFromJson; + static const toJsonFactory = _$ProductChapterSaveDtoToJson; + Map toJson() => _$ProductChapterSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductClassDto { + ProductClassDto({ + this.id, + this.name, + this.description, + this.maxStudents, + this.currentStudents, + this.startDate, + this.endDate, + this.status, + this.teacherName, + this.isFull, + }); + + factory ProductClassDto.fromJson(Map json) => + _$ProductClassDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'maxStudents', includeIfNull: true) + int? maxStudents; + @JsonKey(name: 'currentStudents', includeIfNull: true) + int? currentStudents; + @JsonKey(name: 'startDate', includeIfNull: true) + DateTime? startDate; + @JsonKey(name: 'endDate', includeIfNull: true) + DateTime? endDate; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classStatusEnumToJson, + fromJson: classStatusEnumFromJson) + enums.ClassStatusEnum? status; + @JsonKey(name: 'teacherName', includeIfNull: true) + String? teacherName; + @JsonKey(name: 'isFull', includeIfNull: true) + bool? isFull; + static const fromJsonFactory = _$ProductClassDtoFromJson; + static const toJsonFactory = _$ProductClassDtoToJson; + Map toJson() => _$ProductClassDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductClassDtoListApiResponse { + ProductClassDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductClassDtoListApiResponse.fromJson(Map json) => + _$ProductClassDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductClassDtoListApiResponseFromJson; + static const toJsonFactory = _$ProductClassDtoListApiResponseToJson; + Map toJson() => _$ProductClassDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductComboItemDto { + ProductComboItemDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.description, + this.image, + this.categoryId, + this.productType, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.price, + this.salePrice, + this.totalLessons, + this.totalDurationMinutes, + }); + + factory ProductComboItemDto.fromJson(Map json) => + _$ProductComboItemDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'price', includeIfNull: true) + double? price; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey(name: 'totalLessons', includeIfNull: true) + int? totalLessons; + @JsonKey(name: 'totalDurationMinutes', includeIfNull: true) + int? totalDurationMinutes; + static const fromJsonFactory = _$ProductComboItemDtoFromJson; + static const toJsonFactory = _$ProductComboItemDtoToJson; + Map toJson() => _$ProductComboItemDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductDetailDto { + ProductDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.description, + this.image, + this.categoryId, + this.productType, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.price, + this.salePrice, + this.chapters, + this.comboProducts, + this.attributes, + this.combos, + }); + + factory ProductDetailDto.fromJson(Map json) => + _$ProductDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'price', includeIfNull: true) + double? price; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey( + name: 'chapters', + includeIfNull: true, + defaultValue: []) + List? chapters; + @JsonKey( + name: 'comboProducts', + includeIfNull: true, + defaultValue: []) + List? comboProducts; + @JsonKey( + name: 'attributes', + includeIfNull: true, + defaultValue: []) + List? attributes; + @JsonKey(name: 'combos', includeIfNull: true, defaultValue: []) + List? combos; + static const fromJsonFactory = _$ProductDetailDtoFromJson; + static const toJsonFactory = _$ProductDetailDtoToJson; + Map toJson() => _$ProductDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductDetailDtoApiResponse { + ProductDetailDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductDetailDtoApiResponse.fromJson(Map json) => + _$ProductDetailDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductDetailDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductDetailDtoApiResponseFromJson; + static const toJsonFactory = _$ProductDetailDtoApiResponseToJson; + Map toJson() => _$ProductDetailDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductEntity { + ProductEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.description, + this.image, + this.categoryId, + this.productType, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.price, + this.salePrice, + }); + + factory ProductEntity.fromJson(Map json) => + _$ProductEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'price', includeIfNull: true) + double? price; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + static const fromJsonFactory = _$ProductEntityFromJson; + static const toJsonFactory = _$ProductEntityToJson; + Map toJson() => _$ProductEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductEntityApiResponse { + ProductEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductEntityApiResponse.fromJson(Map json) => + _$ProductEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductEntityApiResponseFromJson; + static const toJsonFactory = _$ProductEntityApiResponseToJson; + Map toJson() => _$ProductEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductGetByIdsQuery { + ProductGetByIdsQuery({ + this.ids, + }); + + factory ProductGetByIdsQuery.fromJson(Map json) => + _$ProductGetByIdsQueryFromJson(json); + + @JsonKey(name: 'ids', includeIfNull: true, defaultValue: []) + List? ids; + static const fromJsonFactory = _$ProductGetByIdsQueryFromJson; + static const toJsonFactory = _$ProductGetByIdsQueryToJson; + Map toJson() => _$ProductGetByIdsQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductGetListQuery { + ProductGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.categoryId, + this.productType, + this.status, + }); + + factory ProductGetListQuery.fromJson(Map json) => + _$ProductGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + static const fromJsonFactory = _$ProductGetListQueryFromJson; + static const toJsonFactory = _$ProductGetListQueryToJson; + Map toJson() => _$ProductGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductLessonDetailDto { + ProductLessonDetailDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.chapterId, + this.name, + this.description, + this.lessonType, + this.content, + this.sortOrder, + this.isFree, + }); + + factory ProductLessonDetailDto.fromJson(Map json) => + _$ProductLessonDetailDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'chapterId', includeIfNull: true) + int? chapterId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'lessonType', + includeIfNull: true, + toJson: lessonTypeEnumToJson, + fromJson: lessonTypeEnumFromJson) + enums.LessonTypeEnum? lessonType; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + @JsonKey(name: 'isFree', includeIfNull: true) + bool? isFree; + static const fromJsonFactory = _$ProductLessonDetailDtoFromJson; + static const toJsonFactory = _$ProductLessonDetailDtoToJson; + Map toJson() => _$ProductLessonDetailDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductLessonEntity { + ProductLessonEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.chapterId, + this.name, + this.description, + this.lessonType, + this.content, + this.sortOrder, + this.isFree, + }); + + factory ProductLessonEntity.fromJson(Map json) => + _$ProductLessonEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'chapterId', includeIfNull: true) + int? chapterId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'lessonType', + includeIfNull: true, + toJson: lessonTypeEnumToJson, + fromJson: lessonTypeEnumFromJson) + enums.LessonTypeEnum? lessonType; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + @JsonKey(name: 'isFree', includeIfNull: true) + bool? isFree; + static const fromJsonFactory = _$ProductLessonEntityFromJson; + static const toJsonFactory = _$ProductLessonEntityToJson; + Map toJson() => _$ProductLessonEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductLessonSaveDto { + ProductLessonSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.chapterId, + this.name, + this.description, + this.lessonType, + this.content, + this.sortOrder, + this.isFree, + }); + + factory ProductLessonSaveDto.fromJson(Map json) => + _$ProductLessonSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'chapterId', includeIfNull: true) + int? chapterId; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey( + name: 'lessonType', + includeIfNull: true, + toJson: lessonTypeEnumToJson, + fromJson: lessonTypeEnumFromJson) + enums.LessonTypeEnum? lessonType; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'sortOrder', includeIfNull: true) + int? sortOrder; + @JsonKey(name: 'isFree', includeIfNull: true) + bool? isFree; + static const fromJsonFactory = _$ProductLessonSaveDtoFromJson; + static const toJsonFactory = _$ProductLessonSaveDtoToJson; + Map toJson() => _$ProductLessonSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductListDto { + ProductListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.description, + this.image, + this.categoryId, + this.productType, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.price, + this.salePrice, + this.averageRating, + this.reviewCount, + }); + + factory ProductListDto.fromJson(Map json) => + _$ProductListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'price', includeIfNull: true) + double? price; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey(name: 'averageRating', includeIfNull: true) + double? averageRating; + @JsonKey(name: 'reviewCount', includeIfNull: true) + int? reviewCount; + static const fromJsonFactory = _$ProductListDtoFromJson; + static const toJsonFactory = _$ProductListDtoToJson; + Map toJson() => _$ProductListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductListDtoFilterResult { + ProductListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ProductListDtoFilterResult.fromJson(Map json) => + _$ProductListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ProductListDtoFilterResultFromJson; + static const toJsonFactory = _$ProductListDtoFilterResultToJson; + Map toJson() => _$ProductListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductListDtoFilterResultApiResponse { + ProductListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ProductListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ProductListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$ProductListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ProductListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductListDtoListApiResponse { + ProductListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductListDtoListApiResponse.fromJson(Map json) => + _$ProductListDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductListDtoListApiResponseFromJson; + static const toJsonFactory = _$ProductListDtoListApiResponseToJson; + Map toJson() => _$ProductListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewApproveCommand { + ProductReviewApproveCommand({ + this.id, + this.status, + }); + + factory ProductReviewApproveCommand.fromJson(Map json) => + _$ProductReviewApproveCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: productReviewStatusEnumToJson, + fromJson: productReviewStatusEnumFromJson) + enums.ProductReviewStatusEnum? status; + static const fromJsonFactory = _$ProductReviewApproveCommandFromJson; + static const toJsonFactory = _$ProductReviewApproveCommandToJson; + Map toJson() => _$ProductReviewApproveCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewCreateDto { + ProductReviewCreateDto({ + this.productId, + this.rating, + this.comment, + this.createdByName, + }); + + factory ProductReviewCreateDto.fromJson(Map json) => + _$ProductReviewCreateDtoFromJson(json); + + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'rating', includeIfNull: true) + int? rating; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey(name: 'createdByName', includeIfNull: true) + String? createdByName; + static const fromJsonFactory = _$ProductReviewCreateDtoFromJson; + static const toJsonFactory = _$ProductReviewCreateDtoToJson; + Map toJson() => _$ProductReviewCreateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewEntity { + ProductReviewEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.productId, + this.userId, + this.fullName, + this.avatar, + this.rating, + this.comment, + this.status, + }); + + factory ProductReviewEntity.fromJson(Map json) => + _$ProductReviewEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'rating', includeIfNull: true) + int? rating; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: productReviewStatusEnumToJson, + fromJson: productReviewStatusEnumFromJson) + enums.ProductReviewStatusEnum? status; + static const fromJsonFactory = _$ProductReviewEntityFromJson; + static const toJsonFactory = _$ProductReviewEntityToJson; + Map toJson() => _$ProductReviewEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewEntityApiResponse { + ProductReviewEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductReviewEntityApiResponse.fromJson(Map json) => + _$ProductReviewEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductReviewEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductReviewEntityApiResponseFromJson; + static const toJsonFactory = _$ProductReviewEntityApiResponseToJson; + Map toJson() => _$ProductReviewEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewEntityListApiResponse { + ProductReviewEntityListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductReviewEntityListApiResponse.fromJson( + Map json) => + _$ProductReviewEntityListApiResponseFromJson(json); + + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductReviewEntityListApiResponseFromJson; + static const toJsonFactory = _$ProductReviewEntityListApiResponseToJson; + Map toJson() => + _$ProductReviewEntityListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewGenerateAiRequest { + ProductReviewGenerateAiRequest({ + this.count, + }); + + factory ProductReviewGenerateAiRequest.fromJson(Map json) => + _$ProductReviewGenerateAiRequestFromJson(json); + + @JsonKey(name: 'count', includeIfNull: true) + int? count; + static const fromJsonFactory = _$ProductReviewGenerateAiRequestFromJson; + static const toJsonFactory = _$ProductReviewGenerateAiRequestToJson; + Map toJson() => _$ProductReviewGenerateAiRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewGetListQuery { + ProductReviewGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.productId, + this.status, + }); + + factory ProductReviewGetListQuery.fromJson(Map json) => + _$ProductReviewGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: productReviewStatusEnumToJson, + fromJson: productReviewStatusEnumFromJson) + enums.ProductReviewStatusEnum? status; + static const fromJsonFactory = _$ProductReviewGetListQueryFromJson; + static const toJsonFactory = _$ProductReviewGetListQueryToJson; + Map toJson() => _$ProductReviewGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewListDto { + ProductReviewListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.productId, + this.userId, + this.fullName, + this.avatar, + this.rating, + this.comment, + this.status, + }); + + factory ProductReviewListDto.fromJson(Map json) => + _$ProductReviewListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'productId', includeIfNull: true) + int? productId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'rating', includeIfNull: true) + int? rating; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: productReviewStatusEnumToJson, + fromJson: productReviewStatusEnumFromJson) + enums.ProductReviewStatusEnum? status; + static const fromJsonFactory = _$ProductReviewListDtoFromJson; + static const toJsonFactory = _$ProductReviewListDtoToJson; + Map toJson() => _$ProductReviewListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewListDtoFilterResult { + ProductReviewListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory ProductReviewListDtoFilterResult.fromJson( + Map json) => + _$ProductReviewListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$ProductReviewListDtoFilterResultFromJson; + static const toJsonFactory = _$ProductReviewListDtoFilterResultToJson; + Map toJson() => + _$ProductReviewListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductReviewListDtoFilterResultApiResponse { + ProductReviewListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductReviewListDtoFilterResultApiResponse.fromJson( + Map json) => + _$ProductReviewListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductReviewListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$ProductReviewListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$ProductReviewListDtoFilterResultApiResponseToJson; + Map toJson() => + _$ProductReviewListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductSaveDto { + ProductSaveDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.description, + this.image, + this.categoryId, + this.productType, + this.status, + this.metaTitle, + this.metaDescription, + this.metaKeywords, + this.slug, + this.price, + this.salePrice, + this.tagIds, + this.chapters, + this.attributes, + this.comboProductIds, + }); + + factory ProductSaveDto.fromJson(Map json) => + _$ProductSaveDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + @JsonKey( + name: 'productType', + includeIfNull: true, + toJson: productTypeEnumToJson, + fromJson: productTypeEnumFromJson) + enums.ProductTypeEnum? productType; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + @JsonKey(name: 'metaTitle', includeIfNull: true) + String? metaTitle; + @JsonKey(name: 'metaDescription', includeIfNull: true) + String? metaDescription; + @JsonKey(name: 'metaKeywords', includeIfNull: true) + String? metaKeywords; + @JsonKey(name: 'slug', includeIfNull: true) + String? slug; + @JsonKey(name: 'price', includeIfNull: true) + double? price; + @JsonKey(name: 'salePrice', includeIfNull: true) + double? salePrice; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + @JsonKey( + name: 'chapters', + includeIfNull: true, + defaultValue: []) + List? chapters; + @JsonKey( + name: 'attributes', + includeIfNull: true, + defaultValue: []) + List? attributes; + @JsonKey(name: 'comboProductIds', includeIfNull: true, defaultValue: []) + List? comboProductIds; + static const fromJsonFactory = _$ProductSaveDtoFromJson; + static const toJsonFactory = _$ProductSaveDtoToJson; + Map toJson() => _$ProductSaveDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ProductSaveDtoApiResponse { + ProductSaveDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ProductSaveDtoApiResponse.fromJson(Map json) => + _$ProductSaveDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ProductSaveDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ProductSaveDtoApiResponseFromJson; + static const toJsonFactory = _$ProductSaveDtoApiResponseToJson; + Map toJson() => _$ProductSaveDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilAddDto { + PupilAddDto({ + this.fullName, + this.email, + this.phoneNumber, + }); + + factory PupilAddDto.fromJson(Map json) => + _$PupilAddDtoFromJson(json); + + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + static const fromJsonFactory = _$PupilAddDtoFromJson; + static const toJsonFactory = _$PupilAddDtoToJson; + Map toJson() => _$PupilAddDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilAddMultiCommand { + PupilAddMultiCommand({ + this.pupils, + this.password, + this.classId, + }); + + factory PupilAddMultiCommand.fromJson(Map json) => + _$PupilAddMultiCommandFromJson(json); + + @JsonKey(name: 'pupils', includeIfNull: true, defaultValue: []) + List? pupils; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + static const fromJsonFactory = _$PupilAddMultiCommandFromJson; + static const toJsonFactory = _$PupilAddMultiCommandToJson; + Map toJson() => _$PupilAddMultiCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilChangePasswordCommand { + PupilChangePasswordCommand({ + this.classId, + this.userId, + this.password, + }); + + factory PupilChangePasswordCommand.fromJson(Map json) => + _$PupilChangePasswordCommandFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + static const fromJsonFactory = _$PupilChangePasswordCommandFromJson; + static const toJsonFactory = _$PupilChangePasswordCommandToJson; + Map toJson() => _$PupilChangePasswordCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilCheckGoToClassDto { + PupilCheckGoToClassDto({ + this.classId, + this.className, + this.academicYearId, + this.academicYearName, + this.grade, + }); + + factory PupilCheckGoToClassDto.fromJson(Map json) => + _$PupilCheckGoToClassDtoFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'className', includeIfNull: true) + String? className; + @JsonKey(name: 'academicYearId', includeIfNull: true) + int? academicYearId; + @JsonKey(name: 'academicYearName', includeIfNull: true) + String? academicYearName; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + static const fromJsonFactory = _$PupilCheckGoToClassDtoFromJson; + static const toJsonFactory = _$PupilCheckGoToClassDtoToJson; + Map toJson() => _$PupilCheckGoToClassDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilCheckGoToClassDtoApiResponse { + PupilCheckGoToClassDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory PupilCheckGoToClassDtoApiResponse.fromJson( + Map json) => + _$PupilCheckGoToClassDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + PupilCheckGoToClassDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$PupilCheckGoToClassDtoApiResponseFromJson; + static const toJsonFactory = _$PupilCheckGoToClassDtoApiResponseToJson; + Map toJson() => + _$PupilCheckGoToClassDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilCopyFromClassCommand { + PupilCopyFromClassCommand({ + this.classId, + this.newClassId, + }); + + factory PupilCopyFromClassCommand.fromJson(Map json) => + _$PupilCopyFromClassCommandFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'newClassId', includeIfNull: true) + int? newClassId; + static const fromJsonFactory = _$PupilCopyFromClassCommandFromJson; + static const toJsonFactory = _$PupilCopyFromClassCommandToJson; + Map toJson() => _$PupilCopyFromClassCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilFilterDto { + PupilFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.classId, + this.keyword, + this.status, + }); + + factory PupilFilterDto.fromJson(Map json) => + _$PupilFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + static const fromJsonFactory = _$PupilFilterDtoFromJson; + static const toJsonFactory = _$PupilFilterDtoToJson; + Map toJson() => _$PupilFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilGoToClassCommand { + PupilGoToClassCommand({ + this.classId, + this.checkGoToClass, + }); + + factory PupilGoToClassCommand.fromJson(Map json) => + _$PupilGoToClassCommandFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'checkGoToClass', includeIfNull: true) + PupilCheckGoToClassDto? checkGoToClass; + static const fromJsonFactory = _$PupilGoToClassCommandFromJson; + static const toJsonFactory = _$PupilGoToClassCommandToJson; + Map toJson() => _$PupilGoToClassCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilHistoryDoExamDto { + PupilHistoryDoExamDto({ + this.assignExamId, + this.title, + this.type, + this.subject, + this.submitDate, + this.score, + this.status, + this.createdBy, + this.canMark, + this.examId, + this.examResultId, + }); + + factory PupilHistoryDoExamDto.fromJson(Map json) => + _$PupilHistoryDoExamDtoFromJson(json); + + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'title', includeIfNull: true) + String? title; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'submitDate', includeIfNull: true) + DateTime? submitDate; + @JsonKey(name: 'score', includeIfNull: true) + double? score; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: assignExamUserStatusEnumToJson, + fromJson: assignExamUserStatusEnumFromJson) + enums.AssignExamUserStatusEnum? status; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'canMark', includeIfNull: true) + bool? canMark; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'examResultId', includeIfNull: true) + int? examResultId; + static const fromJsonFactory = _$PupilHistoryDoExamDtoFromJson; + static const toJsonFactory = _$PupilHistoryDoExamDtoToJson; + Map toJson() => _$PupilHistoryDoExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilHistoryDoExamDtoFilterResult { + PupilHistoryDoExamDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory PupilHistoryDoExamDtoFilterResult.fromJson( + Map json) => + _$PupilHistoryDoExamDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = _$PupilHistoryDoExamDtoFilterResultFromJson; + static const toJsonFactory = _$PupilHistoryDoExamDtoFilterResultToJson; + Map toJson() => + _$PupilHistoryDoExamDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilHistoryDoExamDtoFilterResultApiResponse { + PupilHistoryDoExamDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory PupilHistoryDoExamDtoFilterResultApiResponse.fromJson( + Map json) => + _$PupilHistoryDoExamDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + PupilHistoryDoExamDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$PupilHistoryDoExamDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$PupilHistoryDoExamDtoFilterResultApiResponseToJson; + Map toJson() => + _$PupilHistoryDoExamDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilHistoryDoExamFilterDto { + PupilHistoryDoExamFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.userId, + this.classId, + this.subjectId, + this.keyword, + this.submitDate, + this.type, + }); + + factory PupilHistoryDoExamFilterDto.fromJson(Map json) => + _$PupilHistoryDoExamFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'submitDate', includeIfNull: true) + DateTime? submitDate; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + static const fromJsonFactory = _$PupilHistoryDoExamFilterDtoFromJson; + static const toJsonFactory = _$PupilHistoryDoExamFilterDtoToJson; + Map toJson() => _$PupilHistoryDoExamFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilListDto { + PupilListDto({ + this.id, + this.userName, + this.avatar, + this.fullName, + this.email, + this.phoneNumber, + this.studentCode, + this.createdDate, + this.birthDay, + this.gender, + this.status, + this.identifierCode, + }); + + factory PupilListDto.fromJson(Map json) => + _$PupilListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'studentCode', includeIfNull: true) + String? studentCode; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'birthDay', includeIfNull: true) + DateTime? birthDay; + @JsonKey(name: 'gender', includeIfNull: true) + int? gender; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + @JsonKey(name: 'identifierCode', includeIfNull: true) + String? identifierCode; + static const fromJsonFactory = _$PupilListDtoFromJson; + static const toJsonFactory = _$PupilListDtoToJson; + Map toJson() => _$PupilListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilListDtoFilterResult { + PupilListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory PupilListDtoFilterResult.fromJson(Map json) => + _$PupilListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$PupilListDtoFilterResultFromJson; + static const toJsonFactory = _$PupilListDtoFilterResultToJson; + Map toJson() => _$PupilListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStaticByTypeExamDto { + PupilStaticByTypeExamDto({ + this.type, + this.total, + this.done, + this.averageScore, + }); + + factory PupilStaticByTypeExamDto.fromJson(Map json) => + _$PupilStaticByTypeExamDtoFromJson(json); + + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'total', includeIfNull: true) + int? total; + @JsonKey(name: 'done', includeIfNull: true) + int? done; + @JsonKey(name: 'averageScore', includeIfNull: true) + double? averageScore; + static const fromJsonFactory = _$PupilStaticByTypeExamDtoFromJson; + static const toJsonFactory = _$PupilStaticByTypeExamDtoToJson; + Map toJson() => _$PupilStaticByTypeExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStaticByTypeExamDtoListApiResponse { + PupilStaticByTypeExamDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory PupilStaticByTypeExamDtoListApiResponse.fromJson( + Map json) => + _$PupilStaticByTypeExamDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$PupilStaticByTypeExamDtoListApiResponseFromJson; + static const toJsonFactory = _$PupilStaticByTypeExamDtoListApiResponseToJson; + Map toJson() => + _$PupilStaticByTypeExamDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStaticDto { + PupilStaticDto({ + this.averageScore, + this.percentage, + this.total, + }); + + factory PupilStaticDto.fromJson(Map json) => + _$PupilStaticDtoFromJson(json); + + @JsonKey(name: 'averageScore', includeIfNull: true) + double? averageScore; + @JsonKey(name: 'percentage', includeIfNull: true) + double? percentage; + @JsonKey(name: 'total', includeIfNull: true) + int? total; + static const fromJsonFactory = _$PupilStaticDtoFromJson; + static const toJsonFactory = _$PupilStaticDtoToJson; + Map toJson() => _$PupilStaticDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStaticDtoApiResponse { + PupilStaticDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory PupilStaticDtoApiResponse.fromJson(Map json) => + _$PupilStaticDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + PupilStaticDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$PupilStaticDtoApiResponseFromJson; + static const toJsonFactory = _$PupilStaticDtoApiResponseToJson; + Map toJson() => _$PupilStaticDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStatisticalDto { + PupilStatisticalDto({ + this.totalClass, + this.totalExamNeedDo, + this.totalExam, + this.totalExamDone, + }); + + factory PupilStatisticalDto.fromJson(Map json) => + _$PupilStatisticalDtoFromJson(json); + + @JsonKey(name: 'totalClass', includeIfNull: true) + int? totalClass; + @JsonKey(name: 'totalExamNeedDo', includeIfNull: true) + int? totalExamNeedDo; + @JsonKey(name: 'totalExam', includeIfNull: true) + int? totalExam; + @JsonKey(name: 'totalExamDone', includeIfNull: true) + int? totalExamDone; + static const fromJsonFactory = _$PupilStatisticalDtoFromJson; + static const toJsonFactory = _$PupilStatisticalDtoToJson; + Map toJson() => _$PupilStatisticalDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilStatisticalDtoApiResponse { + PupilStatisticalDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory PupilStatisticalDtoApiResponse.fromJson(Map json) => + _$PupilStatisticalDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + PupilStatisticalDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$PupilStatisticalDtoApiResponseFromJson; + static const toJsonFactory = _$PupilStatisticalDtoApiResponseToJson; + Map toJson() => _$PupilStatisticalDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionDto { + QuestionDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.schoolId, + this.type, + this.content, + this.avatar, + this.image, + this.answers, + this.explain, + this.transcript, + this.parentId, + this.sound, + this.video, + this.classLevel, + this.level, + this.subjectId, + this.status, + this.format, + this.labelType, + this.isSystem, + this.tagIds, + this.mark, + this.childs, + this.file, + }); + + factory QuestionDto.fromJson(Map json) => + _$QuestionDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'image', includeIfNull: true, defaultValue: []) + List? image; + @JsonKey(name: 'answers', includeIfNull: true) + dynamic answers; + @JsonKey(name: 'explain', includeIfNull: true) + String? explain; + @JsonKey(name: 'transcript', includeIfNull: true) + String? transcript; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'sound', includeIfNull: true, defaultValue: []) + List? sound; + @JsonKey(name: 'video', includeIfNull: true) + String? video; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey( + name: 'level', + includeIfNull: true, + toJson: questionLevelEnumToJson, + fromJson: questionLevelEnumFromJson) + enums.QuestionLevelEnum? level; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: questionStatusEnumToJson, + fromJson: questionStatusEnumFromJson) + enums.QuestionStatusEnum? status; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'labelType', includeIfNull: true) + int? labelType; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'tagIds', includeIfNull: true, defaultValue: []) + List? tagIds; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'childs', includeIfNull: true, defaultValue: []) + List? childs; + @JsonKey(name: 'file', includeIfNull: true) + String? file; + static const fromJsonFactory = _$QuestionDtoFromJson; + static const toJsonFactory = _$QuestionDtoToJson; + Map toJson() => _$QuestionDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionDtoApiResponse { + QuestionDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory QuestionDtoApiResponse.fromJson(Map json) => + _$QuestionDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + QuestionDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$QuestionDtoApiResponseFromJson; + static const toJsonFactory = _$QuestionDtoApiResponseToJson; + Map toJson() => _$QuestionDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionDtoListApiResponse { + QuestionDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory QuestionDtoListApiResponse.fromJson(Map json) => + _$QuestionDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$QuestionDtoListApiResponseFromJson; + static const toJsonFactory = _$QuestionDtoListApiResponseToJson; + Map toJson() => _$QuestionDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionGetListQuery { + QuestionGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.type, + this.userId, + this.schoolId, + this.subjectId, + this.classLevel, + this.level, + this.status, + this.filterType, + this.ids, + }); + + factory QuestionGetListQuery.fromJson(Map json) => + _$QuestionGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey( + name: 'level', + includeIfNull: true, + toJson: questionLevelEnumToJson, + fromJson: questionLevelEnumFromJson) + enums.QuestionLevelEnum? level; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: questionStatusEnumToJson, + fromJson: questionStatusEnumFromJson) + enums.QuestionStatusEnum? status; + @JsonKey(name: 'filterType', includeIfNull: true) + int? filterType; + @JsonKey(name: 'ids', includeIfNull: true, defaultValue: []) + List? ids; + static const fromJsonFactory = _$QuestionGetListQueryFromJson; + static const toJsonFactory = _$QuestionGetListQueryToJson; + Map toJson() => _$QuestionGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionListDto { + QuestionListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.schoolId, + this.type, + this.content, + this.avatar, + this.image, + this.answers, + this.explain, + this.transcript, + this.parentId, + this.sound, + this.video, + this.classLevel, + this.level, + this.subjectId, + this.status, + this.format, + this.labelType, + this.isSystem, + this.isLike, + }); + + factory QuestionListDto.fromJson(Map json) => + _$QuestionListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'image', includeIfNull: true, defaultValue: []) + List? image; + @JsonKey(name: 'answers', includeIfNull: true) + String? answers; + @JsonKey(name: 'explain', includeIfNull: true) + String? explain; + @JsonKey(name: 'transcript', includeIfNull: true) + String? transcript; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'sound', includeIfNull: true, defaultValue: []) + List? sound; + @JsonKey(name: 'video', includeIfNull: true) + String? video; + @JsonKey(name: 'classLevel', includeIfNull: true) + int? classLevel; + @JsonKey( + name: 'level', + includeIfNull: true, + toJson: questionLevelEnumToJson, + fromJson: questionLevelEnumFromJson) + enums.QuestionLevelEnum? level; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: questionStatusEnumToJson, + fromJson: questionStatusEnumFromJson) + enums.QuestionStatusEnum? status; + @JsonKey( + name: 'format', + includeIfNull: true, + toJson: examFormatEnumToJson, + fromJson: examFormatEnumFromJson) + enums.ExamFormatEnum? format; + @JsonKey(name: 'labelType', includeIfNull: true) + int? labelType; + @JsonKey(name: 'isSystem', includeIfNull: true) + bool? isSystem; + @JsonKey(name: 'isLike', includeIfNull: true) + bool? isLike; + static const fromJsonFactory = _$QuestionListDtoFromJson; + static const toJsonFactory = _$QuestionListDtoToJson; + Map toJson() => _$QuestionListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionListDtoFilterResult { + QuestionListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory QuestionListDtoFilterResult.fromJson(Map json) => + _$QuestionListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$QuestionListDtoFilterResultFromJson; + static const toJsonFactory = _$QuestionListDtoFilterResultToJson; + Map toJson() => _$QuestionListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class QuestionListDtoFilterResultApiResponse { + QuestionListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory QuestionListDtoFilterResultApiResponse.fromJson( + Map json) => + _$QuestionListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + QuestionListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$QuestionListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$QuestionListDtoFilterResultApiResponseToJson; + Map toJson() => + _$QuestionListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RefreshTokenEntity { + RefreshTokenEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.token, + this.userId, + this.user, + this.expires, + this.isExpired, + this.revoked, + this.isActive, + }); + + factory RefreshTokenEntity.fromJson(Map json) => + _$RefreshTokenEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'token', includeIfNull: true) + String? token; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'user', includeIfNull: true) + UserEntity? user; + @JsonKey(name: 'expires', includeIfNull: true) + DateTime? expires; + @JsonKey(name: 'isExpired', includeIfNull: true) + bool? isExpired; + @JsonKey(name: 'revoked', includeIfNull: true) + DateTime? revoked; + @JsonKey(name: 'isActive', includeIfNull: true) + bool? isActive; + static const fromJsonFactory = _$RefreshTokenEntityFromJson; + static const toJsonFactory = _$RefreshTokenEntityToJson; + Map toJson() => _$RefreshTokenEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RefreshTokenResponseDto { + RefreshTokenResponseDto({ + this.token, + }); + + factory RefreshTokenResponseDto.fromJson(Map json) => + _$RefreshTokenResponseDtoFromJson(json); + + @JsonKey(name: 'token', includeIfNull: true) + String? token; + static const fromJsonFactory = _$RefreshTokenResponseDtoFromJson; + static const toJsonFactory = _$RefreshTokenResponseDtoToJson; + Map toJson() => _$RefreshTokenResponseDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RefreshTokenResponseDtoApiResponse { + RefreshTokenResponseDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory RefreshTokenResponseDtoApiResponse.fromJson( + Map json) => + _$RefreshTokenResponseDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + RefreshTokenResponseDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$RefreshTokenResponseDtoApiResponseFromJson; + static const toJsonFactory = _$RefreshTokenResponseDtoApiResponseToJson; + Map toJson() => + _$RefreshTokenResponseDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RegisterDto { + RegisterDto({ + this.userName, + this.email, + this.password, + this.fullName, + this.phoneNumber, + this.roles, + this.id, + this.avatar, + this.status, + this.type, + this.objectId, + this.provinceId, + this.identifierCode, + this.birthDay, + this.gender, + this.address, + }); + + factory RegisterDto.fromJson(Map json) => + _$RegisterDtoFromJson(json); + + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'roles', includeIfNull: true, defaultValue: []) + List? roles; + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'identifierCode', includeIfNull: true) + String? identifierCode; + @JsonKey(name: 'birthDay', includeIfNull: true) + DateTime? birthDay; + @JsonKey(name: 'gender', includeIfNull: true) + int? gender; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + static const fromJsonFactory = _$RegisterDtoFromJson; + static const toJsonFactory = _$RegisterDtoToJson; + Map toJson() => _$RegisterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RegisterDtoApiResponse { + RegisterDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory RegisterDtoApiResponse.fromJson(Map json) => + _$RegisterDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + RegisterDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$RegisterDtoApiResponseFromJson; + static const toJsonFactory = _$RegisterDtoApiResponseToJson; + Map toJson() => _$RegisterDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ResetPasswordByUserNameResource { + ResetPasswordByUserNameResource({ + this.username, + this.password, + this.rePassword, + this.token, + }); + + factory ResetPasswordByUserNameResource.fromJson(Map json) => + _$ResetPasswordByUserNameResourceFromJson(json); + + @JsonKey(name: 'username', includeIfNull: true) + String? username; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'rePassword', includeIfNull: true) + String? rePassword; + @JsonKey(name: 'token', includeIfNull: true) + String? token; + static const fromJsonFactory = _$ResetPasswordByUserNameResourceFromJson; + static const toJsonFactory = _$ResetPasswordByUserNameResourceToJson; + Map toJson() => + _$ResetPasswordByUserNameResourceToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ResponseX { + ResponseX({ + this.sessionId, + this.fileId, + this.docType, + this.pages, + }); + + factory ResponseX.fromJson(Map json) => + _$ResponseXFromJson(json); + + @JsonKey(name: 'sessionId', includeIfNull: true) + int? sessionId; + @JsonKey(name: 'fileId', includeIfNull: true) + int? fileId; + @JsonKey(name: 'docType', includeIfNull: true) + String? docType; + @JsonKey(name: 'pages', includeIfNull: true) + Object? pages; + static const fromJsonFactory = _$ResponseXFromJson; + static const toJsonFactory = _$ResponseXToJson; + Map toJson() => _$ResponseXToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ResponseXApiResponse { + ResponseXApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory ResponseXApiResponse.fromJson(Map json) => + _$ResponseXApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + ResponseX? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$ResponseXApiResponseFromJson; + static const toJsonFactory = _$ResponseXApiResponseToJson; + Map toJson() => _$ResponseXApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RoleDto { + RoleDto({ + this.id, + this.name, + this.userCount, + this.listModule, + }); + + factory RoleDto.fromJson(Map json) => + _$RoleDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'userCount', includeIfNull: true) + int? userCount; + @JsonKey( + name: 'listModule', includeIfNull: true, defaultValue: []) + List? listModule; + static const fromJsonFactory = _$RoleDtoFromJson; + static const toJsonFactory = _$RoleDtoToJson; + Map toJson() => _$RoleDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RoleDtoApiResponse { + RoleDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory RoleDtoApiResponse.fromJson(Map json) => + _$RoleDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + RoleDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$RoleDtoApiResponseFromJson; + static const toJsonFactory = _$RoleDtoApiResponseToJson; + Map toJson() => _$RoleDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RoleDtoListApiResponse { + RoleDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory RoleDtoListApiResponse.fromJson(Map json) => + _$RoleDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$RoleDtoListApiResponseFromJson; + static const toJsonFactory = _$RoleDtoListApiResponseToJson; + Map toJson() => _$RoleDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RoleModuleDto { + RoleModuleDto({ + this.module, + this.moduleName, + this.isZone, + this.isFull, + this.tenantId, + this.permissions, + }); + + factory RoleModuleDto.fromJson(Map json) => + _$RoleModuleDtoFromJson(json); + + @JsonKey( + name: 'module', + includeIfNull: true, + toJson: moduleEnumToJson, + fromJson: moduleEnumFromJson) + enums.ModuleEnum? module; + @JsonKey(name: 'moduleName', includeIfNull: true) + String? moduleName; + @JsonKey(name: 'isZone', includeIfNull: true) + bool? isZone; + @JsonKey(name: 'isFull', includeIfNull: true) + bool? isFull; + @JsonKey(name: 'tenantId', includeIfNull: true) + int? tenantId; + @JsonKey( + name: 'permissions', + includeIfNull: true, + defaultValue: []) + List? permissions; + static const fromJsonFactory = _$RoleModuleDtoFromJson; + static const toJsonFactory = _$RoleModuleDtoToJson; + Map toJson() => _$RoleModuleDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RoleModuleDtoListApiResponse { + RoleModuleDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory RoleModuleDtoListApiResponse.fromJson(Map json) => + _$RoleModuleDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$RoleModuleDtoListApiResponseFromJson; + static const toJsonFactory = _$RoleModuleDtoListApiResponseToJson; + Map toJson() => _$RoleModuleDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class RolePermissionDto { + RolePermissionDto({ + this.fullZone, + this.zoneIds, + this.permission, + }); + + factory RolePermissionDto.fromJson(Map json) => + _$RolePermissionDtoFromJson(json); + + @JsonKey(name: 'fullZone', includeIfNull: true) + bool? fullZone; + @JsonKey(name: 'zoneIds', includeIfNull: true, defaultValue: []) + List? zoneIds; + @JsonKey(name: 'permission', includeIfNull: true) + int? permission; + static const fromJsonFactory = _$RolePermissionDtoFromJson; + static const toJsonFactory = _$RolePermissionDtoToJson; + Map toJson() => _$RolePermissionDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillEntity { + SafetySkillEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.detail, + this.icon, + this.image, + this.status, + }); + + factory SafetySkillEntity.fromJson(Map json) => + _$SafetySkillEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'detail', includeIfNull: true) + String? detail; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + static const fromJsonFactory = _$SafetySkillEntityFromJson; + static const toJsonFactory = _$SafetySkillEntityToJson; + Map toJson() => _$SafetySkillEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillEntityApiResponse { + SafetySkillEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SafetySkillEntityApiResponse.fromJson(Map json) => + _$SafetySkillEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SafetySkillEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SafetySkillEntityApiResponseFromJson; + static const toJsonFactory = _$SafetySkillEntityApiResponseToJson; + Map toJson() => _$SafetySkillEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillGetListQuery { + SafetySkillGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + }); + + factory SafetySkillGetListQuery.fromJson(Map json) => + _$SafetySkillGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + static const fromJsonFactory = _$SafetySkillGetListQueryFromJson; + static const toJsonFactory = _$SafetySkillGetListQueryToJson; + Map toJson() => _$SafetySkillGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillListDto { + SafetySkillListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.summary, + this.detail, + this.icon, + this.image, + this.status, + }); + + factory SafetySkillListDto.fromJson(Map json) => + _$SafetySkillListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + @JsonKey(name: 'detail', includeIfNull: true) + String? detail; + @JsonKey(name: 'icon', includeIfNull: true) + String? icon; + @JsonKey(name: 'image', includeIfNull: true) + String? image; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: commonStatusEnumToJson, + fromJson: commonStatusEnumFromJson) + enums.CommonStatusEnum? status; + static const fromJsonFactory = _$SafetySkillListDtoFromJson; + static const toJsonFactory = _$SafetySkillListDtoToJson; + Map toJson() => _$SafetySkillListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillListDtoFilterResult { + SafetySkillListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory SafetySkillListDtoFilterResult.fromJson(Map json) => + _$SafetySkillListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$SafetySkillListDtoFilterResultFromJson; + static const toJsonFactory = _$SafetySkillListDtoFilterResultToJson; + Map toJson() => _$SafetySkillListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SafetySkillListDtoFilterResultApiResponse { + SafetySkillListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SafetySkillListDtoFilterResultApiResponse.fromJson( + Map json) => + _$SafetySkillListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SafetySkillListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$SafetySkillListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$SafetySkillListDtoFilterResultApiResponseToJson; + Map toJson() => + _$SafetySkillListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolClassDto { + SchoolClassDto({ + this.id, + this.name, + this.classes, + }); + + factory SchoolClassDto.fromJson(Map json) => + _$SchoolClassDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey( + name: 'classes', includeIfNull: true, defaultValue: []) + List? classes; + static const fromJsonFactory = _$SchoolClassDtoFromJson; + static const toJsonFactory = _$SchoolClassDtoToJson; + Map toJson() => _$SchoolClassDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolDto { + SchoolDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.status, + this.districtId, + this.provinceId, + this.wardId, + this.address, + this.email, + this.phone, + this.logo, + this.url, + this.description, + this.type, + this.departmentId, + }); + + factory SchoolDto.fromJson(Map json) => + _$SchoolDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + @JsonKey(name: 'districtId', includeIfNull: true) + int? districtId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'wardId', includeIfNull: true) + int? wardId; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'logo', includeIfNull: true) + String? logo; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'departmentId', includeIfNull: true) + int? departmentId; + static const fromJsonFactory = _$SchoolDtoFromJson; + static const toJsonFactory = _$SchoolDtoToJson; + Map toJson() => _$SchoolDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolDtoApiResponse { + SchoolDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SchoolDtoApiResponse.fromJson(Map json) => + _$SchoolDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SchoolDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SchoolDtoApiResponseFromJson; + static const toJsonFactory = _$SchoolDtoApiResponseToJson; + Map toJson() => _$SchoolDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolEntity { + SchoolEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.status, + this.districtId, + this.provinceId, + this.wardId, + this.address, + this.email, + this.phone, + this.logo, + this.url, + this.description, + this.type, + }); + + factory SchoolEntity.fromJson(Map json) => + _$SchoolEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + @JsonKey(name: 'districtId', includeIfNull: true) + int? districtId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'wardId', includeIfNull: true) + int? wardId; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'logo', includeIfNull: true) + String? logo; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + static const fromJsonFactory = _$SchoolEntityFromJson; + static const toJsonFactory = _$SchoolEntityToJson; + Map toJson() => _$SchoolEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolEntityApiResponse { + SchoolEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SchoolEntityApiResponse.fromJson(Map json) => + _$SchoolEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SchoolEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SchoolEntityApiResponseFromJson; + static const toJsonFactory = _$SchoolEntityApiResponseToJson; + Map toJson() => _$SchoolEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolGetListQuery { + SchoolGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.departmentId, + this.officeId, + this.type, + this.status, + }); + + factory SchoolGetListQuery.fromJson(Map json) => + _$SchoolGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'departmentId', includeIfNull: true) + int? departmentId; + @JsonKey(name: 'officeId', includeIfNull: true) + int? officeId; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + static const fromJsonFactory = _$SchoolGetListQueryFromJson; + static const toJsonFactory = _$SchoolGetListQueryToJson; + Map toJson() => _$SchoolGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolLevel { + SchoolLevel({ + this.id, + this.name, + this.classLevels, + }); + + factory SchoolLevel.fromJson(Map json) => + _$SchoolLevelFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey( + name: 'classLevels', includeIfNull: true, defaultValue: []) + List? classLevels; + static const fromJsonFactory = _$SchoolLevelFromJson; + static const toJsonFactory = _$SchoolLevelToJson; + Map toJson() => _$SchoolLevelToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolListDto { + SchoolListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.code, + this.name, + this.status, + this.districtId, + this.provinceId, + this.wardId, + this.address, + this.email, + this.phone, + this.logo, + this.url, + this.description, + this.type, + this.countActiveClass, + this.departmentName, + this.officeName, + this.studentCount, + this.teacherCount, + }); + + factory SchoolListDto.fromJson(Map json) => + _$SchoolListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: schoolStatusEnumToJson, + fromJson: schoolStatusEnumFromJson) + enums.SchoolStatusEnum? status; + @JsonKey(name: 'districtId', includeIfNull: true) + int? districtId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'wardId', includeIfNull: true) + int? wardId; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phone', includeIfNull: true) + String? phone; + @JsonKey(name: 'logo', includeIfNull: true) + String? logo; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'description', includeIfNull: true) + String? description; + @JsonKey(name: 'type', includeIfNull: true) + String? type; + @JsonKey(name: 'countActiveClass', includeIfNull: true) + int? countActiveClass; + @JsonKey(name: 'departmentName', includeIfNull: true) + String? departmentName; + @JsonKey(name: 'officeName', includeIfNull: true) + String? officeName; + @JsonKey(name: 'studentCount', includeIfNull: true) + int? studentCount; + @JsonKey(name: 'teacherCount', includeIfNull: true) + int? teacherCount; + static const fromJsonFactory = _$SchoolListDtoFromJson; + static const toJsonFactory = _$SchoolListDtoToJson; + Map toJson() => _$SchoolListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolListDtoFilterResult { + SchoolListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory SchoolListDtoFilterResult.fromJson(Map json) => + _$SchoolListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$SchoolListDtoFilterResultFromJson; + static const toJsonFactory = _$SchoolListDtoFilterResultToJson; + Map toJson() => _$SchoolListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolListDtoFilterResultApiResponse { + SchoolListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SchoolListDtoFilterResultApiResponse.fromJson( + Map json) => + _$SchoolListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SchoolListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SchoolListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$SchoolListDtoFilterResultApiResponseToJson; + Map toJson() => + _$SchoolListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolListDtoListApiResponse { + SchoolListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SchoolListDtoListApiResponse.fromJson(Map json) => + _$SchoolListDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SchoolListDtoListApiResponseFromJson; + static const toJsonFactory = _$SchoolListDtoListApiResponseToJson; + Map toJson() => _$SchoolListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolStaticCountDto { + SchoolStaticCountDto({ + this.schoolName, + this.classCount, + this.teacherCount, + this.assignmentCount, + }); + + factory SchoolStaticCountDto.fromJson(Map json) => + _$SchoolStaticCountDtoFromJson(json); + + @JsonKey(name: 'schoolName', includeIfNull: true) + String? schoolName; + @JsonKey(name: 'classCount', includeIfNull: true) + int? classCount; + @JsonKey(name: 'teacherCount', includeIfNull: true) + int? teacherCount; + @JsonKey(name: 'assignmentCount', includeIfNull: true) + int? assignmentCount; + static const fromJsonFactory = _$SchoolStaticCountDtoFromJson; + static const toJsonFactory = _$SchoolStaticCountDtoToJson; + Map toJson() => _$SchoolStaticCountDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SchoolStaticCountDtoApiResponse { + SchoolStaticCountDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SchoolStaticCountDtoApiResponse.fromJson(Map json) => + _$SchoolStaticCountDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SchoolStaticCountDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SchoolStaticCountDtoApiResponseFromJson; + static const toJsonFactory = _$SchoolStaticCountDtoApiResponseToJson; + Map toJson() => + _$SchoolStaticCountDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SessionAttendanceEntity { + SessionAttendanceEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.sessionId, + this.userId, + this.joinTime, + this.leaveTime, + this.durationMinutes, + this.status, + this.notes, + this.session, + this.user, + }); + + factory SessionAttendanceEntity.fromJson(Map json) => + _$SessionAttendanceEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'sessionId', includeIfNull: true) + int? sessionId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'joinTime', includeIfNull: true) + DateTime? joinTime; + @JsonKey(name: 'leaveTime', includeIfNull: true) + DateTime? leaveTime; + @JsonKey(name: 'durationMinutes', includeIfNull: true) + int? durationMinutes; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: attendanceStatusEnumToJson, + fromJson: attendanceStatusEnumFromJson) + enums.AttendanceStatusEnum? status; + @JsonKey(name: 'notes', includeIfNull: true) + String? notes; + @JsonKey(name: 'session', includeIfNull: true) + ClassSessionEntity? session; + @JsonKey(name: 'user', includeIfNull: true) + UserEntity? user; + static const fromJsonFactory = _$SessionAttendanceEntityFromJson; + static const toJsonFactory = _$SessionAttendanceEntityToJson; + Map toJson() => _$SessionAttendanceEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Setup2FADto { + Setup2FADto({ + this.sharedKey, + this.authenticatorUri, + }); + + factory Setup2FADto.fromJson(Map json) => + _$Setup2FADtoFromJson(json); + + @JsonKey(name: 'sharedKey', includeIfNull: true) + String? sharedKey; + @JsonKey(name: 'authenticatorUri', includeIfNull: true) + String? authenticatorUri; + static const fromJsonFactory = _$Setup2FADtoFromJson; + static const toJsonFactory = _$Setup2FADtoToJson; + Map toJson() => _$Setup2FADtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SimpleChatRequest { + SimpleChatRequest({ + this.message, + this.systemPrompt, + }); + + factory SimpleChatRequest.fromJson(Map json) => + _$SimpleChatRequestFromJson(json); + + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'systemPrompt', includeIfNull: true) + String? systemPrompt; + static const fromJsonFactory = _$SimpleChatRequestFromJson; + static const toJsonFactory = _$SimpleChatRequestToJson; + Map toJson() => _$SimpleChatRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class StatisticalDto { + StatisticalDto({ + this.totalClass, + this.totalStudent, + this.totalExam, + this.totalQuestion, + }); + + factory StatisticalDto.fromJson(Map json) => + _$StatisticalDtoFromJson(json); + + @JsonKey(name: 'totalClass', includeIfNull: true) + int? totalClass; + @JsonKey(name: 'totalStudent', includeIfNull: true) + int? totalStudent; + @JsonKey(name: 'totalExam', includeIfNull: true) + int? totalExam; + @JsonKey(name: 'totalQuestion', includeIfNull: true) + int? totalQuestion; + static const fromJsonFactory = _$StatisticalDtoFromJson; + static const toJsonFactory = _$StatisticalDtoToJson; + Map toJson() => _$StatisticalDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class StatisticalDtoApiResponse { + StatisticalDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory StatisticalDtoApiResponse.fromJson(Map json) => + _$StatisticalDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + StatisticalDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$StatisticalDtoApiResponseFromJson; + static const toJsonFactory = _$StatisticalDtoApiResponseToJson; + Map toJson() => _$StatisticalDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class Subject { + Subject({ + this.id, + this.name, + }); + + factory Subject.fromJson(Map json) => + _$SubjectFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + static const fromJsonFactory = _$SubjectFromJson; + static const toJsonFactory = _$SubjectToJson; + Map toJson() => _$SubjectToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SystemEnums { + SystemEnums({ + this.code, + this.values, + this.items, + }); + + factory SystemEnums.fromJson(Map json) => + _$SystemEnumsFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'values', includeIfNull: true) + Enum? values; + @JsonKey(name: 'items', includeIfNull: true, defaultValue: []) + List? items; + static const fromJsonFactory = _$SystemEnumsFromJson; + static const toJsonFactory = _$SystemEnumsToJson; + Map toJson() => _$SystemEnumsToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SystemInitDto { + SystemInitDto({ + this.category, + this.enums, + this.userPermissions, + this.currentObject, + this.processingStatus, + this.schoolLevels, + this.school, + this.academicYears, + }); + + factory SystemInitDto.fromJson(Map json) => + _$SystemInitDtoFromJson(json); + + @JsonKey( + name: 'category', includeIfNull: true, defaultValue: []) + List? category; + @JsonKey(name: 'enums', includeIfNull: true, defaultValue: []) + List? enums; + @JsonKey( + name: 'userPermissions', + includeIfNull: true, + defaultValue: []) + List? userPermissions; + @JsonKey(name: 'currentObject', includeIfNull: true) + CurrentObjectDto? currentObject; + @JsonKey(name: 'processingStatus', includeIfNull: true) + Object? processingStatus; + @JsonKey( + name: 'schoolLevels', includeIfNull: true, defaultValue: []) + List? schoolLevels; + @JsonKey(name: 'school', includeIfNull: true) + SchoolEntity? school; + @JsonKey( + name: 'academicYears', + includeIfNull: true, + defaultValue: []) + List? academicYears; + static const fromJsonFactory = _$SystemInitDtoFromJson; + static const toJsonFactory = _$SystemInitDtoToJson; + Map toJson() => _$SystemInitDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class SystemInitDtoApiResponse { + SystemInitDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory SystemInitDtoApiResponse.fromJson(Map json) => + _$SystemInitDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + SystemInitDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$SystemInitDtoApiResponseFromJson; + static const toJsonFactory = _$SystemInitDtoApiResponseToJson; + Map toJson() => _$SystemInitDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagAddNewsDto { + TagAddNewsDto({ + this.tagId, + this.newsIds, + }); + + factory TagAddNewsDto.fromJson(Map json) => + _$TagAddNewsDtoFromJson(json); + + @JsonKey(name: 'tagId', includeIfNull: true) + int? tagId; + @JsonKey(name: 'newsIds', includeIfNull: true, defaultValue: []) + List? newsIds; + static const fromJsonFactory = _$TagAddNewsDtoFromJson; + static const toJsonFactory = _$TagAddNewsDtoToJson; + Map toJson() => _$TagAddNewsDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagDto { + TagDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.name, + this.unsignName, + this.url, + this.isHotTag, + this.status, + }); + + factory TagDto.fromJson(Map json) => _$TagDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'unsignName', includeIfNull: true) + String? unsignName; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + @JsonKey(name: 'isHotTag', includeIfNull: true) + bool? isHotTag; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + static const fromJsonFactory = _$TagDtoFromJson; + static const toJsonFactory = _$TagDtoToJson; + Map toJson() => _$TagDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagDtoApiResponse { + TagDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TagDtoApiResponse.fromJson(Map json) => + _$TagDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + TagDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$TagDtoApiResponseFromJson; + static const toJsonFactory = _$TagDtoApiResponseToJson; + Map toJson() => _$TagDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagDtoListApiResponse { + TagDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TagDtoListApiResponse.fromJson(Map json) => + _$TagDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$TagDtoListApiResponseFromJson; + static const toJsonFactory = _$TagDtoListApiResponseToJson; + Map toJson() => _$TagDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagGetListQuery { + TagGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.keyword, + this.zoneId, + this.type, + }); + + factory TagGetListQuery.fromJson(Map json) => + _$TagGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'zoneId', includeIfNull: true) + int? zoneId; + @JsonKey(name: 'type', includeIfNull: true) + int? type; + static const fromJsonFactory = _$TagGetListQueryFromJson; + static const toJsonFactory = _$TagGetListQueryToJson; + Map toJson() => _$TagGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagGetListWithNewsCountQuery { + TagGetListWithNewsCountQuery({ + this.onlyHotTags, + }); + + factory TagGetListWithNewsCountQuery.fromJson(Map json) => + _$TagGetListWithNewsCountQueryFromJson(json); + + @JsonKey(name: 'onlyHotTags', includeIfNull: true) + bool? onlyHotTags; + static const fromJsonFactory = _$TagGetListWithNewsCountQueryFromJson; + static const toJsonFactory = _$TagGetListWithNewsCountQueryToJson; + Map toJson() => _$TagGetListWithNewsCountQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagListDto { + TagListDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.name, + this.isHotTag, + this.newsCount, + this.zoneId, + this.zone, + this.url, + }); + + factory TagListDto.fromJson(Map json) => + _$TagListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'name', includeIfNull: true) + String? name; + @JsonKey(name: 'isHotTag', includeIfNull: true) + bool? isHotTag; + @JsonKey(name: 'newsCount', includeIfNull: true) + int? newsCount; + @JsonKey(name: 'zoneId', includeIfNull: true) + int? zoneId; + @JsonKey(name: 'zone', includeIfNull: true) + String? zone; + @JsonKey(name: 'url', includeIfNull: true) + String? url; + static const fromJsonFactory = _$TagListDtoFromJson; + static const toJsonFactory = _$TagListDtoToJson; + Map toJson() => _$TagListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagListDtoFilterResult { + TagListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory TagListDtoFilterResult.fromJson(Map json) => + _$TagListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$TagListDtoFilterResultFromJson; + static const toJsonFactory = _$TagListDtoFilterResultToJson; + Map toJson() => _$TagListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagListDtoFilterResultApiResponse { + TagListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TagListDtoFilterResultApiResponse.fromJson( + Map json) => + _$TagListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + TagListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$TagListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$TagListDtoFilterResultApiResponseToJson; + Map toJson() => + _$TagListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TagListDtoListApiResponse { + TagListDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TagListDtoListApiResponse.fromJson(Map json) => + _$TagListDtoListApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$TagListDtoListApiResponseFromJson; + static const toJsonFactory = _$TagListDtoListApiResponseToJson; + Map toJson() => _$TagListDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherCreateDto { + TeacherCreateDto({ + this.userName, + this.email, + this.password, + this.fullName, + this.phoneNumber, + this.roles, + this.id, + this.avatar, + this.status, + this.type, + this.objectId, + this.provinceId, + this.birthDay, + this.gender, + this.identifierCode, + this.isTemp, + this.classId, + this.className, + this.ethnic, + this.rowIndex, + this.address, + this.classListStr, + this.classManageStr, + this.subject, + }); + + factory TeacherCreateDto.fromJson(Map json) => + _$TeacherCreateDtoFromJson(json); + + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'roles', includeIfNull: true, defaultValue: []) + List? roles; + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'birthDay', includeIfNull: true) + DateTime? birthDay; + @JsonKey(name: 'gender', includeIfNull: true) + int? gender; + @JsonKey(name: 'identifierCode', includeIfNull: true) + String? identifierCode; + @JsonKey(name: 'isTemp', includeIfNull: true) + bool? isTemp; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'className', includeIfNull: true) + String? className; + @JsonKey(name: 'ethnic', includeIfNull: true) + String? ethnic; + @JsonKey(name: 'rowIndex', includeIfNull: true) + int? rowIndex; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'classListStr', includeIfNull: true) + String? classListStr; + @JsonKey(name: 'classManageStr', includeIfNull: true) + String? classManageStr; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + static const fromJsonFactory = _$TeacherCreateDtoFromJson; + static const toJsonFactory = _$TeacherCreateDtoToJson; + Map toJson() => _$TeacherCreateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherFilterDto { + TeacherFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.classId, + this.keyword, + this.status, + this.isGetCountAssignExam, + }); + + factory TeacherFilterDto.fromJson(Map json) => + _$TeacherFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + @JsonKey(name: 'isGetCountAssignExam', includeIfNull: true) + bool? isGetCountAssignExam; + static const fromJsonFactory = _$TeacherFilterDtoFromJson; + static const toJsonFactory = _$TeacherFilterDtoToJson; + Map toJson() => _$TeacherFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherGetBySchoolDto { + TeacherGetBySchoolDto({ + this.id, + this.userName, + this.avatar, + this.fullName, + this.fullNameNonAccent, + this.classCount, + this.assignmentCount, + this.assignmentMarkedCount, + this.assignmentMarkedWaitingCount, + }); + + factory TeacherGetBySchoolDto.fromJson(Map json) => + _$TeacherGetBySchoolDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'fullNameNonAccent', includeIfNull: true) + String? fullNameNonAccent; + @JsonKey(name: 'classCount', includeIfNull: true) + int? classCount; + @JsonKey(name: 'assignmentCount', includeIfNull: true) + int? assignmentCount; + @JsonKey(name: 'assignmentMarkedCount', includeIfNull: true) + int? assignmentMarkedCount; + @JsonKey(name: 'assignmentMarkedWaitingCount', includeIfNull: true) + int? assignmentMarkedWaitingCount; + static const fromJsonFactory = _$TeacherGetBySchoolDtoFromJson; + static const toJsonFactory = _$TeacherGetBySchoolDtoToJson; + Map toJson() => _$TeacherGetBySchoolDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherGetBySchoolDtoFilterResult { + TeacherGetBySchoolDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory TeacherGetBySchoolDtoFilterResult.fromJson( + Map json) => + _$TeacherGetBySchoolDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + static const fromJsonFactory = _$TeacherGetBySchoolDtoFilterResultFromJson; + static const toJsonFactory = _$TeacherGetBySchoolDtoFilterResultToJson; + Map toJson() => + _$TeacherGetBySchoolDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherGetBySchoolDtoFilterResultApiResponse { + TeacherGetBySchoolDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TeacherGetBySchoolDtoFilterResultApiResponse.fromJson( + Map json) => + _$TeacherGetBySchoolDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + TeacherGetBySchoolDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$TeacherGetBySchoolDtoFilterResultApiResponseFromJson; + static const toJsonFactory = + _$TeacherGetBySchoolDtoFilterResultApiResponseToJson; + Map toJson() => + _$TeacherGetBySchoolDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherGetBySchoolFilterDto { + TeacherGetBySchoolFilterDto({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.schoolId, + this.keyword, + }); + + factory TeacherGetBySchoolFilterDto.fromJson(Map json) => + _$TeacherGetBySchoolFilterDtoFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'schoolId', includeIfNull: true) + int? schoolId; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + static const fromJsonFactory = _$TeacherGetBySchoolFilterDtoFromJson; + static const toJsonFactory = _$TeacherGetBySchoolFilterDtoToJson; + Map toJson() => _$TeacherGetBySchoolFilterDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherListDto { + TeacherListDto({ + this.id, + this.userName, + this.avatar, + this.fullName, + this.email, + this.status, + this.createdDate, + this.subjectIds, + this.subject, + this.isManager, + this.countAssignExam, + this.countAssignExamMarkedWaiting, + }); + + factory TeacherListDto.fromJson(Map json) => + _$TeacherListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: classUserStatusEnumToJson, + fromJson: classUserStatusEnumFromJson) + enums.ClassUserStatusEnum? status; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'subjectIds', includeIfNull: true, defaultValue: []) + List? subjectIds; + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'isManager', includeIfNull: true) + bool? isManager; + @JsonKey(name: 'countAssignExam', includeIfNull: true) + int? countAssignExam; + @JsonKey(name: 'countAssignExamMarkedWaiting', includeIfNull: true) + int? countAssignExamMarkedWaiting; + static const fromJsonFactory = _$TeacherListDtoFromJson; + static const toJsonFactory = _$TeacherListDtoToJson; + Map toJson() => _$TeacherListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherListDtoFilterResult { + TeacherListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory TeacherListDtoFilterResult.fromJson(Map json) => + _$TeacherListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$TeacherListDtoFilterResultFromJson; + static const toJsonFactory = _$TeacherListDtoFilterResultToJson; + Map toJson() => _$TeacherListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherStaticByTypeExamDto { + TeacherStaticByTypeExamDto({ + this.type, + this.total, + this.markedCount, + this.markedWaitingCount, + this.averageScore, + }); + + factory TeacherStaticByTypeExamDto.fromJson(Map json) => + _$TeacherStaticByTypeExamDtoFromJson(json); + + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: assignExamTypeEnumToJson, + fromJson: assignExamTypeEnumFromJson) + enums.AssignExamTypeEnum? type; + @JsonKey(name: 'total', includeIfNull: true) + int? total; + @JsonKey(name: 'markedCount', includeIfNull: true) + int? markedCount; + @JsonKey(name: 'markedWaitingCount', includeIfNull: true) + int? markedWaitingCount; + @JsonKey(name: 'averageScore', includeIfNull: true) + double? averageScore; + static const fromJsonFactory = _$TeacherStaticByTypeExamDtoFromJson; + static const toJsonFactory = _$TeacherStaticByTypeExamDtoToJson; + Map toJson() => _$TeacherStaticByTypeExamDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherStaticByTypeExamDtoListApiResponse { + TeacherStaticByTypeExamDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory TeacherStaticByTypeExamDtoListApiResponse.fromJson( + Map json) => + _$TeacherStaticByTypeExamDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = + _$TeacherStaticByTypeExamDtoListApiResponseFromJson; + static const toJsonFactory = + _$TeacherStaticByTypeExamDtoListApiResponseToJson; + Map toJson() => + _$TeacherStaticByTypeExamDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherUpdateManagerCommand { + TeacherUpdateManagerCommand({ + this.classId, + this.userId, + }); + + factory TeacherUpdateManagerCommand.fromJson(Map json) => + _$TeacherUpdateManagerCommandFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + static const fromJsonFactory = _$TeacherUpdateManagerCommandFromJson; + static const toJsonFactory = _$TeacherUpdateManagerCommandToJson; + Map toJson() => _$TeacherUpdateManagerCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherUpdateSubjectsCommand { + TeacherUpdateSubjectsCommand({ + this.classId, + this.userId, + this.subjectIds, + }); + + factory TeacherUpdateSubjectsCommand.fromJson(Map json) => + _$TeacherUpdateSubjectsCommandFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'subjectIds', includeIfNull: true, defaultValue: []) + List? subjectIds; + static const fromJsonFactory = _$TeacherUpdateSubjectsCommandFromJson; + static const toJsonFactory = _$TeacherUpdateSubjectsCommandToJson; + Map toJson() => _$TeacherUpdateSubjectsCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TopAverageScoreDto { + TopAverageScoreDto({ + this.userId, + this.avatar, + this.fullName, + this.averageScore, + }); + + factory TopAverageScoreDto.fromJson(Map json) => + _$TopAverageScoreDtoFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'averageScore', includeIfNull: true) + double? averageScore; + static const fromJsonFactory = _$TopAverageScoreDtoFromJson; + static const toJsonFactory = _$TopAverageScoreDtoToJson; + Map toJson() => _$TopAverageScoreDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TopNeedsToDoHomeworkDto { + TopNeedsToDoHomeworkDto({ + this.userId, + this.avatar, + this.fullName, + this.countExam, + this.countExamDone, + this.countExamNotStarted, + }); + + factory TopNeedsToDoHomeworkDto.fromJson(Map json) => + _$TopNeedsToDoHomeworkDtoFromJson(json); + + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'countExam', includeIfNull: true) + int? countExam; + @JsonKey(name: 'countExamDone', includeIfNull: true) + int? countExamDone; + @JsonKey(name: 'countExamNotStarted', includeIfNull: true) + int? countExamNotStarted; + static const fromJsonFactory = _$TopNeedsToDoHomeworkDtoFromJson; + static const toJsonFactory = _$TopNeedsToDoHomeworkDtoToJson; + Map toJson() => _$TopNeedsToDoHomeworkDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UpdateAvatarDto { + UpdateAvatarDto({ + this.avatar, + }); + + factory UpdateAvatarDto.fromJson(Map json) => + _$UpdateAvatarDtoFromJson(json); + + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + static const fromJsonFactory = _$UpdateAvatarDtoFromJson; + static const toJsonFactory = _$UpdateAvatarDtoToJson; + Map toJson() => _$UpdateAvatarDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UpdateInfoDto { + UpdateInfoDto({ + this.fullName, + this.phoneNumber, + this.avatar, + }); + + factory UpdateInfoDto.fromJson(Map json) => + _$UpdateInfoDtoFromJson(json); + + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + static const fromJsonFactory = _$UpdateInfoDtoFromJson; + static const toJsonFactory = _$UpdateInfoDtoToJson; + Map toJson() => _$UpdateInfoDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserAnsweDataDto { + UserAnsweDataDto({ + this.id, + this.content, + this.itemId, + this.isCorrect, + this.mark, + }); + + factory UserAnsweDataDto.fromJson(Map json) => + _$UserAnsweDataDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + String? id; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'itemId', includeIfNull: true) + String? itemId; + @JsonKey(name: 'isCorrect', includeIfNull: true) + bool? isCorrect; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + static const fromJsonFactory = _$UserAnsweDataDtoFromJson; + static const toJsonFactory = _$UserAnsweDataDtoToJson; + Map toJson() => _$UserAnsweDataDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserAnswerDto { + UserAnswerDto({ + this.id, + this.questionId, + this.parentId, + this.content, + this.isCorrect, + this.mark, + this.comment, + this.commentBy, + this.commentDate, + this.answer, + this.childAnswer, + }); + + factory UserAnswerDto.fromJson(Map json) => + _$UserAnswerDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'questionId', includeIfNull: true) + int? questionId; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'isCorrect', includeIfNull: true) + bool? isCorrect; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey(name: 'commentBy', includeIfNull: true) + int? commentBy; + @JsonKey(name: 'commentDate', includeIfNull: true) + DateTime? commentDate; + @JsonKey( + name: 'answer', includeIfNull: true, defaultValue: []) + List? answer; + @JsonKey( + name: 'childAnswer', includeIfNull: true, defaultValue: []) + List? childAnswer; + static const fromJsonFactory = _$UserAnswerDtoFromJson; + static const toJsonFactory = _$UserAnswerDtoToJson; + Map toJson() => _$UserAnswerDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserAnswerEntity { + UserAnswerEntity({ + this.id, + this.userExamResultId, + this.questionId, + this.parentId, + this.content, + this.fileUrl, + this.mark, + this.isCorrect, + this.answer, + this.comment, + this.commentBy, + this.commentDate, + this.lastModifiedBy, + this.lastModifiedDate, + }); + + factory UserAnswerEntity.fromJson(Map json) => + _$UserAnswerEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userExamResultId', includeIfNull: true) + int? userExamResultId; + @JsonKey(name: 'questionId', includeIfNull: true) + int? questionId; + @JsonKey(name: 'parentId', includeIfNull: true) + int? parentId; + @JsonKey(name: 'content', includeIfNull: true) + String? content; + @JsonKey(name: 'fileUrl', includeIfNull: true) + String? fileUrl; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'isCorrect', includeIfNull: true) + bool? isCorrect; + @JsonKey(name: 'answer', includeIfNull: true) + String? answer; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey(name: 'commentBy', includeIfNull: true) + int? commentBy; + @JsonKey(name: 'commentDate', includeIfNull: true) + DateTime? commentDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + static const fromJsonFactory = _$UserAnswerEntityFromJson; + static const toJsonFactory = _$UserAnswerEntityToJson; + Map toJson() => _$UserAnswerEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserClaimEntity { + UserClaimEntity({ + this.id, + this.userId, + this.claimType, + this.claimValue, + }); + + factory UserClaimEntity.fromJson(Map json) => + _$UserClaimEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'claimType', includeIfNull: true) + String? claimType; + @JsonKey(name: 'claimValue', includeIfNull: true) + String? claimValue; + static const fromJsonFactory = _$UserClaimEntityFromJson; + static const toJsonFactory = _$UserClaimEntityToJson; + Map toJson() => _$UserClaimEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserCreateDto { + UserCreateDto({ + this.userName, + this.email, + this.password, + this.fullName, + this.phoneNumber, + this.roles, + this.id, + this.avatar, + this.status, + this.type, + this.objectId, + this.provinceId, + this.birthDay, + this.gender, + this.identifierCode, + this.isTemp, + this.classId, + this.className, + this.ethnic, + this.rowIndex, + this.address, + }); + + factory UserCreateDto.fromJson(Map json) => + _$UserCreateDtoFromJson(json); + + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'password', includeIfNull: true) + String? password; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'roles', includeIfNull: true, defaultValue: []) + List? roles; + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'birthDay', includeIfNull: true) + DateTime? birthDay; + @JsonKey(name: 'gender', includeIfNull: true) + int? gender; + @JsonKey(name: 'identifierCode', includeIfNull: true) + String? identifierCode; + @JsonKey(name: 'isTemp', includeIfNull: true) + bool? isTemp; + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'className', includeIfNull: true) + String? className; + @JsonKey(name: 'ethnic', includeIfNull: true) + String? ethnic; + @JsonKey(name: 'rowIndex', includeIfNull: true) + int? rowIndex; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + static const fromJsonFactory = _$UserCreateDtoFromJson; + static const toJsonFactory = _$UserCreateDtoToJson; + Map toJson() => _$UserCreateDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserEntity { + UserEntity({ + this.id, + this.userName, + this.normalizedUserName, + this.email, + this.normalizedEmail, + this.emailConfirmed, + this.passwordHash, + this.securityStamp, + this.concurrencyStamp, + this.phoneNumber, + this.phoneNumberConfirmed, + this.twoFactorEnabled, + this.lockoutEnd, + this.lockoutEnabled, + this.accessFailedCount, + this.claims, + this.refreshTokens, + this.avatar, + this.fullName, + this.fullNameNonAccent, + this.lastLoginDate, + this.createdDate, + this.isDeleted, + this.type, + this.objectId, + this.provinceId, + this.isOnline, + this.studentCode, + this.birthDay, + this.gender, + this.identifierCode, + this.address, + this.ethnic, + }); + + factory UserEntity.fromJson(Map json) => + _$UserEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'normalizedUserName', includeIfNull: true) + String? normalizedUserName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'normalizedEmail', includeIfNull: true) + String? normalizedEmail; + @JsonKey(name: 'emailConfirmed', includeIfNull: true) + bool? emailConfirmed; + @JsonKey(name: 'passwordHash', includeIfNull: true) + String? passwordHash; + @JsonKey(name: 'securityStamp', includeIfNull: true) + String? securityStamp; + @JsonKey(name: 'concurrencyStamp', includeIfNull: true) + String? concurrencyStamp; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'phoneNumberConfirmed', includeIfNull: true) + bool? phoneNumberConfirmed; + @JsonKey(name: 'twoFactorEnabled', includeIfNull: true) + bool? twoFactorEnabled; + @JsonKey(name: 'lockoutEnd', includeIfNull: true) + DateTime? lockoutEnd; + @JsonKey(name: 'lockoutEnabled', includeIfNull: true) + bool? lockoutEnabled; + @JsonKey(name: 'accessFailedCount', includeIfNull: true) + int? accessFailedCount; + @JsonKey( + name: 'claims', includeIfNull: true, defaultValue: []) + List? claims; + @JsonKey( + name: 'refreshTokens', + includeIfNull: true, + defaultValue: []) + List? refreshTokens; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'fullNameNonAccent', includeIfNull: true) + String? fullNameNonAccent; + @JsonKey(name: 'lastLoginDate', includeIfNull: true) + DateTime? lastLoginDate; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey(name: 'provinceId', includeIfNull: true) + int? provinceId; + @JsonKey(name: 'isOnline', includeIfNull: true) + bool? isOnline; + @JsonKey(name: 'studentCode', includeIfNull: true) + String? studentCode; + @JsonKey(name: 'birthDay', includeIfNull: true) + DateTime? birthDay; + @JsonKey(name: 'gender', includeIfNull: true) + int? gender; + @JsonKey(name: 'identifierCode', includeIfNull: true) + String? identifierCode; + @JsonKey(name: 'address', includeIfNull: true) + String? address; + @JsonKey(name: 'ethnic', includeIfNull: true) + String? ethnic; + static const fromJsonFactory = _$UserEntityFromJson; + static const toJsonFactory = _$UserEntityToJson; + Map toJson() => _$UserEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserExamResultDetailWithMessageDto { + UserExamResultDetailWithMessageDto({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.examId, + this.assignExamId, + this.userId, + this.mark, + this.duration, + this.correctAnswerCount, + this.correctQuestions, + this.fromType, + this.comment, + this.status, + this.userAnswer, + this.examInfo, + this.userInfo, + this.message, + this.teacherNote, + this.isAssigner, + this.canMarkScore, + }); + + factory UserExamResultDetailWithMessageDto.fromJson( + Map json) => + _$UserExamResultDetailWithMessageDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'correctAnswerCount', includeIfNull: true) + int? correctAnswerCount; + @JsonKey(name: 'correctQuestions', includeIfNull: true) + String? correctQuestions; + @JsonKey(name: 'fromType', includeIfNull: true) + int? fromType; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: userExamResultStatusToJson, + fromJson: userExamResultStatusFromJson) + enums.UserExamResultStatus? status; + @JsonKey( + name: 'userAnswer', includeIfNull: true, defaultValue: []) + List? userAnswer; + @JsonKey(name: 'examInfo', includeIfNull: true) + ExamLearnDto? examInfo; + @JsonKey(name: 'userInfo', includeIfNull: true) + UserWithSimpleInfoDto? userInfo; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'teacherNote', includeIfNull: true) + String? teacherNote; + @JsonKey(name: 'isAssigner', includeIfNull: true) + bool? isAssigner; + @JsonKey(name: 'canMarkScore', includeIfNull: true) + bool? canMarkScore; + static const fromJsonFactory = _$UserExamResultDetailWithMessageDtoFromJson; + static const toJsonFactory = _$UserExamResultDetailWithMessageDtoToJson; + Map toJson() => + _$UserExamResultDetailWithMessageDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserExamResultDto { + UserExamResultDto({ + this.startTime, + this.duration, + this.examId, + this.assignExamId, + this.userAnswer, + this.fromType, + }); + + factory UserExamResultDto.fromJson(Map json) => + _$UserExamResultDtoFromJson(json); + + @JsonKey(name: 'startTime', includeIfNull: true) + DateTime? startTime; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey( + name: 'userAnswer', includeIfNull: true, defaultValue: []) + List? userAnswer; + @JsonKey(name: 'fromType', includeIfNull: true) + int? fromType; + static const fromJsonFactory = _$UserExamResultDtoFromJson; + static const toJsonFactory = _$UserExamResultDtoToJson; + Map toJson() => _$UserExamResultDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserExamResultEntity { + UserExamResultEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.examId, + this.assignExamId, + this.userId, + this.mark, + this.duration, + this.correctAnswerCount, + this.correctQuestions, + this.fromType, + this.comment, + this.status, + this.userAnswer, + }); + + factory UserExamResultEntity.fromJson(Map json) => + _$UserExamResultEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'examId', includeIfNull: true) + int? examId; + @JsonKey(name: 'assignExamId', includeIfNull: true) + int? assignExamId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'mark', includeIfNull: true) + double? mark; + @JsonKey(name: 'duration', includeIfNull: true) + int? duration; + @JsonKey(name: 'correctAnswerCount', includeIfNull: true) + int? correctAnswerCount; + @JsonKey(name: 'correctQuestions', includeIfNull: true) + String? correctQuestions; + @JsonKey(name: 'fromType', includeIfNull: true) + int? fromType; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + @JsonKey( + name: 'status', + includeIfNull: true, + toJson: userExamResultStatusToJson, + fromJson: userExamResultStatusFromJson) + enums.UserExamResultStatus? status; + @JsonKey( + name: 'userAnswer', + includeIfNull: true, + defaultValue: []) + List? userAnswer; + static const fromJsonFactory = _$UserExamResultEntityFromJson; + static const toJsonFactory = _$UserExamResultEntityToJson; + Map toJson() => _$UserExamResultEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserExamResultEntityApiResponse { + UserExamResultEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserExamResultEntityApiResponse.fromJson(Map json) => + _$UserExamResultEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + UserExamResultEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserExamResultEntityApiResponseFromJson; + static const toJsonFactory = _$UserExamResultEntityApiResponseToJson; + Map toJson() => + _$UserExamResultEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserGetListQuery { + UserGetListQuery({ + this.sortExpression, + this.pageSize, + this.pageIndex, + this.skip, + this.notSkip, + this.propertyIncludes, + this.status, + this.keyword, + this.roleIds, + this.type, + this.objectId, + }); + + factory UserGetListQuery.fromJson(Map json) => + _$UserGetListQueryFromJson(json); + + @JsonKey(name: 'sortExpression', includeIfNull: true) + String? sortExpression; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'skip', includeIfNull: true) + int? skip; + @JsonKey(name: 'notSkip', includeIfNull: true) + int? notSkip; + @JsonKey( + name: 'propertyIncludes', includeIfNull: true, defaultValue: []) + List? propertyIncludes; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'roleIds', includeIfNull: true, defaultValue: []) + List? roleIds; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + static const fromJsonFactory = _$UserGetListQueryFromJson; + static const toJsonFactory = _$UserGetListQueryToJson; + Map toJson() => _$UserGetListQueryToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserInfoDto { + UserInfoDto({ + this.id, + this.userName, + this.email, + this.phoneNumber, + this.fullName, + this.avatar, + this.lastLoginDate, + this.type, + this.objectId, + }); + + factory UserInfoDto.fromJson(Map json) => + _$UserInfoDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'lastLoginDate', includeIfNull: true) + String? lastLoginDate; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + static const fromJsonFactory = _$UserInfoDtoFromJson; + static const toJsonFactory = _$UserInfoDtoToJson; + Map toJson() => _$UserInfoDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserInfoDtoApiResponse { + UserInfoDtoApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserInfoDtoApiResponse.fromJson(Map json) => + _$UserInfoDtoApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + UserInfoDto? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserInfoDtoApiResponseFromJson; + static const toJsonFactory = _$UserInfoDtoApiResponseToJson; + Map toJson() => _$UserInfoDtoApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserListDto { + UserListDto({ + this.id, + this.userName, + this.avatar, + this.fullName, + this.email, + this.phoneNumber, + this.status, + this.createdDate, + this.roles, + this.type, + this.objectId, + this.objectName, + }); + + factory UserListDto.fromJson(Map json) => + _$UserListDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey(name: 'email', includeIfNull: true) + String? email; + @JsonKey(name: 'phoneNumber', includeIfNull: true) + String? phoneNumber; + @JsonKey(name: 'status', includeIfNull: true) + int? status; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'roles', includeIfNull: true) + String? roles; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'objectId', includeIfNull: true) + int? objectId; + @JsonKey(name: 'objectName', includeIfNull: true) + String? objectName; + static const fromJsonFactory = _$UserListDtoFromJson; + static const toJsonFactory = _$UserListDtoToJson; + Map toJson() => _$UserListDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserListDtoFilterResult { + UserListDtoFilterResult({ + this.totalRows, + this.data, + }); + + factory UserListDtoFilterResult.fromJson(Map json) => + _$UserListDtoFilterResultFromJson(json); + + @JsonKey(name: 'totalRows', includeIfNull: true) + int? totalRows; + @JsonKey(name: 'data', includeIfNull: true, defaultValue: []) + List? data; + static const fromJsonFactory = _$UserListDtoFilterResultFromJson; + static const toJsonFactory = _$UserListDtoFilterResultToJson; + Map toJson() => _$UserListDtoFilterResultToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserListDtoFilterResultApiResponse { + UserListDtoFilterResultApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserListDtoFilterResultApiResponse.fromJson( + Map json) => + _$UserListDtoFilterResultApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + UserListDtoFilterResult? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserListDtoFilterResultApiResponseFromJson; + static const toJsonFactory = _$UserListDtoFilterResultApiResponseToJson; + Map toJson() => + _$UserListDtoFilterResultApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserMobileTokenEntity { + UserMobileTokenEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.deviceToken, + this.os, + this.appId, + }); + + factory UserMobileTokenEntity.fromJson(Map json) => + _$UserMobileTokenEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'deviceToken', includeIfNull: true) + String? deviceToken; + @JsonKey(name: 'os', includeIfNull: true) + String? os; + @JsonKey(name: 'appId', includeIfNull: true) + int? appId; + static const fromJsonFactory = _$UserMobileTokenEntityFromJson; + static const toJsonFactory = _$UserMobileTokenEntityToJson; + Map toJson() => _$UserMobileTokenEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserMobileTokenEntityApiResponse { + UserMobileTokenEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserMobileTokenEntityApiResponse.fromJson( + Map json) => + _$UserMobileTokenEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + UserMobileTokenEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserMobileTokenEntityApiResponseFromJson; + static const toJsonFactory = _$UserMobileTokenEntityApiResponseToJson; + Map toJson() => + _$UserMobileTokenEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserMobileTokenUpdateCommand { + UserMobileTokenUpdateCommand({ + this.token, + }); + + factory UserMobileTokenUpdateCommand.fromJson(Map json) => + _$UserMobileTokenUpdateCommandFromJson(json); + + @JsonKey(name: 'token', includeIfNull: true) + UserMobileTokenEntity? token; + static const fromJsonFactory = _$UserMobileTokenUpdateCommandFromJson; + static const toJsonFactory = _$UserMobileTokenUpdateCommandToJson; + Map toJson() => _$UserMobileTokenUpdateCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWebTokenDeleteCommand { + UserWebTokenDeleteCommand({ + this.id, + }); + + factory UserWebTokenDeleteCommand.fromJson(Map json) => + _$UserWebTokenDeleteCommandFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + static const fromJsonFactory = _$UserWebTokenDeleteCommandFromJson; + static const toJsonFactory = _$UserWebTokenDeleteCommandToJson; + Map toJson() => _$UserWebTokenDeleteCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWebTokenEntity { + UserWebTokenEntity({ + this.id, + this.createdBy, + this.createdDate, + this.lastModifiedBy, + this.lastModifiedDate, + this.isDeleted, + this.userId, + this.pushEndPoint, + this.pushP256DH, + this.pushAuth, + this.appId, + }); + + factory UserWebTokenEntity.fromJson(Map json) => + _$UserWebTokenEntityFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'createdBy', includeIfNull: true) + int? createdBy; + @JsonKey(name: 'createdDate', includeIfNull: true) + DateTime? createdDate; + @JsonKey(name: 'lastModifiedBy', includeIfNull: true) + int? lastModifiedBy; + @JsonKey(name: 'lastModifiedDate', includeIfNull: true) + DateTime? lastModifiedDate; + @JsonKey(name: 'isDeleted', includeIfNull: true) + bool? isDeleted; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'pushEndPoint', includeIfNull: true) + String? pushEndPoint; + @JsonKey(name: 'pushP256DH', includeIfNull: true) + String? pushP256DH; + @JsonKey(name: 'pushAuth', includeIfNull: true) + String? pushAuth; + @JsonKey(name: 'appId', includeIfNull: true) + int? appId; + static const fromJsonFactory = _$UserWebTokenEntityFromJson; + static const toJsonFactory = _$UserWebTokenEntityToJson; + Map toJson() => _$UserWebTokenEntityToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWebTokenEntityApiResponse { + UserWebTokenEntityApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserWebTokenEntityApiResponse.fromJson(Map json) => + _$UserWebTokenEntityApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + UserWebTokenEntity? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserWebTokenEntityApiResponseFromJson; + static const toJsonFactory = _$UserWebTokenEntityApiResponseToJson; + Map toJson() => _$UserWebTokenEntityApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWebTokenUpdateCommand { + UserWebTokenUpdateCommand({ + this.token, + }); + + factory UserWebTokenUpdateCommand.fromJson(Map json) => + _$UserWebTokenUpdateCommandFromJson(json); + + @JsonKey(name: 'token', includeIfNull: true) + UserWebTokenEntity? token; + static const fromJsonFactory = _$UserWebTokenUpdateCommandFromJson; + static const toJsonFactory = _$UserWebTokenUpdateCommandToJson; + Map toJson() => _$UserWebTokenUpdateCommandToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWithSimpleInfoDto { + UserWithSimpleInfoDto({ + this.id, + this.userName, + this.avatar, + this.fullName, + this.type, + this.isOnline, + }); + + factory UserWithSimpleInfoDto.fromJson(Map json) => + _$UserWithSimpleInfoDtoFromJson(json); + + @JsonKey(name: 'id', includeIfNull: true) + int? id; + @JsonKey(name: 'userName', includeIfNull: true) + String? userName; + @JsonKey(name: 'avatar', includeIfNull: true) + String? avatar; + @JsonKey(name: 'fullName', includeIfNull: true) + String? fullName; + @JsonKey( + name: 'type', + includeIfNull: true, + toJson: userTypeEnumToJson, + fromJson: userTypeEnumFromJson) + enums.UserTypeEnum? type; + @JsonKey(name: 'isOnline', includeIfNull: true) + bool? isOnline; + static const fromJsonFactory = _$UserWithSimpleInfoDtoFromJson; + static const toJsonFactory = _$UserWithSimpleInfoDtoToJson; + Map toJson() => _$UserWithSimpleInfoDtoToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserWithSimpleInfoDtoListApiResponse { + UserWithSimpleInfoDtoListApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory UserWithSimpleInfoDtoListApiResponse.fromJson( + Map json) => + _$UserWithSimpleInfoDtoListApiResponseFromJson(json); + + @JsonKey( + name: 'data', + includeIfNull: true, + defaultValue: []) + List? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$UserWithSimpleInfoDtoListApiResponseFromJson; + static const toJsonFactory = _$UserWithSimpleInfoDtoListApiResponseToJson; + Map toJson() => + _$UserWithSimpleInfoDtoListApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class VapidDetails { + VapidDetails({ + this.subject, + this.publicKey, + this.privateKey, + this.expiration, + }); + + factory VapidDetails.fromJson(Map json) => + _$VapidDetailsFromJson(json); + + @JsonKey(name: 'subject', includeIfNull: true) + String? subject; + @JsonKey(name: 'publicKey', includeIfNull: true) + String? publicKey; + @JsonKey(name: 'privateKey', includeIfNull: true) + String? privateKey; + @JsonKey(name: 'expiration', includeIfNull: true) + int? expiration; + static const fromJsonFactory = _$VapidDetailsFromJson; + static const toJsonFactory = _$VapidDetailsToJson; + Map toJson() => _$VapidDetailsToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class VapidDetailsApiResponse { + VapidDetailsApiResponse({ + this.data, + this.message, + this.success, + this.code, + }); + + factory VapidDetailsApiResponse.fromJson(Map json) => + _$VapidDetailsApiResponseFromJson(json); + + @JsonKey(name: 'data', includeIfNull: true) + VapidDetails? data; + @JsonKey(name: 'message', includeIfNull: true) + String? message; + @JsonKey(name: 'success', includeIfNull: true) + bool? success; + @JsonKey( + name: 'code', + includeIfNull: true, + toJson: errorCodeEnumToJson, + fromJson: errorCodeEnumFromJson) + enums.ErrorCodeEnum? code; + static const fromJsonFactory = _$VapidDetailsApiResponseFromJson; + static const toJsonFactory = _$VapidDetailsApiResponseToJson; + Map toJson() => _$VapidDetailsApiResponseToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class WeatherForecast { + WeatherForecast({ + this.date, + this.temperatureC, + this.temperatureF, + this.summary, + }); + + factory WeatherForecast.fromJson(Map json) => + _$WeatherForecastFromJson(json); + + @JsonKey(name: 'date', includeIfNull: true) + DateTime? date; + @JsonKey(name: 'temperatureC', includeIfNull: true) + int? temperatureC; + @JsonKey(name: 'temperatureF', includeIfNull: true) + int? temperatureF; + @JsonKey(name: 'summary', includeIfNull: true) + String? summary; + static const fromJsonFactory = _$WeatherForecastFromJson; + static const toJsonFactory = _$WeatherForecastToJson; + Map toJson() => _$WeatherForecastToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class AiPromptByCodeCodeRequest { + AiPromptByCodeCodeRequest({ + this.code, + this.grade, + this.categoryId, + }); + + factory AiPromptByCodeCodeRequest.fromJson(Map json) => + _$AiPromptByCodeCodeRequestFromJson(json); + + @JsonKey(name: 'code', includeIfNull: true) + String? code; + @JsonKey(name: 'grade', includeIfNull: true) + int? grade; + @JsonKey(name: 'categoryId', includeIfNull: true) + int? categoryId; + static const fromJsonFactory = _$AiPromptByCodeCodeRequestFromJson; + static const toJsonFactory = _$AiPromptByCodeCodeRequestToJson; + Map toJson() => _$AiPromptByCodeCodeRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatListChatGroupOfUserRequest { + ChatListChatGroupOfUserRequest({ + this.keyword, + this.pageIndex, + this.pageSize, + }); + + factory ChatListChatGroupOfUserRequest.fromJson(Map json) => + _$ChatListChatGroupOfUserRequestFromJson(json); + + @JsonKey(name: 'keyword', includeIfNull: true) + String? keyword; + @JsonKey(name: 'pageIndex', includeIfNull: true) + int? pageIndex; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + static const fromJsonFactory = _$ChatListChatGroupOfUserRequestFromJson; + static const toJsonFactory = _$ChatListChatGroupOfUserRequestToJson; + Map toJson() => _$ChatListChatGroupOfUserRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class ChatGetListMessageByGroupidRequest { + ChatGetListMessageByGroupidRequest({ + this.chatGroupId, + this.skipSize, + this.pageSize, + }); + + factory ChatGetListMessageByGroupidRequest.fromJson( + Map json) => + _$ChatGetListMessageByGroupidRequestFromJson(json); + + @JsonKey(name: 'chatGroupId', includeIfNull: true) + int? chatGroupId; + @JsonKey(name: 'skipSize', includeIfNull: true) + int? skipSize; + @JsonKey(name: 'pageSize', includeIfNull: true) + int? pageSize; + static const fromJsonFactory = _$ChatGetListMessageByGroupidRequestFromJson; + static const toJsonFactory = _$ChatGetListMessageByGroupidRequestToJson; + Map toJson() => + _$ChatGetListMessageByGroupidRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilPupilStaticRequest { + PupilPupilStaticRequest({ + this.classId, + this.userId, + this.subjectId, + }); + + factory PupilPupilStaticRequest.fromJson(Map json) => + _$PupilPupilStaticRequestFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + static const fromJsonFactory = _$PupilPupilStaticRequestFromJson; + static const toJsonFactory = _$PupilPupilStaticRequestToJson; + Map toJson() => _$PupilPupilStaticRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class PupilPupilStaticByTypeExamRequest { + PupilPupilStaticByTypeExamRequest({ + this.classId, + this.userId, + this.subjectId, + }); + + factory PupilPupilStaticByTypeExamRequest.fromJson( + Map json) => + _$PupilPupilStaticByTypeExamRequestFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + static const fromJsonFactory = _$PupilPupilStaticByTypeExamRequestFromJson; + static const toJsonFactory = _$PupilPupilStaticByTypeExamRequestToJson; + Map toJson() => + _$PupilPupilStaticByTypeExamRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class TeacherStaticByTypeExamRequest { + TeacherStaticByTypeExamRequest({ + this.classId, + this.userId, + this.subjectId, + }); + + factory TeacherStaticByTypeExamRequest.fromJson(Map json) => + _$TeacherStaticByTypeExamRequestFromJson(json); + + @JsonKey(name: 'classId', includeIfNull: true) + int? classId; + @JsonKey(name: 'userId', includeIfNull: true) + int? userId; + @JsonKey(name: 'subjectId', includeIfNull: true) + int? subjectId; + static const fromJsonFactory = _$TeacherStaticByTypeExamRequestFromJson; + static const toJsonFactory = _$TeacherStaticByTypeExamRequestToJson; + Map toJson() => _$TeacherStaticByTypeExamRequestToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class UserExamResultChangeMarkRequest { + UserExamResultChangeMarkRequest({ + this.userExamResultId, + this.comment, + }); + + factory UserExamResultChangeMarkRequest.fromJson(Map json) => + _$UserExamResultChangeMarkRequestFromJson(json); + + @JsonKey(name: 'userExamResultId', includeIfNull: true) + int? userExamResultId; + @JsonKey(name: 'comment', includeIfNull: true) + String? comment; + static const fromJsonFactory = _$UserExamResultChangeMarkRequestFromJson; + static const toJsonFactory = _$UserExamResultChangeMarkRequestToJson; + Map toJson() => + _$UserExamResultChangeMarkRequestToJson(this); +} + +int? assignExamStatusEnumToJson( + enums.AssignExamStatusEnum? assignExamStatusEnum) { + return assignExamStatusEnum?.index; +} + +enums.AssignExamStatusEnum assignExamStatusEnumFromJson( + int? assignExamStatusEnum) { + if (assignExamStatusEnum == null) { + return enums.AssignExamStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$AssignExamStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + assignExamStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.AssignExamStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List assignExamStatusEnumListToJson( + List? assignExamStatusEnum) { + if (assignExamStatusEnum == null) { + return []; + } + + return assignExamStatusEnum + .map((e) => e.index) //enums.$AssignExamStatusEnumMap[e]! + .toList(); +} + +List assignExamStatusEnumListFromJson( + List? assignExamStatusEnum) { + if (assignExamStatusEnum == null) { + return []; + } + + return assignExamStatusEnum + .map((e) => assignExamStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? assignExamTypeEnumToJson(enums.AssignExamTypeEnum? assignExamTypeEnum) { + return assignExamTypeEnum?.index; +} + +enums.AssignExamTypeEnum assignExamTypeEnumFromJson(int? assignExamTypeEnum) { + if (assignExamTypeEnum == null) { + return enums.AssignExamTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$AssignExamTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + assignExamTypeEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.AssignExamTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List assignExamTypeEnumListToJson( + List? assignExamTypeEnum) { + if (assignExamTypeEnum == null) { + return []; + } + + return assignExamTypeEnum + .map((e) => e.index) //enums.$AssignExamTypeEnumMap[e]! + .toList(); +} + +List assignExamTypeEnumListFromJson( + List? assignExamTypeEnum) { + if (assignExamTypeEnum == null) { + return []; + } + + return assignExamTypeEnum + .map((e) => assignExamTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? assignExamUserStatusEnumToJson( + enums.AssignExamUserStatusEnum? assignExamUserStatusEnum) { + return assignExamUserStatusEnum?.index; +} + +enums.AssignExamUserStatusEnum assignExamUserStatusEnumFromJson( + int? assignExamUserStatusEnum) { + if (assignExamUserStatusEnum == null) { + return enums.AssignExamUserStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$AssignExamUserStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + assignExamUserStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.AssignExamUserStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List assignExamUserStatusEnumListToJson( + List? assignExamUserStatusEnum) { + if (assignExamUserStatusEnum == null) { + return []; + } + + return assignExamUserStatusEnum + .map((e) => e.index) //enums.$AssignExamUserStatusEnumMap[e]! + .toList(); +} + +List assignExamUserStatusEnumListFromJson( + List? assignExamUserStatusEnum) { + if (assignExamUserStatusEnum == null) { + return []; + } + + return assignExamUserStatusEnum + .map((e) => assignExamUserStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? attendanceStatusEnumToJson( + enums.AttendanceStatusEnum? attendanceStatusEnum) { + return attendanceStatusEnum?.index; +} + +enums.AttendanceStatusEnum attendanceStatusEnumFromJson( + int? attendanceStatusEnum) { + if (attendanceStatusEnum == null) { + return enums.AttendanceStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$AttendanceStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + attendanceStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.AttendanceStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List attendanceStatusEnumListToJson( + List? attendanceStatusEnum) { + if (attendanceStatusEnum == null) { + return []; + } + + return attendanceStatusEnum + .map((e) => e.index) //enums.$AttendanceStatusEnumMap[e]! + .toList(); +} + +List attendanceStatusEnumListFromJson( + List? attendanceStatusEnum) { + if (attendanceStatusEnum == null) { + return []; + } + + return attendanceStatusEnum + .map((e) => attendanceStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? classListSearchTypeEnumToJson( + enums.ClassListSearchTypeEnum? classListSearchTypeEnum) { + return classListSearchTypeEnum?.index; +} + +enums.ClassListSearchTypeEnum classListSearchTypeEnumFromJson( + int? classListSearchTypeEnum) { + if (classListSearchTypeEnum == null) { + return enums.ClassListSearchTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ClassListSearchTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + classListSearchTypeEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ClassListSearchTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List classListSearchTypeEnumListToJson( + List? classListSearchTypeEnum) { + if (classListSearchTypeEnum == null) { + return []; + } + + return classListSearchTypeEnum + .map((e) => e.index) //enums.$ClassListSearchTypeEnumMap[e]! + .toList(); +} + +List classListSearchTypeEnumListFromJson( + List? classListSearchTypeEnum) { + if (classListSearchTypeEnum == null) { + return []; + } + + return classListSearchTypeEnum + .map((e) => classListSearchTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? classStatusEnumToJson(enums.ClassStatusEnum? classStatusEnum) { + return classStatusEnum?.index; +} + +enums.ClassStatusEnum classStatusEnumFromJson(int? classStatusEnum) { + if (classStatusEnum == null) { + return enums.ClassStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ClassStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + classStatusEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ClassStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List classStatusEnumListToJson( + List? classStatusEnum) { + if (classStatusEnum == null) { + return []; + } + + return classStatusEnum + .map((e) => e.index) //enums.$ClassStatusEnumMap[e]! + .toList(); +} + +List classStatusEnumListFromJson(List? classStatusEnum) { + if (classStatusEnum == null) { + return []; + } + + return classStatusEnum + .map((e) => classStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? classTypeEnumToJson(enums.ClassTypeEnum? classTypeEnum) { + return classTypeEnum?.index; +} + +enums.ClassTypeEnum classTypeEnumFromJson(int? classTypeEnum) { + if (classTypeEnum == null) { + return enums.ClassTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ClassTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + classTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ClassTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List classTypeEnumListToJson(List? classTypeEnum) { + if (classTypeEnum == null) { + return []; + } + + return classTypeEnum + .map((e) => e.index) //enums.$ClassTypeEnumMap[e]! + .toList(); +} + +List classTypeEnumListFromJson(List? classTypeEnum) { + if (classTypeEnum == null) { + return []; + } + + return classTypeEnum + .map((e) => classTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? classUserRoleEnumToJson(enums.ClassUserRoleEnum? classUserRoleEnum) { + return classUserRoleEnum?.index; +} + +enums.ClassUserRoleEnum classUserRoleEnumFromJson(int? classUserRoleEnum) { + if (classUserRoleEnum == null) { + return enums.ClassUserRoleEnum.swaggerGeneratedUnknown; + } + + return enums.$ClassUserRoleEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + classUserRoleEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ClassUserRoleEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List classUserRoleEnumListToJson( + List? classUserRoleEnum) { + if (classUserRoleEnum == null) { + return []; + } + + return classUserRoleEnum + .map((e) => e.index) //enums.$ClassUserRoleEnumMap[e]! + .toList(); +} + +List classUserRoleEnumListFromJson( + List? classUserRoleEnum) { + if (classUserRoleEnum == null) { + return []; + } + + return classUserRoleEnum + .map((e) => classUserRoleEnumFromJson(e)) //.toString() + .toList(); +} + +int? classUserStatusEnumToJson(enums.ClassUserStatusEnum? classUserStatusEnum) { + return classUserStatusEnum?.index; +} + +enums.ClassUserStatusEnum classUserStatusEnumFromJson( + int? classUserStatusEnum) { + if (classUserStatusEnum == null) { + return enums.ClassUserStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ClassUserStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + classUserStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ClassUserStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List classUserStatusEnumListToJson( + List? classUserStatusEnum) { + if (classUserStatusEnum == null) { + return []; + } + + return classUserStatusEnum + .map((e) => e.index) //enums.$ClassUserStatusEnumMap[e]! + .toList(); +} + +List classUserStatusEnumListFromJson( + List? classUserStatusEnum) { + if (classUserStatusEnum == null) { + return []; + } + + return classUserStatusEnum + .map((e) => classUserStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? commonStatusEnumToJson(enums.CommonStatusEnum? commonStatusEnum) { + return commonStatusEnum?.index; +} + +enums.CommonStatusEnum commonStatusEnumFromJson(int? commonStatusEnum) { + if (commonStatusEnum == null) { + return enums.CommonStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$CommonStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + commonStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.CommonStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List commonStatusEnumListToJson( + List? commonStatusEnum) { + if (commonStatusEnum == null) { + return []; + } + + return commonStatusEnum + .map((e) => e.index) //enums.$CommonStatusEnumMap[e]! + .toList(); +} + +List commonStatusEnumListFromJson( + List? commonStatusEnum) { + if (commonStatusEnum == null) { + return []; + } + + return commonStatusEnum + .map((e) => commonStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? consultationStatusEnumToJson( + enums.ConsultationStatusEnum? consultationStatusEnum) { + return consultationStatusEnum?.index; +} + +enums.ConsultationStatusEnum consultationStatusEnumFromJson( + int? consultationStatusEnum) { + if (consultationStatusEnum == null) { + return enums.ConsultationStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ConsultationStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + consultationStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ConsultationStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List consultationStatusEnumListToJson( + List? consultationStatusEnum) { + if (consultationStatusEnum == null) { + return []; + } + + return consultationStatusEnum + .map((e) => e.index) //enums.$ConsultationStatusEnumMap[e]! + .toList(); +} + +List consultationStatusEnumListFromJson( + List? consultationStatusEnum) { + if (consultationStatusEnum == null) { + return []; + } + + return consultationStatusEnum + .map((e) => consultationStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? contactStatusEnumToJson(enums.ContactStatusEnum? contactStatusEnum) { + return contactStatusEnum?.index; +} + +enums.ContactStatusEnum contactStatusEnumFromJson(int? contactStatusEnum) { + if (contactStatusEnum == null) { + return enums.ContactStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ContactStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + contactStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ContactStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List contactStatusEnumListToJson( + List? contactStatusEnum) { + if (contactStatusEnum == null) { + return []; + } + + return contactStatusEnum + .map((e) => e.index) //enums.$ContactStatusEnumMap[e]! + .toList(); +} + +List contactStatusEnumListFromJson( + List? contactStatusEnum) { + if (contactStatusEnum == null) { + return []; + } + + return contactStatusEnum + .map((e) => contactStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? errorCodeEnumToJson(enums.ErrorCodeEnum? errorCodeEnum) { + return errorCodeEnum?.index; +} + +enums.ErrorCodeEnum errorCodeEnumFromJson(int? errorCodeEnum) { + if (errorCodeEnum == null) { + return enums.ErrorCodeEnum.swaggerGeneratedUnknown; + } + + return enums.$ErrorCodeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + errorCodeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ErrorCodeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List errorCodeEnumListToJson(List? errorCodeEnum) { + if (errorCodeEnum == null) { + return []; + } + + return errorCodeEnum + .map((e) => e.index) //enums.$ErrorCodeEnumMap[e]! + .toList(); +} + +List errorCodeEnumListFromJson(List? errorCodeEnum) { + if (errorCodeEnum == null) { + return []; + } + + return errorCodeEnum + .map((e) => errorCodeEnumFromJson(e)) //.toString() + .toList(); +} + +int? examFileChoiceTypeEnumToJson( + enums.ExamFileChoiceTypeEnum? examFileChoiceTypeEnum) { + return examFileChoiceTypeEnum?.index; +} + +enums.ExamFileChoiceTypeEnum examFileChoiceTypeEnumFromJson( + int? examFileChoiceTypeEnum) { + if (examFileChoiceTypeEnum == null) { + return enums.ExamFileChoiceTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ExamFileChoiceTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + examFileChoiceTypeEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ExamFileChoiceTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List examFileChoiceTypeEnumListToJson( + List? examFileChoiceTypeEnum) { + if (examFileChoiceTypeEnum == null) { + return []; + } + + return examFileChoiceTypeEnum + .map((e) => e.index) //enums.$ExamFileChoiceTypeEnumMap[e]! + .toList(); +} + +List examFileChoiceTypeEnumListFromJson( + List? examFileChoiceTypeEnum) { + if (examFileChoiceTypeEnum == null) { + return []; + } + + return examFileChoiceTypeEnum + .map((e) => examFileChoiceTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? examFormatEnumToJson(enums.ExamFormatEnum? examFormatEnum) { + return examFormatEnum?.index; +} + +enums.ExamFormatEnum examFormatEnumFromJson(int? examFormatEnum) { + if (examFormatEnum == null) { + return enums.ExamFormatEnum.swaggerGeneratedUnknown; + } + + return enums.$ExamFormatEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + examFormatEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ExamFormatEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List examFormatEnumListToJson(List? examFormatEnum) { + if (examFormatEnum == null) { + return []; + } + + return examFormatEnum + .map((e) => e.index) //enums.$ExamFormatEnumMap[e]! + .toList(); +} + +List examFormatEnumListFromJson(List? examFormatEnum) { + if (examFormatEnum == null) { + return []; + } + + return examFormatEnum + .map((e) => examFormatEnumFromJson(e)) //.toString() + .toList(); +} + +int? examStatusEnumToJson(enums.ExamStatusEnum? examStatusEnum) { + return examStatusEnum?.index; +} + +enums.ExamStatusEnum examStatusEnumFromJson(int? examStatusEnum) { + if (examStatusEnum == null) { + return enums.ExamStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ExamStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + examStatusEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ExamStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List examStatusEnumListToJson(List? examStatusEnum) { + if (examStatusEnum == null) { + return []; + } + + return examStatusEnum + .map((e) => e.index) //enums.$ExamStatusEnumMap[e]! + .toList(); +} + +List examStatusEnumListFromJson(List? examStatusEnum) { + if (examStatusEnum == null) { + return []; + } + + return examStatusEnum + .map((e) => examStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? examTypeEnumToJson(enums.ExamTypeEnum? examTypeEnum) { + return examTypeEnum?.index; +} + +enums.ExamTypeEnum examTypeEnumFromJson(int? examTypeEnum) { + if (examTypeEnum == null) { + return enums.ExamTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ExamTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + examTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ExamTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List examTypeEnumListToJson(List? examTypeEnum) { + if (examTypeEnum == null) { + return []; + } + + return examTypeEnum + .map((e) => e.index) //enums.$ExamTypeEnumMap[e]! + .toList(); +} + +List examTypeEnumListFromJson(List? examTypeEnum) { + if (examTypeEnum == null) { + return []; + } + + return examTypeEnum + .map((e) => examTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? fileStatusEnumToJson(enums.FileStatusEnum? fileStatusEnum) { + return fileStatusEnum?.index; +} + +enums.FileStatusEnum fileStatusEnumFromJson(int? fileStatusEnum) { + if (fileStatusEnum == null) { + return enums.FileStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$FileStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + fileStatusEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.FileStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List fileStatusEnumListToJson(List? fileStatusEnum) { + if (fileStatusEnum == null) { + return []; + } + + return fileStatusEnum + .map((e) => e.index) //enums.$FileStatusEnumMap[e]! + .toList(); +} + +List fileStatusEnumListFromJson(List? fileStatusEnum) { + if (fileStatusEnum == null) { + return []; + } + + return fileStatusEnum + .map((e) => fileStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? lessonTypeEnumToJson(enums.LessonTypeEnum? lessonTypeEnum) { + return lessonTypeEnum?.index; +} + +enums.LessonTypeEnum lessonTypeEnumFromJson(int? lessonTypeEnum) { + if (lessonTypeEnum == null) { + return enums.LessonTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$LessonTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + lessonTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.LessonTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List lessonTypeEnumListToJson(List? lessonTypeEnum) { + if (lessonTypeEnum == null) { + return []; + } + + return lessonTypeEnum + .map((e) => e.index) //enums.$LessonTypeEnumMap[e]! + .toList(); +} + +List lessonTypeEnumListFromJson(List? lessonTypeEnum) { + if (lessonTypeEnum == null) { + return []; + } + + return lessonTypeEnum + .map((e) => lessonTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? localityStatusEnumToJson(enums.LocalityStatusEnum? localityStatusEnum) { + return localityStatusEnum?.index; +} + +enums.LocalityStatusEnum localityStatusEnumFromJson(int? localityStatusEnum) { + if (localityStatusEnum == null) { + return enums.LocalityStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$LocalityStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + localityStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.LocalityStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List localityStatusEnumListToJson( + List? localityStatusEnum) { + if (localityStatusEnum == null) { + return []; + } + + return localityStatusEnum + .map((e) => e.index) //enums.$LocalityStatusEnumMap[e]! + .toList(); +} + +List localityStatusEnumListFromJson( + List? localityStatusEnum) { + if (localityStatusEnum == null) { + return []; + } + + return localityStatusEnum + .map((e) => localityStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? localityTypeEnumToJson(enums.LocalityTypeEnum? localityTypeEnum) { + return localityTypeEnum?.index; +} + +enums.LocalityTypeEnum localityTypeEnumFromJson(int? localityTypeEnum) { + if (localityTypeEnum == null) { + return enums.LocalityTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$LocalityTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + localityTypeEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.LocalityTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List localityTypeEnumListToJson( + List? localityTypeEnum) { + if (localityTypeEnum == null) { + return []; + } + + return localityTypeEnum + .map((e) => e.index) //enums.$LocalityTypeEnumMap[e]! + .toList(); +} + +List localityTypeEnumListFromJson( + List? localityTypeEnum) { + if (localityTypeEnum == null) { + return []; + } + + return localityTypeEnum + .map((e) => localityTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? moduleEnumToJson(enums.ModuleEnum? moduleEnum) { + return moduleEnum?.index; +} + +enums.ModuleEnum moduleEnumFromJson(int? moduleEnum) { + if (moduleEnum == null) { + return enums.ModuleEnum.swaggerGeneratedUnknown; + } + + return enums.$ModuleEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + moduleEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ModuleEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List moduleEnumListToJson(List? moduleEnum) { + if (moduleEnum == null) { + return []; + } + + return moduleEnum + .map((e) => e.index) //enums.$ModuleEnumMap[e]! + .toList(); +} + +List moduleEnumListFromJson(List? moduleEnum) { + if (moduleEnum == null) { + return []; + } + + return moduleEnum + .map((e) => moduleEnumFromJson(e)) //.toString() + .toList(); +} + +int? objectTypeEnumToJson(enums.ObjectTypeEnum? objectTypeEnum) { + return objectTypeEnum?.index; +} + +enums.ObjectTypeEnum objectTypeEnumFromJson(int? objectTypeEnum) { + if (objectTypeEnum == null) { + return enums.ObjectTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ObjectTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + objectTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ObjectTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List objectTypeEnumListToJson(List? objectTypeEnum) { + if (objectTypeEnum == null) { + return []; + } + + return objectTypeEnum + .map((e) => e.index) //enums.$ObjectTypeEnumMap[e]! + .toList(); +} + +List objectTypeEnumListFromJson(List? objectTypeEnum) { + if (objectTypeEnum == null) { + return []; + } + + return objectTypeEnum + .map((e) => objectTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? orderStatusEnumToJson(enums.OrderStatusEnum? orderStatusEnum) { + return orderStatusEnum?.index; +} + +enums.OrderStatusEnum orderStatusEnumFromJson(int? orderStatusEnum) { + if (orderStatusEnum == null) { + return enums.OrderStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$OrderStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + orderStatusEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.OrderStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List orderStatusEnumListToJson( + List? orderStatusEnum) { + if (orderStatusEnum == null) { + return []; + } + + return orderStatusEnum + .map((e) => e.index) //enums.$OrderStatusEnumMap[e]! + .toList(); +} + +List orderStatusEnumListFromJson(List? orderStatusEnum) { + if (orderStatusEnum == null) { + return []; + } + + return orderStatusEnum + .map((e) => orderStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? productReviewStatusEnumToJson( + enums.ProductReviewStatusEnum? productReviewStatusEnum) { + return productReviewStatusEnum?.index; +} + +enums.ProductReviewStatusEnum productReviewStatusEnumFromJson( + int? productReviewStatusEnum) { + if (productReviewStatusEnum == null) { + return enums.ProductReviewStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$ProductReviewStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + productReviewStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.ProductReviewStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List productReviewStatusEnumListToJson( + List? productReviewStatusEnum) { + if (productReviewStatusEnum == null) { + return []; + } + + return productReviewStatusEnum + .map((e) => e.index) //enums.$ProductReviewStatusEnumMap[e]! + .toList(); +} + +List productReviewStatusEnumListFromJson( + List? productReviewStatusEnum) { + if (productReviewStatusEnum == null) { + return []; + } + + return productReviewStatusEnum + .map((e) => productReviewStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? productTypeEnumToJson(enums.ProductTypeEnum? productTypeEnum) { + return productTypeEnum?.index; +} + +enums.ProductTypeEnum productTypeEnumFromJson(int? productTypeEnum) { + if (productTypeEnum == null) { + return enums.ProductTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$ProductTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + productTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.ProductTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List productTypeEnumListToJson( + List? productTypeEnum) { + if (productTypeEnum == null) { + return []; + } + + return productTypeEnum + .map((e) => e.index) //enums.$ProductTypeEnumMap[e]! + .toList(); +} + +List productTypeEnumListFromJson(List? productTypeEnum) { + if (productTypeEnum == null) { + return []; + } + + return productTypeEnum + .map((e) => productTypeEnumFromJson(e)) //.toString() + .toList(); +} + +int? questionLevelEnumToJson(enums.QuestionLevelEnum? questionLevelEnum) { + return questionLevelEnum?.index; +} + +enums.QuestionLevelEnum questionLevelEnumFromJson(int? questionLevelEnum) { + if (questionLevelEnum == null) { + return enums.QuestionLevelEnum.swaggerGeneratedUnknown; + } + + return enums.$QuestionLevelEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + questionLevelEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.QuestionLevelEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List questionLevelEnumListToJson( + List? questionLevelEnum) { + if (questionLevelEnum == null) { + return []; + } + + return questionLevelEnum + .map((e) => e.index) //enums.$QuestionLevelEnumMap[e]! + .toList(); +} + +List questionLevelEnumListFromJson( + List? questionLevelEnum) { + if (questionLevelEnum == null) { + return []; + } + + return questionLevelEnum + .map((e) => questionLevelEnumFromJson(e)) //.toString() + .toList(); +} + +int? questionStatusEnumToJson(enums.QuestionStatusEnum? questionStatusEnum) { + return questionStatusEnum?.index; +} + +enums.QuestionStatusEnum questionStatusEnumFromJson(int? questionStatusEnum) { + if (questionStatusEnum == null) { + return enums.QuestionStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$QuestionStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + questionStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.QuestionStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List questionStatusEnumListToJson( + List? questionStatusEnum) { + if (questionStatusEnum == null) { + return []; + } + + return questionStatusEnum + .map((e) => e.index) //enums.$QuestionStatusEnumMap[e]! + .toList(); +} + +List questionStatusEnumListFromJson( + List? questionStatusEnum) { + if (questionStatusEnum == null) { + return []; + } + + return questionStatusEnum + .map((e) => questionStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? schoolStatusEnumToJson(enums.SchoolStatusEnum? schoolStatusEnum) { + return schoolStatusEnum?.index; +} + +enums.SchoolStatusEnum schoolStatusEnumFromJson(int? schoolStatusEnum) { + if (schoolStatusEnum == null) { + return enums.SchoolStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$SchoolStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + schoolStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.SchoolStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List schoolStatusEnumListToJson( + List? schoolStatusEnum) { + if (schoolStatusEnum == null) { + return []; + } + + return schoolStatusEnum + .map((e) => e.index) //enums.$SchoolStatusEnumMap[e]! + .toList(); +} + +List schoolStatusEnumListFromJson( + List? schoolStatusEnum) { + if (schoolStatusEnum == null) { + return []; + } + + return schoolStatusEnum + .map((e) => schoolStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? sessionStatusEnumToJson(enums.SessionStatusEnum? sessionStatusEnum) { + return sessionStatusEnum?.index; +} + +enums.SessionStatusEnum sessionStatusEnumFromJson(int? sessionStatusEnum) { + if (sessionStatusEnum == null) { + return enums.SessionStatusEnum.swaggerGeneratedUnknown; + } + + return enums.$SessionStatusEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + sessionStatusEnum.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.SessionStatusEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List sessionStatusEnumListToJson( + List? sessionStatusEnum) { + if (sessionStatusEnum == null) { + return []; + } + + return sessionStatusEnum + .map((e) => e.index) //enums.$SessionStatusEnumMap[e]! + .toList(); +} + +List sessionStatusEnumListFromJson( + List? sessionStatusEnum) { + if (sessionStatusEnum == null) { + return []; + } + + return sessionStatusEnum + .map((e) => sessionStatusEnumFromJson(e)) //.toString() + .toList(); +} + +int? userExamResultStatusToJson( + enums.UserExamResultStatus? userExamResultStatus) { + return userExamResultStatus?.index; +} + +enums.UserExamResultStatus userExamResultStatusFromJson( + int? userExamResultStatus) { + if (userExamResultStatus == null) { + return enums.UserExamResultStatus.swaggerGeneratedUnknown; + } + + return enums.$UserExamResultStatusMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + userExamResultStatus.toString().toLowerCase(), + orElse: () => const MapEntry( + enums.UserExamResultStatus.swaggerGeneratedUnknown, '')) + .key; +} + +List userExamResultStatusListToJson( + List? userExamResultStatus) { + if (userExamResultStatus == null) { + return []; + } + + return userExamResultStatus + .map((e) => e.index) //enums.$UserExamResultStatusMap[e]! + .toList(); +} + +List userExamResultStatusListFromJson( + List? userExamResultStatus) { + if (userExamResultStatus == null) { + return []; + } + + return userExamResultStatus + .map((e) => userExamResultStatusFromJson(e)) //.toString() + .toList(); +} + +int? userTypeEnumToJson(enums.UserTypeEnum? userTypeEnum) { + return userTypeEnum?.index; +} + +enums.UserTypeEnum userTypeEnumFromJson(int? userTypeEnum) { + if (userTypeEnum == null) { + return enums.UserTypeEnum.swaggerGeneratedUnknown; + } + + return enums.$UserTypeEnumMap.entries + .firstWhere( + (element) => + element.value.toString().toLowerCase() == + userTypeEnum.toString().toLowerCase(), + orElse: () => + const MapEntry(enums.UserTypeEnum.swaggerGeneratedUnknown, '')) + .key; +} + +List userTypeEnumListToJson(List? userTypeEnum) { + if (userTypeEnum == null) { + return []; + } + + return userTypeEnum + .map((e) => e.index) //enums.$UserTypeEnumMap[e]! + .toList(); +} + +List userTypeEnumListFromJson(List? userTypeEnum) { + if (userTypeEnum == null) { + return []; + } + + return userTypeEnum + .map((e) => userTypeEnumFromJson(e)) //.toString() + .toList(); +} diff --git a/lib/features/repositories/hra_repository_models.g.dart b/lib/features/repositories/hra_repository_models.g.dart new file mode 100644 index 0000000..4c73253 --- /dev/null +++ b/lib/features/repositories/hra_repository_models.g.dart @@ -0,0 +1,11446 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hra_repository_models.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AcademicYearEntity _$AcademicYearEntityFromJson(Map json) => + AcademicYearEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + schoolId: (json['schoolId'] as num?)?.toInt(), + startPeriod1: json['startPeriod1'] == null + ? null + : DateTime.parse(json['startPeriod1'] as String), + startPeriod2: json['startPeriod2'] == null + ? null + : DateTime.parse(json['startPeriod2'] as String), + end: json['end'] == null ? null : DateTime.parse(json['end'] as String), + name: json['name'] as String?, + ); + +Map _$AcademicYearEntityToJson(AcademicYearEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'schoolId': instance.schoolId, + 'startPeriod1': instance.startPeriod1?.toIso8601String(), + 'startPeriod2': instance.startPeriod2?.toIso8601String(), + 'end': instance.end?.toIso8601String(), + 'name': instance.name, + }; + +AcademicYearEntityApiResponse _$AcademicYearEntityApiResponseFromJson( + Map json) => + AcademicYearEntityApiResponse( + data: json['data'] == null + ? null + : AcademicYearEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AcademicYearEntityApiResponseToJson( + AcademicYearEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AcademicYearEntityListApiResponse _$AcademicYearEntityListApiResponseFromJson( + Map json) => + AcademicYearEntityListApiResponse( + data: (json['data'] as List?) + ?.map( + (e) => AcademicYearEntity.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AcademicYearEntityListApiResponseToJson( + AcademicYearEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ActivityEntity _$ActivityEntityFromJson(Map json) => + ActivityEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + description: json['description'] as String?, + videoUrl: json['videoUrl'] as String?, + tag: json['tag'] as String?, + type: json['type'] as String?, + imageUrl: json['imageUrl'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + displayOrder: (json['displayOrder'] as num?)?.toInt(), + ); + +Map _$ActivityEntityToJson(ActivityEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'description': instance.description, + 'videoUrl': instance.videoUrl, + 'tag': instance.tag, + 'type': instance.type, + 'imageUrl': instance.imageUrl, + 'status': commonStatusEnumToJson(instance.status), + 'displayOrder': instance.displayOrder, + }; + +ActivityEntityApiResponse _$ActivityEntityApiResponseFromJson( + Map json) => + ActivityEntityApiResponse( + data: json['data'] == null + ? null + : ActivityEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ActivityEntityApiResponseToJson( + ActivityEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ActivityGetListQuery _$ActivityGetListQueryFromJson( + Map json) => + ActivityGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + tag: json['tag'] as String?, + type: json['type'] as String?, + ); + +Map _$ActivityGetListQueryToJson( + ActivityGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'status': commonStatusEnumToJson(instance.status), + 'tag': instance.tag, + 'type': instance.type, + }; + +ActivityListDto _$ActivityListDtoFromJson(Map json) => + ActivityListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + description: json['description'] as String?, + videoUrl: json['videoUrl'] as String?, + tag: json['tag'] as String?, + type: json['type'] as String?, + imageUrl: json['imageUrl'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + displayOrder: (json['displayOrder'] as num?)?.toInt(), + ); + +Map _$ActivityListDtoToJson(ActivityListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'description': instance.description, + 'videoUrl': instance.videoUrl, + 'tag': instance.tag, + 'type': instance.type, + 'imageUrl': instance.imageUrl, + 'status': commonStatusEnumToJson(instance.status), + 'displayOrder': instance.displayOrder, + }; + +ActivityListDtoFilterResult _$ActivityListDtoFilterResultFromJson( + Map json) => + ActivityListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ActivityListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ActivityListDtoFilterResultToJson( + ActivityListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ActivityListDtoFilterResultApiResponse + _$ActivityListDtoFilterResultApiResponseFromJson( + Map json) => + ActivityListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ActivityListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ActivityListDtoFilterResultApiResponseToJson( + ActivityListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ActivityLogEntity _$ActivityLogEntityFromJson(Map json) => + ActivityLogEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + data: json['data'] as String?, + objectType: json['objectType'] as String?, + ip: json['ip'] as String?, + ); + +Map _$ActivityLogEntityToJson(ActivityLogEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'data': instance.data, + 'objectType': instance.objectType, + 'ip': instance.ip, + }; + +ActivityLogEntityApiResponse _$ActivityLogEntityApiResponseFromJson( + Map json) => + ActivityLogEntityApiResponse( + data: json['data'] == null + ? null + : ActivityLogEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ActivityLogEntityApiResponseToJson( + ActivityLogEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ActivitySaveDto _$ActivitySaveDtoFromJson(Map json) => + ActivitySaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + description: json['description'] as String?, + videoUrl: json['videoUrl'] as String?, + tag: json['tag'] as String?, + type: json['type'] as String?, + imageUrl: json['imageUrl'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + displayOrder: (json['displayOrder'] as num?)?.toInt(), + ); + +Map _$ActivitySaveDtoToJson(ActivitySaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'description': instance.description, + 'videoUrl': instance.videoUrl, + 'tag': instance.tag, + 'type': instance.type, + 'imageUrl': instance.imageUrl, + 'status': commonStatusEnumToJson(instance.status), + 'displayOrder': instance.displayOrder, + }; + +ActivitySaveDtoApiResponse _$ActivitySaveDtoApiResponseFromJson( + Map json) => + ActivitySaveDtoApiResponse( + data: json['data'] == null + ? null + : ActivitySaveDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ActivitySaveDtoApiResponseToJson( + ActivitySaveDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AiChatRequest _$AiChatRequestFromJson(Map json) => + AiChatRequest( + systemPrompt: json['systemPrompt'] as String?, + userMessage: json['userMessage'] as String?, + userMessageContent: (json['userMessageContent'] as List?) + ?.map((e) => AiMessageContent.fromJson(e as Map)) + .toList() ?? + [], + model: json['model'] as String?, + temperature: (json['temperature'] as num?)?.toDouble(), + maxTokens: (json['maxTokens'] as num?)?.toInt(), + ); + +Map _$AiChatRequestToJson(AiChatRequest instance) => + { + 'systemPrompt': instance.systemPrompt, + 'userMessage': instance.userMessage, + 'userMessageContent': + instance.userMessageContent?.map((e) => e.toJson()).toList(), + 'model': instance.model, + 'temperature': instance.temperature, + 'maxTokens': instance.maxTokens, + }; + +AiMessageContent _$AiMessageContentFromJson(Map json) => + AiMessageContent( + type: json['type'] as String?, + ); + +Map _$AiMessageContentToJson(AiMessageContent instance) => + { + 'type': instance.type, + }; + +AiPromptEntity _$AiPromptEntityFromJson(Map json) => + AiPromptEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + grade: (json['grade'] as num?)?.toInt(), + categoryId: (json['categoryId'] as num?)?.toInt(), + code: json['code'] as String?, + name: json['name'] as String?, + description: json['description'] as String?, + prompt: json['prompt'] as String?, + category: json['category'] == null + ? null + : CategoryEntity.fromJson(json['category'] as Map), + ); + +Map _$AiPromptEntityToJson(AiPromptEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'grade': instance.grade, + 'categoryId': instance.categoryId, + 'code': instance.code, + 'name': instance.name, + 'description': instance.description, + 'prompt': instance.prompt, + 'category': instance.category?.toJson(), + }; + +AiPromptEntityApiResponse _$AiPromptEntityApiResponseFromJson( + Map json) => + AiPromptEntityApiResponse( + data: json['data'] == null + ? null + : AiPromptEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AiPromptEntityApiResponseToJson( + AiPromptEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AiPromptGetListQuery _$AiPromptGetListQueryFromJson( + Map json) => + AiPromptGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + code: json['code'] as String?, + grade: (json['grade'] as num?)?.toInt(), + categoryId: (json['categoryId'] as num?)?.toInt(), + ); + +Map _$AiPromptGetListQueryToJson( + AiPromptGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'code': instance.code, + 'grade': instance.grade, + 'categoryId': instance.categoryId, + }; + +AiPromptListDto _$AiPromptListDtoFromJson(Map json) => + AiPromptListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + grade: (json['grade'] as num?)?.toInt(), + categoryId: (json['categoryId'] as num?)?.toInt(), + code: json['code'] as String?, + name: json['name'] as String?, + description: json['description'] as String?, + prompt: json['prompt'] as String?, + category: json['category'] == null + ? null + : CategoryEntity.fromJson(json['category'] as Map), + categoryName: json['categoryName'] as String?, + ); + +Map _$AiPromptListDtoToJson(AiPromptListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'grade': instance.grade, + 'categoryId': instance.categoryId, + 'code': instance.code, + 'name': instance.name, + 'description': instance.description, + 'prompt': instance.prompt, + 'category': instance.category?.toJson(), + 'categoryName': instance.categoryName, + }; + +AiPromptListDtoFilterResult _$AiPromptListDtoFilterResultFromJson( + Map json) => + AiPromptListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => AiPromptListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$AiPromptListDtoFilterResultToJson( + AiPromptListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +AiPromptListDtoFilterResultApiResponse + _$AiPromptListDtoFilterResultApiResponseFromJson( + Map json) => + AiPromptListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : AiPromptListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AiPromptListDtoFilterResultApiResponseToJson( + AiPromptListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AiPromptRequest _$AiPromptRequestFromJson(Map json) => + AiPromptRequest( + promptCode: json['promptCode'] as String?, + grade: (json['grade'] as num?)?.toInt(), + categoryId: (json['categoryId'] as num?)?.toInt(), + variables: json['variables'], + userMessage: json['userMessage'] as String?, + userMessageContent: (json['userMessageContent'] as List?) + ?.map((e) => AiMessageContent.fromJson(e as Map)) + .toList() ?? + [], + model: json['model'] as String?, + temperature: (json['temperature'] as num?)?.toDouble(), + maxTokens: (json['maxTokens'] as num?)?.toInt(), + ); + +Map _$AiPromptRequestToJson(AiPromptRequest instance) => + { + 'promptCode': instance.promptCode, + 'grade': instance.grade, + 'categoryId': instance.categoryId, + 'variables': instance.variables, + 'userMessage': instance.userMessage, + 'userMessageContent': + instance.userMessageContent?.map((e) => e.toJson()).toList(), + 'model': instance.model, + 'temperature': instance.temperature, + 'maxTokens': instance.maxTokens, + }; + +AiResponse _$AiResponseFromJson(Map json) => AiResponse( + success: json['success'] as bool?, + content: json['content'] as String?, + error: json['error'] as String?, + model: json['model'] as String?, + promptTokens: (json['promptTokens'] as num?)?.toInt(), + completionTokens: (json['completionTokens'] as num?)?.toInt(), + totalTokens: (json['totalTokens'] as num?)?.toInt(), + ); + +Map _$AiResponseToJson(AiResponse instance) => + { + 'success': instance.success, + 'content': instance.content, + 'error': instance.error, + 'model': instance.model, + 'promptTokens': instance.promptTokens, + 'completionTokens': instance.completionTokens, + 'totalTokens': instance.totalTokens, + }; + +AiResponseApiResponse _$AiResponseApiResponseFromJson( + Map json) => + AiResponseApiResponse( + data: json['data'] == null + ? null + : AiResponse.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AiResponseApiResponseToJson( + AiResponseApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamAddDto _$AssignExamAddDtoFromJson(Map json) => + AssignExamAddDto( + id: (json['id'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + title: json['title'] as String?, + examId: (json['examId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + allowDeadline: json['allowDeadline'] as bool?, + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + allowViewAnswer: json['allowViewAnswer'] as bool?, + duration: (json['duration'] as num?)?.toInt(), + ); + +Map _$AssignExamAddDtoToJson(AssignExamAddDto instance) => + { + 'id': instance.id, + 'classId': instance.classId, + 'title': instance.title, + 'examId': instance.examId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'allowDeadline': instance.allowDeadline, + 'status': assignExamStatusEnumToJson(instance.status), + 'type': assignExamTypeEnumToJson(instance.type), + 'allowViewAnswer': instance.allowViewAnswer, + 'duration': instance.duration, + }; + +AssignExamAddMultipleDto _$AssignExamAddMultipleDtoFromJson( + Map json) => + AssignExamAddMultipleDto( + classes: (json['classes'] as List?) + ?.map((e) => ClassShortDto.fromJson(e as Map)) + .toList() ?? + [], + assignExam: json['assignExam'] == null + ? null + : AssignExamAddDto.fromJson( + json['assignExam'] as Map), + ); + +Map _$AssignExamAddMultipleDtoToJson( + AssignExamAddMultipleDto instance) => + { + 'classes': instance.classes?.map((e) => e.toJson()).toList(), + 'assignExam': instance.assignExam?.toJson(), + }; + +AssignExamCheckDoExamDto _$AssignExamCheckDoExamDtoFromJson( + Map json) => + AssignExamCheckDoExamDto( + message: json['message'] as String?, + isCanViewResult: json['isCanViewResult'] as bool?, + classId: (json['classId'] as num?)?.toInt(), + ); + +Map _$AssignExamCheckDoExamDtoToJson( + AssignExamCheckDoExamDto instance) => + { + 'message': instance.message, + 'isCanViewResult': instance.isCanViewResult, + 'classId': instance.classId, + }; + +AssignExamCheckDoExamDtoApiResponse + _$AssignExamCheckDoExamDtoApiResponseFromJson(Map json) => + AssignExamCheckDoExamDtoApiResponse( + data: json['data'] == null + ? null + : AssignExamCheckDoExamDto.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamCheckDoExamDtoApiResponseToJson( + AssignExamCheckDoExamDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamCountDto _$AssignExamCountDtoFromJson(Map json) => + AssignExamCountDto( + countExam: (json['countExam'] as num?)?.toInt(), + countTest: (json['countTest'] as num?)?.toInt(), + countExercise: (json['countExercise'] as num?)?.toInt(), + ); + +Map _$AssignExamCountDtoToJson(AssignExamCountDto instance) => + { + 'countExam': instance.countExam, + 'countTest': instance.countTest, + 'countExercise': instance.countExercise, + }; + +AssignExamCountDtoApiResponse _$AssignExamCountDtoApiResponseFromJson( + Map json) => + AssignExamCountDtoApiResponse( + data: json['data'] == null + ? null + : AssignExamCountDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamCountDtoApiResponseToJson( + AssignExamCountDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamDetailDto _$AssignExamDetailDtoFromJson(Map json) => + AssignExamDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + classId: (json['classId'] as num?)?.toInt(), + examId: (json['examId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + allowDeadline: json['allowDeadline'] as bool?, + allowViewAnswer: json['allowViewAnswer'] as bool?, + duration: (json['duration'] as num?)?.toInt(), + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + assignExamUsers: (json['assignExamUsers'] as List?) + ?.map((e) => + AssignExamUserEntity.fromJson(e as Map)) + .toList() ?? + [], + subject: json['subject'] as String?, + questionCount: (json['questionCount'] as num?)?.toInt(), + canEdit: json['canEdit'] as bool?, + ); + +Map _$AssignExamDetailDtoToJson( + AssignExamDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'classId': instance.classId, + 'examId': instance.examId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'allowDeadline': instance.allowDeadline, + 'allowViewAnswer': instance.allowViewAnswer, + 'duration': instance.duration, + 'status': assignExamStatusEnumToJson(instance.status), + 'type': assignExamTypeEnumToJson(instance.type), + 'assignExamUsers': + instance.assignExamUsers?.map((e) => e.toJson()).toList(), + 'subject': instance.subject, + 'questionCount': instance.questionCount, + 'canEdit': instance.canEdit, + }; + +AssignExamDoneDto _$AssignExamDoneDtoFromJson(Map json) => + AssignExamDoneDto( + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + mark: (json['mark'] as num?)?.toDouble(), + totalMark: (json['totalMark'] as num?)?.toDouble(), + examId: (json['examId'] as num?)?.toInt(), + examResultId: (json['examResultId'] as num?)?.toInt(), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$AssignExamDoneDtoToJson(AssignExamDoneDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'endDate': instance.endDate?.toIso8601String(), + 'mark': instance.mark, + 'totalMark': instance.totalMark, + 'examId': instance.examId, + 'examResultId': instance.examResultId, + 'status': assignExamUserStatusEnumToJson(instance.status), + }; + +AssignExamDoneDtoListApiResponse _$AssignExamDoneDtoListApiResponseFromJson( + Map json) => + AssignExamDoneDtoListApiResponse( + data: (json['data'] as List?) + ?.map( + (e) => AssignExamDoneDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamDoneDtoListApiResponseToJson( + AssignExamDoneDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamEditDto _$AssignExamEditDtoFromJson(Map json) => + AssignExamEditDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + classId: (json['classId'] as num?)?.toInt(), + examId: (json['examId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + allowDeadline: json['allowDeadline'] as bool?, + allowViewAnswer: json['allowViewAnswer'] as bool?, + duration: (json['duration'] as num?)?.toInt(), + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + assignExamUsers: (json['assignExamUsers'] as List?) + ?.map((e) => + AssignExamUserEntity.fromJson(e as Map)) + .toList() ?? + [], + assignUsers: (json['assignUsers'] as List?) + ?.map((e) => + AssignExamUserEditDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$AssignExamEditDtoToJson(AssignExamEditDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'classId': instance.classId, + 'examId': instance.examId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'allowDeadline': instance.allowDeadline, + 'allowViewAnswer': instance.allowViewAnswer, + 'duration': instance.duration, + 'status': assignExamStatusEnumToJson(instance.status), + 'type': assignExamTypeEnumToJson(instance.type), + 'assignExamUsers': + instance.assignExamUsers?.map((e) => e.toJson()).toList(), + 'assignUsers': instance.assignUsers?.map((e) => e.toJson()).toList(), + }; + +AssignExamEntity _$AssignExamEntityFromJson(Map json) => + AssignExamEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + classId: (json['classId'] as num?)?.toInt(), + examId: (json['examId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + allowDeadline: json['allowDeadline'] as bool?, + allowViewAnswer: json['allowViewAnswer'] as bool?, + duration: (json['duration'] as num?)?.toInt(), + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + assignExamUsers: (json['assignExamUsers'] as List?) + ?.map((e) => + AssignExamUserEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$AssignExamEntityToJson(AssignExamEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'classId': instance.classId, + 'examId': instance.examId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'allowDeadline': instance.allowDeadline, + 'allowViewAnswer': instance.allowViewAnswer, + 'duration': instance.duration, + 'status': assignExamStatusEnumToJson(instance.status), + 'type': assignExamTypeEnumToJson(instance.type), + 'assignExamUsers': + instance.assignExamUsers?.map((e) => e.toJson()).toList(), + }; + +AssignExamListByClassQuery _$AssignExamListByClassQueryFromJson( + Map json) => + AssignExamListByClassQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + subjectId: (json['subjectId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + classId: (json['classId'] as num?)?.toInt(), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + userId: (json['userId'] as num?)?.toInt(), + isGetAll: json['isGetAll'] as bool?, + status: (json['status'] as num?)?.toInt(), + ); + +Map _$AssignExamListByClassQueryToJson( + AssignExamListByClassQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'subjectId': instance.subjectId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'classId': instance.classId, + 'type': assignExamTypeEnumToJson(instance.type), + 'userId': instance.userId, + 'isGetAll': instance.isGetAll, + 'status': instance.status, + }; + +AssignExamListByExamIdDto _$AssignExamListByExamIdDtoFromJson( + Map json) => + AssignExamListByExamIdDto( + id: (json['id'] as num?)?.toInt(), + examId: (json['examId'] as num?)?.toInt(), + className: json['className'] as String?, + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + countPupilDone: (json['countPupilDone'] as num?)?.toInt(), + countPupil: (json['countPupil'] as num?)?.toInt(), + countNeedMark: (json['countNeedMark'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + ); + +Map _$AssignExamListByExamIdDtoToJson( + AssignExamListByExamIdDto instance) => + { + 'id': instance.id, + 'examId': instance.examId, + 'className': instance.className, + 'type': assignExamTypeEnumToJson(instance.type), + 'fromDate': instance.fromDate?.toIso8601String(), + 'countPupilDone': instance.countPupilDone, + 'countPupil': instance.countPupil, + 'countNeedMark': instance.countNeedMark, + 'classId': instance.classId, + 'createdBy': instance.createdBy, + }; + +AssignExamListByExamIdDtoFilterResult + _$AssignExamListByExamIdDtoFilterResultFromJson( + Map json) => + AssignExamListByExamIdDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => AssignExamListByExamIdDto.fromJson( + e as Map)) + .toList() ?? + [], + ); + +Map _$AssignExamListByExamIdDtoFilterResultToJson( + AssignExamListByExamIdDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +AssignExamListByExamIdFilterDto _$AssignExamListByExamIdFilterDtoFromJson( + Map json) => + AssignExamListByExamIdFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + examId: (json['examId'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + classId: (json['classId'] as num?)?.toInt(), + ); + +Map _$AssignExamListByExamIdFilterDtoToJson( + AssignExamListByExamIdFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'examId': instance.examId, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'type': assignExamTypeEnumToJson(instance.type), + 'classId': instance.classId, + }; + +AssignExamListDto _$AssignExamListDtoFromJson(Map json) => + AssignExamListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + classId: (json['classId'] as num?)?.toInt(), + title: json['title'] as String?, + subjectId: (json['subjectId'] as num?)?.toInt(), + subject: json['subject'] as String?, + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + isHot: json['isHot'] as bool?, + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + countPupil: (json['countPupil'] as num?)?.toInt(), + countPupilDone: (json['countPupilDone'] as num?)?.toInt(), + isOwner: json['isOwner'] as bool?, + isTeacher: json['isTeacher'] as bool?, + examId: (json['examId'] as num?)?.toInt(), + mark: (json['mark'] as num?)?.toDouble(), + userStatus: assignExamUserStatusEnumFromJson( + (json['userStatus'] as num?)?.toInt()), + examResultId: (json['examResultId'] as num?)?.toInt(), + allowViewAnswer: json['allowViewAnswer'] as bool?, + pupilSubmissionTime: json['pupilSubmissionTime'] == null + ? null + : DateTime.parse(json['pupilSubmissionTime'] as String), + countNeedMark: (json['countNeedMark'] as num?)?.toInt(), + duration: (json['duration'] as num?)?.toInt(), + ); + +Map _$AssignExamListDtoToJson(AssignExamListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'classId': instance.classId, + 'title': instance.title, + 'subjectId': instance.subjectId, + 'subject': instance.subject, + 'fromDate': instance.fromDate?.toIso8601String(), + 'isHot': instance.isHot, + 'toDate': instance.toDate?.toIso8601String(), + 'status': assignExamStatusEnumToJson(instance.status), + 'countPupil': instance.countPupil, + 'countPupilDone': instance.countPupilDone, + 'isOwner': instance.isOwner, + 'isTeacher': instance.isTeacher, + 'examId': instance.examId, + 'mark': instance.mark, + 'userStatus': assignExamUserStatusEnumToJson(instance.userStatus), + 'examResultId': instance.examResultId, + 'allowViewAnswer': instance.allowViewAnswer, + 'pupilSubmissionTime': instance.pupilSubmissionTime?.toIso8601String(), + 'countNeedMark': instance.countNeedMark, + 'duration': instance.duration, + }; + +AssignExamListDtoFilterResult _$AssignExamListDtoFilterResultFromJson( + Map json) => + AssignExamListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map( + (e) => AssignExamListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$AssignExamListDtoFilterResultToJson( + AssignExamListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +AssignExamListExamDto _$AssignExamListExamDtoFromJson( + Map json) => + AssignExamListExamDto( + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + subject: json['subject'] as String?, + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + ); + +Map _$AssignExamListExamDtoToJson( + AssignExamListExamDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'subject': instance.subject, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'status': assignExamStatusEnumToJson(instance.status), + 'type': assignExamTypeEnumToJson(instance.type), + }; + +AssignExamListExamDtoFilterResult _$AssignExamListExamDtoFilterResultFromJson( + Map json) => + AssignExamListExamDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => + AssignExamListExamDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$AssignExamListExamDtoFilterResultToJson( + AssignExamListExamDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +AssignExamListExamDtoFilterResultApiResponse + _$AssignExamListExamDtoFilterResultApiResponseFromJson( + Map json) => + AssignExamListExamDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : AssignExamListExamDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamListExamDtoFilterResultApiResponseToJson( + AssignExamListExamDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamListExamFilterDto _$AssignExamListExamFilterDtoFromJson( + Map json) => + AssignExamListExamFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + userId: (json['userId'] as num?)?.toInt(), + userStatus: assignExamUserStatusEnumFromJson( + (json['userStatus'] as num?)?.toInt()), + ); + +Map _$AssignExamListExamFilterDtoToJson( + AssignExamListExamFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'userId': instance.userId, + 'userStatus': assignExamUserStatusEnumToJson(instance.userStatus), + }; + +AssignExamListUserDto _$AssignExamListUserDtoFromJson( + Map json) => + AssignExamListUserDto( + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + examResultId: (json['examResultId'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + mark: (json['mark'] as num?)?.toDouble(), + duration: (json['duration'] as num?)?.toInt(), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + note: json['note'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + overdue: json['overdue'] as bool?, + timeMarking: json['timeMarking'] == null + ? null + : DateTime.parse(json['timeMarking'] as String), + ); + +Map _$AssignExamListUserDtoToJson( + AssignExamListUserDto instance) => + { + 'assignExamId': instance.assignExamId, + 'userId': instance.userId, + 'status': assignExamUserStatusEnumToJson(instance.status), + 'examResultId': instance.examResultId, + 'startDate': instance.startDate?.toIso8601String(), + 'mark': instance.mark, + 'duration': instance.duration, + 'endDate': instance.endDate?.toIso8601String(), + 'note': instance.note, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'overdue': instance.overdue, + 'timeMarking': instance.timeMarking?.toIso8601String(), + }; + +AssignExamListUserFilterDto _$AssignExamListUserFilterDtoFromJson( + Map json) => + AssignExamListUserFilterDto( + keyword: json['keyword'] as String?, + id: (json['id'] as num?)?.toInt(), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + sortExpression: json['sortExpression'] as String?, + ); + +Map _$AssignExamListUserFilterDtoToJson( + AssignExamListUserFilterDto instance) => + { + 'keyword': instance.keyword, + 'id': instance.id, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'status': assignExamUserStatusEnumToJson(instance.status), + 'sortExpression': instance.sortExpression, + }; + +AssignExamNeedDoDto _$AssignExamNeedDoDtoFromJson(Map json) => + AssignExamNeedDoDto( + examId: (json['examId'] as num?)?.toInt(), + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + subjectId: (json['subjectId'] as num?)?.toInt(), + subject: json['subject'] as String?, + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + duration: (json['duration'] as num?)?.toInt(), + ); + +Map _$AssignExamNeedDoDtoToJson( + AssignExamNeedDoDto instance) => + { + 'examId': instance.examId, + 'id': instance.id, + 'title': instance.title, + 'subjectId': instance.subjectId, + 'subject': instance.subject, + 'toDate': instance.toDate?.toIso8601String(), + 'type': assignExamTypeEnumToJson(instance.type), + 'duration': instance.duration, + }; + +AssignExamNeedDoDtoListApiResponse _$AssignExamNeedDoDtoListApiResponseFromJson( + Map json) => + AssignExamNeedDoDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => + AssignExamNeedDoDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamNeedDoDtoListApiResponseToJson( + AssignExamNeedDoDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamScoreDistributionDto _$AssignExamScoreDistributionDtoFromJson( + Map json) => + AssignExamScoreDistributionDto( + scoreName: json['scoreName'] as String?, + count: (json['count'] as num?)?.toInt(), + ); + +Map _$AssignExamScoreDistributionDtoToJson( + AssignExamScoreDistributionDto instance) => + { + 'scoreName': instance.scoreName, + 'count': instance.count, + }; + +AssignExamScoreDistributionDtoListApiResponse + _$AssignExamScoreDistributionDtoListApiResponseFromJson( + Map json) => + AssignExamScoreDistributionDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => AssignExamScoreDistributionDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamScoreDistributionDtoListApiResponseToJson( + AssignExamScoreDistributionDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamTopDifficultQuestionDto _$AssignExamTopDifficultQuestionDtoFromJson( + Map json) => + AssignExamTopDifficultQuestionDto( + questionId: (json['questionId'] as num?)?.toInt(), + question: json['question'] as String?, + count: (json['count'] as num?)?.toInt(), + ); + +Map _$AssignExamTopDifficultQuestionDtoToJson( + AssignExamTopDifficultQuestionDto instance) => + { + 'questionId': instance.questionId, + 'question': instance.question, + 'count': instance.count, + }; + +AssignExamTopDifficultQuestionDtoListApiResponse + _$AssignExamTopDifficultQuestionDtoListApiResponseFromJson( + Map json) => + AssignExamTopDifficultQuestionDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => AssignExamTopDifficultQuestionDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$AssignExamTopDifficultQuestionDtoListApiResponseToJson( + AssignExamTopDifficultQuestionDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +AssignExamUpdateNoteDto _$AssignExamUpdateNoteDtoFromJson( + Map json) => + AssignExamUpdateNoteDto( + id: (json['id'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + note: json['note'] as String?, + ); + +Map _$AssignExamUpdateNoteDtoToJson( + AssignExamUpdateNoteDto instance) => + { + 'id': instance.id, + 'userId': instance.userId, + 'note': instance.note, + }; + +AssignExamUpdateTimeDto _$AssignExamUpdateTimeDtoFromJson( + Map json) => + AssignExamUpdateTimeDto( + id: (json['id'] as num?)?.toInt(), + time: + json['time'] == null ? null : DateTime.parse(json['time'] as String), + ); + +Map _$AssignExamUpdateTimeDtoToJson( + AssignExamUpdateTimeDto instance) => + { + 'id': instance.id, + 'time': instance.time?.toIso8601String(), + }; + +AssignExamUserEditDto _$AssignExamUserEditDtoFromJson( + Map json) => + AssignExamUserEditDto( + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + examResultId: (json['examResultId'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + mark: (json['mark'] as num?)?.toDouble(), + duration: (json['duration'] as num?)?.toInt(), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + note: json['note'] as String?, + classUserId: (json['classUserId'] as num?)?.toInt(), + ); + +Map _$AssignExamUserEditDtoToJson( + AssignExamUserEditDto instance) => + { + 'assignExamId': instance.assignExamId, + 'userId': instance.userId, + 'status': assignExamUserStatusEnumToJson(instance.status), + 'examResultId': instance.examResultId, + 'startDate': instance.startDate?.toIso8601String(), + 'mark': instance.mark, + 'duration': instance.duration, + 'endDate': instance.endDate?.toIso8601String(), + 'note': instance.note, + 'classUserId': instance.classUserId, + }; + +AssignExamUserEntity _$AssignExamUserEntityFromJson( + Map json) => + AssignExamUserEntity( + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + examResultId: (json['examResultId'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + mark: (json['mark'] as num?)?.toDouble(), + duration: (json['duration'] as num?)?.toInt(), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + note: json['note'] as String?, + ); + +Map _$AssignExamUserEntityToJson( + AssignExamUserEntity instance) => + { + 'assignExamId': instance.assignExamId, + 'userId': instance.userId, + 'status': assignExamUserStatusEnumToJson(instance.status), + 'examResultId': instance.examResultId, + 'startDate': instance.startDate?.toIso8601String(), + 'mark': instance.mark, + 'duration': instance.duration, + 'endDate': instance.endDate?.toIso8601String(), + 'note': instance.note, + }; + +AssignExistingTeacherDto _$AssignExistingTeacherDtoFromJson( + Map json) => + AssignExistingTeacherDto( + schoolId: (json['schoolId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + subject: (json['subject'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + classManage: (json['classManage'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + classList: (json['classList'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$AssignExistingTeacherDtoToJson( + AssignExistingTeacherDto instance) => + { + 'schoolId': instance.schoolId, + 'userId': instance.userId, + 'subject': instance.subject, + 'classManage': instance.classManage, + 'classList': instance.classList, + }; + +BooleanApiResponse _$BooleanApiResponseFromJson(Map json) => + BooleanApiResponse( + data: json['data'] as bool?, + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$BooleanApiResponseToJson(BooleanApiResponse instance) => + { + 'data': instance.data, + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +CartAddItemDto _$CartAddItemDtoFromJson(Map json) => + CartAddItemDto( + productId: (json['productId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + ); + +Map _$CartAddItemDtoToJson(CartAddItemDto instance) => + { + 'productId': instance.productId, + 'quantity': instance.quantity, + }; + +CartDto _$CartDtoFromJson(Map json) => CartDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + notes: json['notes'] as String?, + items: (json['items'] as List?) + ?.map((e) => CartItemDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$CartDtoToJson(CartDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'notes': instance.notes, + 'items': instance.items?.map((e) => e.toJson()).toList(), + }; + +CartDtoApiResponse _$CartDtoApiResponseFromJson(Map json) => + CartDtoApiResponse( + data: json['data'] == null + ? null + : CartDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CartDtoApiResponseToJson(CartDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +CartEntity _$CartEntityFromJson(Map json) => CartEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + notes: json['notes'] as String?, + items: (json['items'] as List?) + ?.map((e) => CartItemEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$CartEntityToJson(CartEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'notes': instance.notes, + 'items': instance.items?.map((e) => e.toJson()).toList(), + }; + +CartItemDto _$CartItemDtoFromJson(Map json) => CartItemDto( + id: (json['id'] as num?)?.toInt(), + cartId: (json['cartId'] as num?)?.toInt(), + productId: (json['productId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + product: json['product'] == null + ? null + : ProductListDto.fromJson(json['product'] as Map), + ); + +Map _$CartItemDtoToJson(CartItemDto instance) => + { + 'id': instance.id, + 'cartId': instance.cartId, + 'productId': instance.productId, + 'quantity': instance.quantity, + 'product': instance.product?.toJson(), + }; + +CartItemEntity _$CartItemEntityFromJson(Map json) => + CartItemEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + cartId: (json['cartId'] as num?)?.toInt(), + productId: (json['productId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + cart: json['cart'] == null + ? null + : CartEntity.fromJson(json['cart'] as Map), + product: json['product'] == null + ? null + : ProductEntity.fromJson(json['product'] as Map), + ); + +Map _$CartItemEntityToJson(CartItemEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'cartId': instance.cartId, + 'productId': instance.productId, + 'quantity': instance.quantity, + 'cart': instance.cart?.toJson(), + 'product': instance.product?.toJson(), + }; + +CartUpdateItemDto _$CartUpdateItemDtoFromJson(Map json) => + CartUpdateItemDto( + cartItemId: (json['cartItemId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + ); + +Map _$CartUpdateItemDtoToJson(CartUpdateItemDto instance) => + { + 'cartItemId': instance.cartItemId, + 'quantity': instance.quantity, + }; + +CategoryClassLevelEntity _$CategoryClassLevelEntityFromJson( + Map json) => + CategoryClassLevelEntity( + categoryId: (json['categoryId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + category: json['category'] == null + ? null + : CategoryEntity.fromJson(json['category'] as Map), + ); + +Map _$CategoryClassLevelEntityToJson( + CategoryClassLevelEntity instance) => + { + 'categoryId': instance.categoryId, + 'classLevel': instance.classLevel, + 'category': instance.category?.toJson(), + }; + +CategoryEntity _$CategoryEntityFromJson(Map json) => + CategoryEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + url: json['url'] as String?, + code: json['code'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + level: (json['level'] as num?)?.toInt(), + path: json['path'] as String?, + icon: json['icon'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + categoryClassLevels: (json['categoryClassLevels'] as List?) + ?.map((e) => + CategoryClassLevelEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$CategoryEntityToJson(CategoryEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'url': instance.url, + 'code': instance.code, + 'parentId': instance.parentId, + 'level': instance.level, + 'path': instance.path, + 'icon': instance.icon, + 'status': commonStatusEnumToJson(instance.status), + 'categoryClassLevels': + instance.categoryClassLevels?.map((e) => e.toJson()).toList(), + }; + +CategoryEntityApiResponse _$CategoryEntityApiResponseFromJson( + Map json) => + CategoryEntityApiResponse( + data: json['data'] == null + ? null + : CategoryEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CategoryEntityApiResponseToJson( + CategoryEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +CategoryGetListQuery _$CategoryGetListQueryFromJson( + Map json) => + CategoryGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + zoneId: (json['zoneId'] as num?)?.toInt(), + code: json['code'] as String?, + ); + +Map _$CategoryGetListQueryToJson( + CategoryGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'zoneId': instance.zoneId, + 'code': instance.code, + }; + +CategoryGetListWithGalleryCountQuery + _$CategoryGetListWithGalleryCountQueryFromJson(Map json) => + CategoryGetListWithGalleryCountQuery( + code: json['code'] as String?, + includeTotal: json['includeTotal'] as bool?, + ); + +Map _$CategoryGetListWithGalleryCountQueryToJson( + CategoryGetListWithGalleryCountQuery instance) => + { + 'code': instance.code, + 'includeTotal': instance.includeTotal, + }; + +CategoryGetListWithNewsCountQuery _$CategoryGetListWithNewsCountQueryFromJson( + Map json) => + CategoryGetListWithNewsCountQuery( + code: json['code'] as String?, + includeTotal: json['includeTotal'] as bool?, + ); + +Map _$CategoryGetListWithNewsCountQueryToJson( + CategoryGetListWithNewsCountQuery instance) => + { + 'code': instance.code, + 'includeTotal': instance.includeTotal, + }; + +CategoryListDto _$CategoryListDtoFromJson(Map json) => + CategoryListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + url: json['url'] as String?, + code: json['code'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + level: (json['level'] as num?)?.toInt(), + path: json['path'] as String?, + icon: json['icon'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + categoryClassLevels: (json['categoryClassLevels'] as List?) + ?.map((e) => + CategoryClassLevelEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$CategoryListDtoToJson(CategoryListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'url': instance.url, + 'code': instance.code, + 'parentId': instance.parentId, + 'level': instance.level, + 'path': instance.path, + 'icon': instance.icon, + 'status': commonStatusEnumToJson(instance.status), + 'categoryClassLevels': + instance.categoryClassLevels?.map((e) => e.toJson()).toList(), + }; + +CategoryListDtoFilterResult _$CategoryListDtoFilterResultFromJson( + Map json) => + CategoryListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => CategoryListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$CategoryListDtoFilterResultToJson( + CategoryListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +CategoryListDtoFilterResultApiResponse + _$CategoryListDtoFilterResultApiResponseFromJson( + Map json) => + CategoryListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : CategoryListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CategoryListDtoFilterResultApiResponseToJson( + CategoryListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +CategoryWithGalleryCountDto _$CategoryWithGalleryCountDtoFromJson( + Map json) => + CategoryWithGalleryCountDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + url: json['url'] as String?, + code: json['code'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + level: (json['level'] as num?)?.toInt(), + path: json['path'] as String?, + icon: json['icon'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + categoryClassLevels: (json['categoryClassLevels'] as List?) + ?.map((e) => + CategoryClassLevelEntity.fromJson(e as Map)) + .toList() ?? + [], + galleryCount: (json['galleryCount'] as num?)?.toInt(), + ); + +Map _$CategoryWithGalleryCountDtoToJson( + CategoryWithGalleryCountDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'url': instance.url, + 'code': instance.code, + 'parentId': instance.parentId, + 'level': instance.level, + 'path': instance.path, + 'icon': instance.icon, + 'status': commonStatusEnumToJson(instance.status), + 'categoryClassLevels': + instance.categoryClassLevels?.map((e) => e.toJson()).toList(), + 'galleryCount': instance.galleryCount, + }; + +CategoryWithGalleryCountDtoListApiResponse + _$CategoryWithGalleryCountDtoListApiResponseFromJson( + Map json) => + CategoryWithGalleryCountDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => CategoryWithGalleryCountDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CategoryWithGalleryCountDtoListApiResponseToJson( + CategoryWithGalleryCountDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +CategoryWithNewsCountDto _$CategoryWithNewsCountDtoFromJson( + Map json) => + CategoryWithNewsCountDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + url: json['url'] as String?, + code: json['code'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + level: (json['level'] as num?)?.toInt(), + path: json['path'] as String?, + icon: json['icon'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + categoryClassLevels: (json['categoryClassLevels'] as List?) + ?.map((e) => + CategoryClassLevelEntity.fromJson(e as Map)) + .toList() ?? + [], + newsCount: (json['newsCount'] as num?)?.toInt(), + ); + +Map _$CategoryWithNewsCountDtoToJson( + CategoryWithNewsCountDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'url': instance.url, + 'code': instance.code, + 'parentId': instance.parentId, + 'level': instance.level, + 'path': instance.path, + 'icon': instance.icon, + 'status': commonStatusEnumToJson(instance.status), + 'categoryClassLevels': + instance.categoryClassLevels?.map((e) => e.toJson()).toList(), + 'newsCount': instance.newsCount, + }; + +CategoryWithNewsCountDtoListApiResponse + _$CategoryWithNewsCountDtoListApiResponseFromJson( + Map json) => + CategoryWithNewsCountDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => CategoryWithNewsCountDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CategoryWithNewsCountDtoListApiResponseToJson( + CategoryWithNewsCountDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ChangeEmailDto _$ChangeEmailDtoFromJson(Map json) => + ChangeEmailDto( + id: (json['id'] as num?)?.toInt(), + password: json['password'] as String?, + email: json['email'] as String?, + ); + +Map _$ChangeEmailDtoToJson(ChangeEmailDto instance) => + { + 'id': instance.id, + 'password': instance.password, + 'email': instance.email, + }; + +ChangePasswordDto _$ChangePasswordDtoFromJson(Map json) => + ChangePasswordDto( + oldPassword: json['oldPassword'] as String?, + newPassword: json['newPassword'] as String?, + reNewPassword: json['reNewPassword'] as String?, + ); + +Map _$ChangePasswordDtoToJson(ChangePasswordDto instance) => + { + 'oldPassword': instance.oldPassword, + 'newPassword': instance.newPassword, + 'reNewPassword': instance.reNewPassword, + }; + +ChatGroupDetailDto _$ChatGroupDetailDtoFromJson(Map json) => + ChatGroupDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: (json['type'] as num?)?.toInt(), + documentId: (json['documentId'] as num?)?.toInt(), + listUserOfGroup: (json['listUserOfGroup'] as List?) + ?.map((e) => + UserWithSimpleInfoDto.fromJson(e as Map)) + .toList() ?? + [], + isOnline: json['isOnline'] as bool?, + ); + +Map _$ChatGroupDetailDtoToJson(ChatGroupDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': instance.type, + 'documentId': instance.documentId, + 'listUserOfGroup': + instance.listUserOfGroup?.map((e) => e.toJson()).toList(), + 'isOnline': instance.isOnline, + }; + +ChatGroupDetailDtoApiResponse _$ChatGroupDetailDtoApiResponseFromJson( + Map json) => + ChatGroupDetailDtoApiResponse( + data: json['data'] == null + ? null + : ChatGroupDetailDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ChatGroupDetailDtoApiResponseToJson( + ChatGroupDetailDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ChatGroupEntity _$ChatGroupEntityFromJson(Map json) => + ChatGroupEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: (json['type'] as num?)?.toInt(), + documentId: (json['documentId'] as num?)?.toInt(), + ); + +Map _$ChatGroupEntityToJson(ChatGroupEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': instance.type, + 'documentId': instance.documentId, + }; + +ChatGroupEntityApiResponse _$ChatGroupEntityApiResponseFromJson( + Map json) => + ChatGroupEntityApiResponse( + data: json['data'] == null + ? null + : ChatGroupEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ChatGroupEntityApiResponseToJson( + ChatGroupEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ClassAddListUserCommand _$ClassAddListUserCommandFromJson( + Map json) => + ClassAddListUserCommand( + userIds: (json['userIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + classId: (json['classId'] as num?)?.toInt(), + role: classUserRoleEnumFromJson((json['role'] as num?)?.toInt()), + ); + +Map _$ClassAddListUserCommandToJson( + ClassAddListUserCommand instance) => + { + 'userIds': instance.userIds, + 'classId': instance.classId, + 'role': classUserRoleEnumToJson(instance.role), + }; + +ClassByUserDto _$ClassByUserDtoFromJson(Map json) => + ClassByUserDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + ); + +Map _$ClassByUserDtoToJson(ClassByUserDto instance) => + { + 'id': instance.id, + 'name': instance.name, + }; + +ClassChangeClassCommand _$ClassChangeClassCommandFromJson( + Map json) => + ClassChangeClassCommand( + userIds: (json['userIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + oldClassId: (json['oldClassId'] as num?)?.toInt(), + newClassId: (json['newClassId'] as num?)?.toInt(), + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ClassChangeClassCommandToJson( + ClassChangeClassCommand instance) => + { + 'userIds': instance.userIds, + 'oldClassId': instance.oldClassId, + 'newClassId': instance.newClassId, + 'status': classUserStatusEnumToJson(instance.status), + }; + +ClassDetailDto _$ClassDetailDtoFromJson(Map json) => + ClassDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + academicYearId: (json['academicYearId'] as num?)?.toInt(), + status: classStatusEnumFromJson((json['status'] as num?)?.toInt()), + grade: (json['grade'] as num?)?.toInt(), + classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(), + classProgramType: json['classProgramType'] == null + ? null + : ClassProgramTypeEntity.fromJson( + json['classProgramType'] as Map), + classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()), + productId: (json['productId'] as num?)?.toInt(), + maxStudents: (json['maxStudents'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + zoomMeetingId: json['zoomMeetingId'] as String?, + zoomPassword: json['zoomPassword'] as String?, + description: json['description'] as String?, + classUsers: (json['classUsers'] as List?) + ?.map((e) => ClassUserEntity.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + classSessions: (json['classSessions'] as List?) + ?.map( + (e) => ClassSessionEntity.fromJson(e as Map)) + .toList() ?? + [], + currentRole: + classUserRoleEnumFromJson((json['currentRole'] as num?)?.toInt()), + ); + +Map _$ClassDetailDtoToJson(ClassDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'schoolId': instance.schoolId, + 'academicYearId': instance.academicYearId, + 'status': classStatusEnumToJson(instance.status), + 'grade': instance.grade, + 'classProgramTypeId': instance.classProgramTypeId, + 'classProgramType': instance.classProgramType?.toJson(), + 'classType': classTypeEnumToJson(instance.classType), + 'productId': instance.productId, + 'maxStudents': instance.maxStudents, + 'startDate': instance.startDate?.toIso8601String(), + 'endDate': instance.endDate?.toIso8601String(), + 'zoomMeetingId': instance.zoomMeetingId, + 'zoomPassword': instance.zoomPassword, + 'description': instance.description, + 'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + 'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(), + 'currentRole': classUserRoleEnumToJson(instance.currentRole), + }; + +ClassEntity _$ClassEntityFromJson(Map json) => ClassEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + academicYearId: (json['academicYearId'] as num?)?.toInt(), + status: classStatusEnumFromJson((json['status'] as num?)?.toInt()), + grade: (json['grade'] as num?)?.toInt(), + classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(), + classProgramType: json['classProgramType'] == null + ? null + : ClassProgramTypeEntity.fromJson( + json['classProgramType'] as Map), + classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()), + productId: (json['productId'] as num?)?.toInt(), + maxStudents: (json['maxStudents'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + zoomMeetingId: json['zoomMeetingId'] as String?, + zoomPassword: json['zoomPassword'] as String?, + description: json['description'] as String?, + classUsers: (json['classUsers'] as List?) + ?.map((e) => ClassUserEntity.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + classSessions: (json['classSessions'] as List?) + ?.map( + (e) => ClassSessionEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassEntityToJson(ClassEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'schoolId': instance.schoolId, + 'academicYearId': instance.academicYearId, + 'status': classStatusEnumToJson(instance.status), + 'grade': instance.grade, + 'classProgramTypeId': instance.classProgramTypeId, + 'classProgramType': instance.classProgramType?.toJson(), + 'classType': classTypeEnumToJson(instance.classType), + 'productId': instance.productId, + 'maxStudents': instance.maxStudents, + 'startDate': instance.startDate?.toIso8601String(), + 'endDate': instance.endDate?.toIso8601String(), + 'zoomMeetingId': instance.zoomMeetingId, + 'zoomPassword': instance.zoomPassword, + 'description': instance.description, + 'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + 'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(), + }; + +ClassGetListFilter _$ClassGetListFilterFromJson(Map json) => + ClassGetListFilter( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + academicYearId: (json['academicYearId'] as num?)?.toInt(), + status: classStatusEnumFromJson((json['status'] as num?)?.toInt()), + isGetAll: json['isGetAll'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + grade: (json['grade'] as num?)?.toInt(), + searchType: classListSearchTypeEnumFromJson( + (json['searchType'] as num?)?.toInt()), + ); + +Map _$ClassGetListFilterToJson(ClassGetListFilter instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'schoolId': instance.schoolId, + 'academicYearId': instance.academicYearId, + 'status': classStatusEnumToJson(instance.status), + 'isGetAll': instance.isGetAll, + 'userId': instance.userId, + 'grade': instance.grade, + 'searchType': classListSearchTypeEnumToJson(instance.searchType), + }; + +ClassLevel _$ClassLevelFromJson(Map json) => ClassLevel( + id: (json['id'] as num?)?.toInt(), + grade: (json['grade'] as num?)?.toInt(), + name: json['name'] as String?, + subjects: (json['subjects'] as List?) + ?.map((e) => Subject.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassLevelToJson(ClassLevel instance) => + { + 'id': instance.id, + 'grade': instance.grade, + 'name': instance.name, + 'subjects': instance.subjects?.map((e) => e.toJson()).toList(), + }; + +ClassListDto _$ClassListDtoFromJson(Map json) => ClassListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + academicYearId: (json['academicYearId'] as num?)?.toInt(), + status: classStatusEnumFromJson((json['status'] as num?)?.toInt()), + grade: (json['grade'] as num?)?.toInt(), + classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(), + classProgramType: json['classProgramType'] == null + ? null + : ClassProgramTypeEntity.fromJson( + json['classProgramType'] as Map), + classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()), + productId: (json['productId'] as num?)?.toInt(), + maxStudents: (json['maxStudents'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + zoomMeetingId: json['zoomMeetingId'] as String?, + zoomPassword: json['zoomPassword'] as String?, + description: json['description'] as String?, + classUsers: (json['classUsers'] as List?) + ?.map((e) => ClassUserEntity.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + classSessions: (json['classSessions'] as List?) + ?.map( + (e) => ClassSessionEntity.fromJson(e as Map)) + .toList() ?? + [], + countPupil: (json['countPupil'] as num?)?.toInt(), + countExercise: (json['countExercise'] as num?)?.toInt(), + countTest: (json['countTest'] as num?)?.toInt(), + countNeedMark: (json['countNeedMark'] as num?)?.toInt(), + testAverageScore: (json['testAverageScore'] as num?)?.toDouble(), + studentCountTest: (json['studentCountTest'] as num?)?.toInt(), + studentCountTestDone: (json['studentCountTestDone'] as num?)?.toInt(), + currentRole: + classUserRoleEnumFromJson((json['currentRole'] as num?)?.toInt()), + isManager: json['isManager'] as bool?, + schoolName: json['schoolName'] as String?, + subject: json['subject'] as String?, + ); + +Map _$ClassListDtoToJson(ClassListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'schoolId': instance.schoolId, + 'academicYearId': instance.academicYearId, + 'status': classStatusEnumToJson(instance.status), + 'grade': instance.grade, + 'classProgramTypeId': instance.classProgramTypeId, + 'classProgramType': instance.classProgramType?.toJson(), + 'classType': classTypeEnumToJson(instance.classType), + 'productId': instance.productId, + 'maxStudents': instance.maxStudents, + 'startDate': instance.startDate?.toIso8601String(), + 'endDate': instance.endDate?.toIso8601String(), + 'zoomMeetingId': instance.zoomMeetingId, + 'zoomPassword': instance.zoomPassword, + 'description': instance.description, + 'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + 'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(), + 'countPupil': instance.countPupil, + 'countExercise': instance.countExercise, + 'countTest': instance.countTest, + 'countNeedMark': instance.countNeedMark, + 'testAverageScore': instance.testAverageScore, + 'studentCountTest': instance.studentCountTest, + 'studentCountTestDone': instance.studentCountTestDone, + 'currentRole': classUserRoleEnumToJson(instance.currentRole), + 'isManager': instance.isManager, + 'schoolName': instance.schoolName, + 'subject': instance.subject, + }; + +ClassListDtoFilterResult _$ClassListDtoFilterResultFromJson( + Map json) => + ClassListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ClassListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassListDtoFilterResultToJson( + ClassListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ClassListOfSchoolDto _$ClassListOfSchoolDtoFromJson( + Map json) => + ClassListOfSchoolDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + grade: (json['grade'] as num?)?.toInt(), + countPupil: (json['countPupil'] as num?)?.toInt(), + countTeacher: (json['countTeacher'] as num?)?.toInt(), + countExam: (json['countExam'] as num?)?.toInt(), + countNeedMark: (json['countNeedMark'] as num?)?.toInt(), + testAverageScore: (json['testAverageScore'] as num?)?.toDouble(), + ); + +Map _$ClassListOfSchoolDtoToJson( + ClassListOfSchoolDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'grade': instance.grade, + 'countPupil': instance.countPupil, + 'countTeacher': instance.countTeacher, + 'countExam': instance.countExam, + 'countNeedMark': instance.countNeedMark, + 'testAverageScore': instance.testAverageScore, + }; + +ClassListOfSchoolDtoFilterResult _$ClassListOfSchoolDtoFilterResultFromJson( + Map json) => + ClassListOfSchoolDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => + ClassListOfSchoolDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassListOfSchoolDtoFilterResultToJson( + ClassListOfSchoolDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ClassListOfSchoolFilter _$ClassListOfSchoolFilterFromJson( + Map json) => + ClassListOfSchoolFilter( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + schoolId: (json['schoolId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + grade: (json['grade'] as num?)?.toInt(), + ); + +Map _$ClassListOfSchoolFilterToJson( + ClassListOfSchoolFilter instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'schoolId': instance.schoolId, + 'keyword': instance.keyword, + 'grade': instance.grade, + }; + +ClassProgramTypeEntity _$ClassProgramTypeEntityFromJson( + Map json) => + ClassProgramTypeEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + description: json['description'] as String?, + ); + +Map _$ClassProgramTypeEntityToJson( + ClassProgramTypeEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'schoolId': instance.schoolId, + 'description': instance.description, + }; + +ClassProgramTypeEntityApiResponse _$ClassProgramTypeEntityApiResponseFromJson( + Map json) => + ClassProgramTypeEntityApiResponse( + data: json['data'] == null + ? null + : ClassProgramTypeEntity.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ClassProgramTypeEntityApiResponseToJson( + ClassProgramTypeEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ClassProgramTypeEntityListApiResponse + _$ClassProgramTypeEntityListApiResponseFromJson( + Map json) => + ClassProgramTypeEntityListApiResponse( + data: (json['data'] as List?) + ?.map((e) => ClassProgramTypeEntity.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ClassProgramTypeEntityListApiResponseToJson( + ClassProgramTypeEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ClassPupilDto _$ClassPupilDtoFromJson(Map json) => + ClassPupilDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + countExamNeedDo: (json['countExamNeedDo'] as num?)?.toInt(), + countUser: (json['countUser'] as num?)?.toInt(), + ); + +Map _$ClassPupilDtoToJson(ClassPupilDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'countExamNeedDo': instance.countExamNeedDo, + 'countUser': instance.countUser, + }; + +ClassPupilStatisticalDto _$ClassPupilStatisticalDtoFromJson( + Map json) => + ClassPupilStatisticalDto( + userId: (json['userId'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + fullNameNonAccent: json['fullNameNonAccent'] as String?, + joinDate: json['joinDate'] == null + ? null + : DateTime.parse(json['joinDate'] as String), + percentHomeWorkDone: (json['percentHomeWorkDone'] as num?)?.toDouble(), + countExam: (json['countExam'] as num?)?.toInt(), + averageScoreExam: (json['averageScoreExam'] as num?)?.toDouble(), + averageScoreTest: (json['averageScoreTest'] as num?)?.toDouble(), + ); + +Map _$ClassPupilStatisticalDtoToJson( + ClassPupilStatisticalDto instance) => + { + 'userId': instance.userId, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'fullNameNonAccent': instance.fullNameNonAccent, + 'joinDate': instance.joinDate?.toIso8601String(), + 'percentHomeWorkDone': instance.percentHomeWorkDone, + 'countExam': instance.countExam, + 'averageScoreExam': instance.averageScoreExam, + 'averageScoreTest': instance.averageScoreTest, + }; + +ClassPupilStatisticalDtoFilterResult + _$ClassPupilStatisticalDtoFilterResultFromJson(Map json) => + ClassPupilStatisticalDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ClassPupilStatisticalDto.fromJson( + e as Map)) + .toList() ?? + [], + ); + +Map _$ClassPupilStatisticalDtoFilterResultToJson( + ClassPupilStatisticalDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ClassPupilStatisticalFilter _$ClassPupilStatisticalFilterFromJson( + Map json) => + ClassPupilStatisticalFilter( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + classId: (json['classId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + subjectId: (json['subjectId'] as num?)?.toInt(), + ); + +Map _$ClassPupilStatisticalFilterToJson( + ClassPupilStatisticalFilter instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'classId': instance.classId, + 'keyword': instance.keyword, + 'subjectId': instance.subjectId, + }; + +ClassRemoveUserCommand _$ClassRemoveUserCommandFromJson( + Map json) => + ClassRemoveUserCommand( + userId: (json['userId'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + ); + +Map _$ClassRemoveUserCommandToJson( + ClassRemoveUserCommand instance) => + { + 'userId': instance.userId, + 'classId': instance.classId, + }; + +ClassSessionEntity _$ClassSessionEntityFromJson(Map json) => + ClassSessionEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + classId: (json['classId'] as num?)?.toInt(), + productLessonId: (json['productLessonId'] as num?)?.toInt(), + sessionNumber: (json['sessionNumber'] as num?)?.toInt(), + sessionName: json['sessionName'] as String?, + description: json['description'] as String?, + startTime: json['startTime'] == null + ? null + : DateTime.parse(json['startTime'] as String), + endTime: json['endTime'] == null + ? null + : DateTime.parse(json['endTime'] as String), + zoomMeetingId: json['zoomMeetingId'] as String?, + zoomJoinLink: json['zoomJoinLink'] as String?, + zoomStartLink: json['zoomStartLink'] as String?, + zoomPassword: json['zoomPassword'] as String?, + recordingUrl: json['recordingUrl'] as String?, + actualDurationMinutes: (json['actualDurationMinutes'] as num?)?.toInt(), + status: sessionStatusEnumFromJson((json['status'] as num?)?.toInt()), + notes: json['notes'] as String?, + $class: json['class'] == null + ? null + : ClassEntity.fromJson(json['class'] as Map), + productLesson: json['productLesson'] == null + ? null + : ProductLessonEntity.fromJson( + json['productLesson'] as Map), + attendances: (json['attendances'] as List?) + ?.map((e) => + SessionAttendanceEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassSessionEntityToJson(ClassSessionEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'classId': instance.classId, + 'productLessonId': instance.productLessonId, + 'sessionNumber': instance.sessionNumber, + 'sessionName': instance.sessionName, + 'description': instance.description, + 'startTime': instance.startTime?.toIso8601String(), + 'endTime': instance.endTime?.toIso8601String(), + 'zoomMeetingId': instance.zoomMeetingId, + 'zoomJoinLink': instance.zoomJoinLink, + 'zoomStartLink': instance.zoomStartLink, + 'zoomPassword': instance.zoomPassword, + 'recordingUrl': instance.recordingUrl, + 'actualDurationMinutes': instance.actualDurationMinutes, + 'status': sessionStatusEnumToJson(instance.status), + 'notes': instance.notes, + 'class': instance.$class?.toJson(), + 'productLesson': instance.productLesson?.toJson(), + 'attendances': instance.attendances?.map((e) => e.toJson()).toList(), + }; + +ClassShortDto _$ClassShortDtoFromJson(Map json) => + ClassShortDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + grade: json['grade'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + classUsers: (json['classUsers'] as List?) + ?.map( + (e) => ClassUserShortDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ClassShortDtoToJson(ClassShortDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'grade': instance.grade, + 'schoolId': instance.schoolId, + 'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(), + }; + +ClassStatisticalDto _$ClassStatisticalDtoFromJson(Map json) => + ClassStatisticalDto( + waitingGrading: (json['waitingGrading'] as num?)?.toInt(), + countTeacher: (json['countTeacher'] as num?)?.toInt(), + countPupil: (json['countPupil'] as num?)?.toInt(), + countExam: (json['countExam'] as num?)?.toInt(), + ); + +Map _$ClassStatisticalDtoToJson( + ClassStatisticalDto instance) => + { + 'waitingGrading': instance.waitingGrading, + 'countTeacher': instance.countTeacher, + 'countPupil': instance.countPupil, + 'countExam': instance.countExam, + }; + +ClassUserEntity _$ClassUserEntityFromJson(Map json) => + ClassUserEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + role: classUserRoleEnumFromJson((json['role'] as num?)?.toInt()), + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + note: json['note'] as String?, + subjectIds: (json['subjectIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + isManager: json['isManager'] as bool?, + ); + +Map _$ClassUserEntityToJson(ClassUserEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'classId': instance.classId, + 'role': classUserRoleEnumToJson(instance.role), + 'status': classUserStatusEnumToJson(instance.status), + 'note': instance.note, + 'subjectIds': instance.subjectIds, + 'isManager': instance.isManager, + }; + +ClassUserShortDto _$ClassUserShortDtoFromJson(Map json) => + ClassUserShortDto( + id: (json['id'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + avatar: json['avatar'] as String?, + ); + +Map _$ClassUserShortDtoToJson(ClassUserShortDto instance) => + { + 'id': instance.id, + 'fullName': instance.fullName, + 'avatar': instance.avatar, + }; + +ConsultationRegistrationEntity _$ConsultationRegistrationEntityFromJson( + Map json) => + ConsultationRegistrationEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + phone: json['phone'] as String?, + email: json['email'] as String?, + message: json['message'] as String?, + planType: json['planType'] as String?, + productId: (json['productId'] as num?)?.toInt(), + status: consultationStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + contactedDate: json['contactedDate'] == null + ? null + : DateTime.parse(json['contactedDate'] as String), + contactedBy: (json['contactedBy'] as num?)?.toInt(), + ); + +Map _$ConsultationRegistrationEntityToJson( + ConsultationRegistrationEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'phone': instance.phone, + 'email': instance.email, + 'message': instance.message, + 'planType': instance.planType, + 'productId': instance.productId, + 'status': consultationStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + 'contactedDate': instance.contactedDate?.toIso8601String(), + 'contactedBy': instance.contactedBy, + }; + +ConsultationRegistrationEntityApiResponse + _$ConsultationRegistrationEntityApiResponseFromJson( + Map json) => + ConsultationRegistrationEntityApiResponse( + data: json['data'] == null + ? null + : ConsultationRegistrationEntity.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ConsultationRegistrationEntityApiResponseToJson( + ConsultationRegistrationEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ConsultationRegistrationGetListQuery + _$ConsultationRegistrationGetListQueryFromJson(Map json) => + ConsultationRegistrationGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + status: + consultationStatusEnumFromJson((json['status'] as num?)?.toInt()), + planType: json['planType'] as String?, + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + ); + +Map _$ConsultationRegistrationGetListQueryToJson( + ConsultationRegistrationGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'status': consultationStatusEnumToJson(instance.status), + 'planType': instance.planType, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + }; + +ConsultationRegistrationListDto _$ConsultationRegistrationListDtoFromJson( + Map json) => + ConsultationRegistrationListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + phone: json['phone'] as String?, + email: json['email'] as String?, + message: json['message'] as String?, + planType: json['planType'] as String?, + productId: (json['productId'] as num?)?.toInt(), + status: consultationStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + contactedDate: json['contactedDate'] == null + ? null + : DateTime.parse(json['contactedDate'] as String), + contactedBy: (json['contactedBy'] as num?)?.toInt(), + productName: json['productName'] as String?, + contactedByName: json['contactedByName'] as String?, + ); + +Map _$ConsultationRegistrationListDtoToJson( + ConsultationRegistrationListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'phone': instance.phone, + 'email': instance.email, + 'message': instance.message, + 'planType': instance.planType, + 'productId': instance.productId, + 'status': consultationStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + 'contactedDate': instance.contactedDate?.toIso8601String(), + 'contactedBy': instance.contactedBy, + 'productName': instance.productName, + 'contactedByName': instance.contactedByName, + }; + +ConsultationRegistrationListDtoFilterResult + _$ConsultationRegistrationListDtoFilterResultFromJson( + Map json) => + ConsultationRegistrationListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ConsultationRegistrationListDto.fromJson( + e as Map)) + .toList() ?? + [], + ); + +Map _$ConsultationRegistrationListDtoFilterResultToJson( + ConsultationRegistrationListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ConsultationRegistrationListDtoFilterResultApiResponse + _$ConsultationRegistrationListDtoFilterResultApiResponseFromJson( + Map json) => + ConsultationRegistrationListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ConsultationRegistrationListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map + _$ConsultationRegistrationListDtoFilterResultApiResponseToJson( + ConsultationRegistrationListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ConsultationRegistrationSaveDto _$ConsultationRegistrationSaveDtoFromJson( + Map json) => + ConsultationRegistrationSaveDto( + name: json['name'] as String?, + phone: json['phone'] as String?, + email: json['email'] as String?, + message: json['message'] as String?, + planType: json['planType'] as String?, + productId: (json['productId'] as num?)?.toInt(), + ); + +Map _$ConsultationRegistrationSaveDtoToJson( + ConsultationRegistrationSaveDto instance) => + { + 'name': instance.name, + 'phone': instance.phone, + 'email': instance.email, + 'message': instance.message, + 'planType': instance.planType, + 'productId': instance.productId, + }; + +ConsultationRegistrationUpdateStatusRequest + _$ConsultationRegistrationUpdateStatusRequestFromJson( + Map json) => + ConsultationRegistrationUpdateStatusRequest( + status: + consultationStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + ); + +Map _$ConsultationRegistrationUpdateStatusRequestToJson( + ConsultationRegistrationUpdateStatusRequest instance) => + { + 'status': consultationStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + }; + +ContactEntity _$ContactEntityFromJson(Map json) => + ContactEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + message: json['message'] as String?, + status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + contactedDate: json['contactedDate'] == null + ? null + : DateTime.parse(json['contactedDate'] as String), + contactedBy: (json['contactedBy'] as num?)?.toInt(), + ); + +Map _$ContactEntityToJson(ContactEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'message': instance.message, + 'status': contactStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + 'contactedDate': instance.contactedDate?.toIso8601String(), + 'contactedBy': instance.contactedBy, + }; + +ContactEntityApiResponse _$ContactEntityApiResponseFromJson( + Map json) => + ContactEntityApiResponse( + data: json['data'] == null + ? null + : ContactEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ContactEntityApiResponseToJson( + ContactEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ContactGetListQuery _$ContactGetListQueryFromJson(Map json) => + ContactGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()), + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + ); + +Map _$ContactGetListQueryToJson( + ContactGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'status': contactStatusEnumToJson(instance.status), + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + }; + +ContactListDto _$ContactListDtoFromJson(Map json) => + ContactListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + message: json['message'] as String?, + status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + contactedDate: json['contactedDate'] == null + ? null + : DateTime.parse(json['contactedDate'] as String), + contactedBy: (json['contactedBy'] as num?)?.toInt(), + contactedByName: json['contactedByName'] as String?, + ); + +Map _$ContactListDtoToJson(ContactListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'message': instance.message, + 'status': contactStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + 'contactedDate': instance.contactedDate?.toIso8601String(), + 'contactedBy': instance.contactedBy, + 'contactedByName': instance.contactedByName, + }; + +ContactListDtoFilterResult _$ContactListDtoFilterResultFromJson( + Map json) => + ContactListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ContactListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ContactListDtoFilterResultToJson( + ContactListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ContactListDtoFilterResultApiResponse + _$ContactListDtoFilterResultApiResponseFromJson( + Map json) => + ContactListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ContactListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ContactListDtoFilterResultApiResponseToJson( + ContactListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ContactSaveDto _$ContactSaveDtoFromJson(Map json) => + ContactSaveDto( + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + message: json['message'] as String?, + ); + +Map _$ContactSaveDtoToJson(ContactSaveDto instance) => + { + 'fullName': instance.fullName, + 'phone': instance.phone, + 'message': instance.message, + }; + +ContactUpdateStatusRequest _$ContactUpdateStatusRequestFromJson( + Map json) => + ContactUpdateStatusRequest( + status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()), + adminNote: json['adminNote'] as String?, + ); + +Map _$ContactUpdateStatusRequestToJson( + ContactUpdateStatusRequest instance) => + { + 'status': contactStatusEnumToJson(instance.status), + 'adminNote': instance.adminNote, + }; + +CreateChatGroupDto _$CreateChatGroupDtoFromJson(Map json) => + CreateChatGroupDto( + userIds: (json['userIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + name: json['name'] as String?, + type: (json['type'] as num?)?.toInt(), + documentId: (json['documentId'] as num?)?.toInt(), + ); + +Map _$CreateChatGroupDtoToJson(CreateChatGroupDto instance) => + { + 'userIds': instance.userIds, + 'name': instance.name, + 'type': instance.type, + 'documentId': instance.documentId, + }; + +CurrentObjectDto _$CurrentObjectDtoFromJson(Map json) => + CurrentObjectDto( + id: (json['id'] as num?)?.toInt(), + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + name: json['name'] as String?, + ); + +Map _$CurrentObjectDtoToJson(CurrentObjectDto instance) => + { + 'id': instance.id, + 'type': userTypeEnumToJson(instance.type), + 'name': instance.name, + }; + +CurrentObjectDtoApiResponse _$CurrentObjectDtoApiResponseFromJson( + Map json) => + CurrentObjectDtoApiResponse( + data: json['data'] == null + ? null + : CurrentObjectDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$CurrentObjectDtoApiResponseToJson( + CurrentObjectDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DNTCaptchaApiResponse _$DNTCaptchaApiResponseFromJson( + Map json) => + DNTCaptchaApiResponse( + dntCaptchaImgUrl: json['dntCaptchaImgUrl'] as String?, + dntCaptchaId: json['dntCaptchaId'] as String?, + dntCaptchaTextValue: json['dntCaptchaTextValue'] as String?, + dntCaptchaTokenValue: json['dntCaptchaTokenValue'] as String?, + ); + +Map _$DNTCaptchaApiResponseToJson( + DNTCaptchaApiResponse instance) => + { + 'dntCaptchaImgUrl': instance.dntCaptchaImgUrl, + 'dntCaptchaId': instance.dntCaptchaId, + 'dntCaptchaTextValue': instance.dntCaptchaTextValue, + 'dntCaptchaTokenValue': instance.dntCaptchaTokenValue, + }; + +DashBoardClassStatisticalDto _$DashBoardClassStatisticalDtoFromJson( + Map json) => + DashBoardClassStatisticalDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + totalStudent: (json['totalStudent'] as num?)?.toInt(), + totalExamNeedMark: (json['totalExamNeedMark'] as num?)?.toInt(), + ); + +Map _$DashBoardClassStatisticalDtoToJson( + DashBoardClassStatisticalDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'totalStudent': instance.totalStudent, + 'totalExamNeedMark': instance.totalExamNeedMark, + }; + +DashBoardClassStatisticalDtoListApiResponse + _$DashBoardClassStatisticalDtoListApiResponseFromJson( + Map json) => + DashBoardClassStatisticalDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => DashBoardClassStatisticalDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DashBoardClassStatisticalDtoListApiResponseToJson( + DashBoardClassStatisticalDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DashBoardExamListDto _$DashBoardExamListDtoFromJson( + Map json) => + DashBoardExamListDto( + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + ); + +Map _$DashBoardExamListDtoToJson( + DashBoardExamListDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'status': examStatusEnumToJson(instance.status), + 'createdDate': instance.createdDate?.toIso8601String(), + }; + +DashBoardExamListDtoListApiResponse + _$DashBoardExamListDtoListApiResponseFromJson(Map json) => + DashBoardExamListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => + DashBoardExamListDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DashBoardExamListDtoListApiResponseToJson( + DashBoardExamListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DashBoardPupilListDto _$DashBoardPupilListDtoFromJson( + Map json) => + DashBoardPupilListDto( + userId: (json['userId'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + countExam: (json['countExam'] as num?)?.toInt(), + countExamDone: (json['countExamDone'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + className: json['className'] as String?, + percentDone: (json['percentDone'] as num?)?.toDouble(), + ); + +Map _$DashBoardPupilListDtoToJson( + DashBoardPupilListDto instance) => + { + 'userId': instance.userId, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'countExam': instance.countExam, + 'countExamDone': instance.countExamDone, + 'classId': instance.classId, + 'className': instance.className, + 'percentDone': instance.percentDone, + }; + +DashBoardPupilListDtoListApiResponse + _$DashBoardPupilListDtoListApiResponseFromJson(Map json) => + DashBoardPupilListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => + DashBoardPupilListDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DashBoardPupilListDtoListApiResponseToJson( + DashBoardPupilListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DashBoardQuestionListDto _$DashBoardQuestionListDtoFromJson( + Map json) => + DashBoardQuestionListDto( + id: (json['id'] as num?)?.toInt(), + type: json['type'] as String?, + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()), + ); + +Map _$DashBoardQuestionListDtoToJson( + DashBoardQuestionListDto instance) => + { + 'id': instance.id, + 'type': instance.type, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'level': questionLevelEnumToJson(instance.level), + }; + +DashBoardQuestionListDtoListApiResponse + _$DashBoardQuestionListDtoListApiResponseFromJson( + Map json) => + DashBoardQuestionListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => DashBoardQuestionListDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DashBoardQuestionListDtoListApiResponseToJson( + DashBoardQuestionListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DeparmentGetManagerPositionDto _$DeparmentGetManagerPositionDtoFromJson( + Map json) => + DeparmentGetManagerPositionDto( + name: json['name'] as String?, + provinceId: (json['provinceId'] as num?)?.toInt(), + ); + +Map _$DeparmentGetManagerPositionDtoToJson( + DeparmentGetManagerPositionDto instance) => + { + 'name': instance.name, + 'provinceId': instance.provinceId, + }; + +DepartmentCountDto _$DepartmentCountDtoFromJson(Map json) => + DepartmentCountDto( + schoolCount: (json['schoolCount'] as num?)?.toInt(), + teacherCount: (json['teacherCount'] as num?)?.toInt(), + studentCount: (json['studentCount'] as num?)?.toInt(), + classCount: (json['classCount'] as num?)?.toInt(), + ); + +Map _$DepartmentCountDtoToJson(DepartmentCountDto instance) => + { + 'schoolCount': instance.schoolCount, + 'teacherCount': instance.teacherCount, + 'studentCount': instance.studentCount, + 'classCount': instance.classCount, + }; + +DepartmentCountDtoApiResponse _$DepartmentCountDtoApiResponseFromJson( + Map json) => + DepartmentCountDtoApiResponse( + data: json['data'] == null + ? null + : DepartmentCountDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DepartmentCountDtoApiResponseToJson( + DepartmentCountDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DepartmentCountQuery _$DepartmentCountQueryFromJson( + Map json) => + DepartmentCountQuery( + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + ); + +Map _$DepartmentCountQueryToJson( + DepartmentCountQuery instance) => + { + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + }; + +DepartmentDto _$DepartmentDtoFromJson(Map json) => + DepartmentDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + fullName: json['fullName'] as String?, + otherName: json['otherName'] as String?, + url: json['url'] as String?, + unitType: json['unitType'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + priority: (json['priority'] as num?)?.toInt(), + type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()), + officeCount: (json['officeCount'] as num?)?.toInt(), + schoolCount: (json['schoolCount'] as num?)?.toInt(), + schoolActiveCount: (json['schoolActiveCount'] as num?)?.toInt(), + ); + +Map _$DepartmentDtoToJson(DepartmentDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'fullName': instance.fullName, + 'otherName': instance.otherName, + 'url': instance.url, + 'unitType': instance.unitType, + 'parentId': instance.parentId, + 'priority': instance.priority, + 'type': localityTypeEnumToJson(instance.type), + 'status': localityStatusEnumToJson(instance.status), + 'officeCount': instance.officeCount, + 'schoolCount': instance.schoolCount, + 'schoolActiveCount': instance.schoolActiveCount, + }; + +DepartmentDtoFilterResult _$DepartmentDtoFilterResultFromJson( + Map json) => + DepartmentDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => DepartmentDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$DepartmentDtoFilterResultToJson( + DepartmentDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +DepartmentDtoFilterResultApiResponse + _$DepartmentDtoFilterResultApiResponseFromJson(Map json) => + DepartmentDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : DepartmentDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DepartmentDtoFilterResultApiResponseToJson( + DepartmentDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DepartmentGetListQuery _$DepartmentGetListQueryFromJson( + Map json) => + DepartmentGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + ); + +Map _$DepartmentGetListQueryToJson( + DepartmentGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + }; + +DepartmentSchoolFilterDto _$DepartmentSchoolFilterDtoFromJson( + Map json) => + DepartmentSchoolFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + fromDate: json['fromDate'] == null + ? null + : DateTime.parse(json['fromDate'] as String), + toDate: json['toDate'] == null + ? null + : DateTime.parse(json['toDate'] as String), + keyword: json['keyword'] as String?, + type: (json['type'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + districtId: (json['districtId'] as num?)?.toInt(), + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$DepartmentSchoolFilterDtoToJson( + DepartmentSchoolFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'fromDate': instance.fromDate?.toIso8601String(), + 'toDate': instance.toDate?.toIso8601String(), + 'keyword': instance.keyword, + 'type': instance.type, + 'provinceId': instance.provinceId, + 'districtId': instance.districtId, + 'status': schoolStatusEnumToJson(instance.status), + }; + +DepartmentSchoolListDto _$DepartmentSchoolListDtoFromJson( + Map json) => + DepartmentSchoolListDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + type: json['type'] as String?, + provinceId: (json['provinceId'] as num?)?.toInt(), + averageAssignmentsPerTeacher: + (json['averageAssignmentsPerTeacher'] as num?)?.toDouble(), + averageAssignmentsPerStudent: + (json['averageAssignmentsPerStudent'] as num?)?.toDouble(), + provinceName: json['provinceName'] as String?, + districtId: (json['districtId'] as num?)?.toInt(), + districtName: json['districtName'] as String?, + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$DepartmentSchoolListDtoToJson( + DepartmentSchoolListDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'type': instance.type, + 'provinceId': instance.provinceId, + 'averageAssignmentsPerTeacher': instance.averageAssignmentsPerTeacher, + 'averageAssignmentsPerStudent': instance.averageAssignmentsPerStudent, + 'provinceName': instance.provinceName, + 'districtId': instance.districtId, + 'districtName': instance.districtName, + 'status': schoolStatusEnumToJson(instance.status), + }; + +DepartmentSchoolListDtoFilterResult + _$DepartmentSchoolListDtoFilterResultFromJson(Map json) => + DepartmentSchoolListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => DepartmentSchoolListDto.fromJson( + e as Map)) + .toList() ?? + [], + ); + +Map _$DepartmentSchoolListDtoFilterResultToJson( + DepartmentSchoolListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +DepartmentSchoolListDtoFilterResultApiResponse + _$DepartmentSchoolListDtoFilterResultApiResponseFromJson( + Map json) => + DepartmentSchoolListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : DepartmentSchoolListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DepartmentSchoolListDtoFilterResultApiResponseToJson( + DepartmentSchoolListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +Disable2FADto _$Disable2FADtoFromJson(Map json) => + Disable2FADto( + code: json['code'] as String?, + ); + +Map _$Disable2FADtoToJson(Disable2FADto instance) => + { + 'code': instance.code, + }; + +DocumentFileInfo _$DocumentFileInfoFromJson(Map json) => + DocumentFileInfo( + fileName: json['fileName'] as String?, + displayName: json['displayName'] as String?, + size: (json['size'] as num?)?.toInt(), + lineCount: (json['lineCount'] as num?)?.toInt(), + lastModified: json['lastModified'] == null + ? null + : DateTime.parse(json['lastModified'] as String), + exists: json['exists'] as bool?, + ); + +Map _$DocumentFileInfoToJson(DocumentFileInfo instance) => + { + 'fileName': instance.fileName, + 'displayName': instance.displayName, + 'size': instance.size, + 'lineCount': instance.lineCount, + 'lastModified': instance.lastModified?.toIso8601String(), + 'exists': instance.exists, + }; + +DocumentInfo _$DocumentInfoFromJson(Map json) => DocumentInfo( + files: (json['files'] as List?) + ?.map((e) => DocumentFileInfo.fromJson(e as Map)) + .toList() ?? + [], + totalFiles: (json['totalFiles'] as num?)?.toInt(), + existingFiles: (json['existingFiles'] as num?)?.toInt(), + totalSize: (json['totalSize'] as num?)?.toInt(), + lastUpdated: json['lastUpdated'] == null + ? null + : DateTime.parse(json['lastUpdated'] as String), + ); + +Map _$DocumentInfoToJson(DocumentInfo instance) => + { + 'files': instance.files?.map((e) => e.toJson()).toList(), + 'totalFiles': instance.totalFiles, + 'existingFiles': instance.existingFiles, + 'totalSize': instance.totalSize, + 'lastUpdated': instance.lastUpdated?.toIso8601String(), + }; + +DocumentInfoApiResponse _$DocumentInfoApiResponseFromJson( + Map json) => + DocumentInfoApiResponse( + data: json['data'] == null + ? null + : DocumentInfo.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DocumentInfoApiResponseToJson( + DocumentInfoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +DocumentPreviewResponse _$DocumentPreviewResponseFromJson( + Map json) => + DocumentPreviewResponse( + fileName: json['fileName'] as String?, + displayName: json['displayName'] as String?, + previewContent: json['previewContent'] as String?, + totalLines: (json['totalLines'] as num?)?.toInt(), + previewLines: (json['previewLines'] as num?)?.toInt(), + hasMore: json['hasMore'] as bool?, + fileSize: (json['fileSize'] as num?)?.toInt(), + ); + +Map _$DocumentPreviewResponseToJson( + DocumentPreviewResponse instance) => + { + 'fileName': instance.fileName, + 'displayName': instance.displayName, + 'previewContent': instance.previewContent, + 'totalLines': instance.totalLines, + 'previewLines': instance.previewLines, + 'hasMore': instance.hasMore, + 'fileSize': instance.fileSize, + }; + +DocumentPreviewResponseApiResponse _$DocumentPreviewResponseApiResponseFromJson( + Map json) => + DocumentPreviewResponseApiResponse( + data: json['data'] == null + ? null + : DocumentPreviewResponse.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$DocumentPreviewResponseApiResponseToJson( + DocumentPreviewResponseApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +Enable2FADto _$Enable2FADtoFromJson(Map json) => Enable2FADto( + code: json['code'] as String?, + ); + +Map _$Enable2FADtoToJson(Enable2FADto instance) => + { + 'code': instance.code, + }; + +Enum _$EnumFromJson(Map json) => Enum(); + +Map _$EnumToJson(Enum instance) => {}; + +EnumItemEntity _$EnumItemEntityFromJson(Map json) => + EnumItemEntity( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + code: json['code'] as String?, + ); + +Map _$EnumItemEntityToJson(EnumItemEntity instance) => + { + 'id': instance.id, + 'name': instance.name, + 'code': instance.code, + }; + +EnumListEntity _$EnumListEntityFromJson(Map json) => + EnumListEntity( + value: (json['value'] as num?)?.toInt(), + code: json['code'] as String?, + name: json['name'] as String?, + isZone: json['isZone'] as bool?, + permissions: (json['permissions'] as List?) + ?.map((e) => EnumListEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$EnumListEntityToJson(EnumListEntity instance) => + { + 'value': instance.value, + 'code': instance.code, + 'name': instance.name, + 'isZone': instance.isZone, + 'permissions': instance.permissions?.map((e) => e.toJson()).toList(), + }; + +EnumListEntityListApiResponse _$EnumListEntityListApiResponseFromJson( + Map json) => + EnumListEntityListApiResponse( + data: (json['data'] as List?) + ?.map((e) => EnumListEntity.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$EnumListEntityListApiResponseToJson( + EnumListEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +EssaySuggestionMarkDto _$EssaySuggestionMarkDtoFromJson( + Map json) => + EssaySuggestionMarkDto( + categoryId: (json['categoryId'] as num?)?.toInt(), + grade: (json['grade'] as num?)?.toInt(), + result: json['result'] as String?, + content: json['content'] as String?, + mark: (json['mark'] as num?)?.toDouble(), + images: (json['images'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + ); + +Map _$EssaySuggestionMarkDtoToJson( + EssaySuggestionMarkDto instance) => + { + 'categoryId': instance.categoryId, + 'grade': instance.grade, + 'result': instance.result, + 'content': instance.content, + 'mark': instance.mark, + 'images': instance.images, + }; + +ExamDataBeforeDeleteDto _$ExamDataBeforeDeleteDtoFromJson( + Map json) => + ExamDataBeforeDeleteDto( + countPupil: (json['countPupil'] as num?)?.toInt(), + countPupilDone: (json['countPupilDone'] as num?)?.toInt(), + ); + +Map _$ExamDataBeforeDeleteDtoToJson( + ExamDataBeforeDeleteDto instance) => + { + 'countPupil': instance.countPupil, + 'countPupilDone': instance.countPupilDone, + }; + +ExamDataBeforeDeleteDtoApiResponse _$ExamDataBeforeDeleteDtoApiResponseFromJson( + Map json) => + ExamDataBeforeDeleteDtoApiResponse( + data: json['data'] == null + ? null + : ExamDataBeforeDeleteDto.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ExamDataBeforeDeleteDtoApiResponseToJson( + ExamDataBeforeDeleteDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ExamDataDto _$ExamDataDtoFromJson(Map json) => ExamDataDto( + parts: (json['parts'] as List?) + ?.map((e) => ExamPartDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamDataDtoToJson(ExamDataDto instance) => + { + 'parts': instance.parts?.map((e) => e.toJson()).toList(), + }; + +ExamDataSaveDto _$ExamDataSaveDtoFromJson(Map json) => + ExamDataSaveDto( + parts: (json['parts'] as List?) + ?.map((e) => ExamPartSaveDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamDataSaveDtoToJson(ExamDataSaveDto instance) => + { + 'parts': instance.parts?.map((e) => e.toJson()).toList(), + }; + +ExamDto _$ExamDtoFromJson(Map json) => ExamDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + avatar: json['avatar'] as String?, + duration: (json['duration'] as num?)?.toInt(), + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + totalMark: (json['totalMark'] as num?)?.toDouble(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + fileUrl: json['fileUrl'] as String?, + data: json['data'] == null + ? null + : ExamDataDto.fromJson(json['data'] as Map), + categoryId: (json['categoryId'] as num?)?.toInt(), + isSystem: json['isSystem'] as bool?, + isAutoScoring: json['isAutoScoring'] as bool?, + fileChoiceType: examFileChoiceTypeEnumFromJson( + (json['fileChoiceType'] as num?)?.toInt()), + questions: (json['questions'] as List?) + ?.map( + (e) => ExamQuestionEntity.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + tags: (json['tags'] as List?) + ?.map((e) => TagDto.fromJson(e as Map)) + .toList() ?? + [], + canEdit: json['canEdit'] as bool?, + ); + +Map _$ExamDtoToJson(ExamDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'avatar': instance.avatar, + 'duration': instance.duration, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'totalMark': instance.totalMark, + 'totalQuestion': instance.totalQuestion, + 'schoolId': instance.schoolId, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'format': examFormatEnumToJson(instance.format), + 'fileUrl': instance.fileUrl, + 'data': instance.data?.toJson(), + 'categoryId': instance.categoryId, + 'isSystem': instance.isSystem, + 'isAutoScoring': instance.isAutoScoring, + 'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType), + 'questions': instance.questions?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + 'tagIds': instance.tagIds, + 'tags': instance.tags?.map((e) => e.toJson()).toList(), + 'canEdit': instance.canEdit, + }; + +ExamDtoApiResponse _$ExamDtoApiResponseFromJson(Map json) => + ExamDtoApiResponse( + data: json['data'] == null + ? null + : ExamDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ExamDtoApiResponseToJson(ExamDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ExamFileSaveDto _$ExamFileSaveDtoFromJson(Map json) => + ExamFileSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + avatar: json['avatar'] as String?, + duration: (json['duration'] as num?)?.toInt(), + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + totalMark: (json['totalMark'] as num?)?.toDouble(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + fileUrl: json['fileUrl'] as String?, + data: json['data'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isSystem: json['isSystem'] as bool?, + isAutoScoring: json['isAutoScoring'] as bool?, + fileChoiceType: examFileChoiceTypeEnumFromJson( + (json['fileChoiceType'] as num?)?.toInt()), + questions: (json['questions'] as List?) + ?.map((e) => QuestionDto.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamFileSaveDtoToJson(ExamFileSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'avatar': instance.avatar, + 'duration': instance.duration, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'totalMark': instance.totalMark, + 'totalQuestion': instance.totalQuestion, + 'schoolId': instance.schoolId, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'format': examFormatEnumToJson(instance.format), + 'fileUrl': instance.fileUrl, + 'data': instance.data, + 'categoryId': instance.categoryId, + 'isSystem': instance.isSystem, + 'isAutoScoring': instance.isAutoScoring, + 'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType), + 'questions': instance.questions?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + }; + +ExamGetListQuery _$ExamGetListQueryFromJson(Map json) => + ExamGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + schoolId: (json['schoolId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + subjectId: (json['subjectId'] as num?)?.toInt(), + filterType: (json['filterType'] as num?)?.toInt(), + ids: (json['ids'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$ExamGetListQueryToJson(ExamGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'schoolId': instance.schoolId, + 'userId': instance.userId, + 'classLevel': instance.classLevel, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'format': examFormatEnumToJson(instance.format), + 'subjectId': instance.subjectId, + 'filterType': instance.filterType, + 'ids': instance.ids, + }; + +ExamLearnDto _$ExamLearnDtoFromJson(Map json) => ExamLearnDto( + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + avatar: json['avatar'] as String?, + duration: (json['duration'] as num?)?.toInt(), + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + totalMark: (json['totalMark'] as num?)?.toDouble(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + fileUrl: json['fileUrl'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + fileChoiceType: examFileChoiceTypeEnumFromJson( + (json['fileChoiceType'] as num?)?.toInt()), + data: json['data'] == null + ? null + : ExamDataDto.fromJson(json['data'] as Map), + ); + +Map _$ExamLearnDtoToJson(ExamLearnDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'avatar': instance.avatar, + 'duration': instance.duration, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'totalMark': instance.totalMark, + 'totalQuestion': instance.totalQuestion, + 'schoolId': instance.schoolId, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'format': examFormatEnumToJson(instance.format), + 'fileUrl': instance.fileUrl, + 'categoryId': instance.categoryId, + 'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType), + 'data': instance.data?.toJson(), + }; + +ExamListDto _$ExamListDtoFromJson(Map json) => ExamListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + duration: (json['duration'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + totalMark: (json['totalMark'] as num?)?.toDouble(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + fileUrl: json['fileUrl'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isLike: json['isLike'] as bool?, + isSystem: json['isSystem'] as bool?, + canEdit: json['canEdit'] as bool?, + isAutoScoring: json['isAutoScoring'] as bool?, + tags: (json['tags'] as List?) + ?.map((e) => TagDto.fromJson(e as Map)) + .toList() ?? + [], + assignExamCount: (json['assignExamCount'] as num?)?.toInt(), + ); + +Map _$ExamListDtoToJson(ExamListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'duration': instance.duration, + 'avatar': instance.avatar, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'totalMark': instance.totalMark, + 'totalQuestion': instance.totalQuestion, + 'schoolId': instance.schoolId, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'format': examFormatEnumToJson(instance.format), + 'fileUrl': instance.fileUrl, + 'categoryId': instance.categoryId, + 'isLike': instance.isLike, + 'isSystem': instance.isSystem, + 'canEdit': instance.canEdit, + 'isAutoScoring': instance.isAutoScoring, + 'tags': instance.tags?.map((e) => e.toJson()).toList(), + 'assignExamCount': instance.assignExamCount, + }; + +ExamListDtoFilterResult _$ExamListDtoFilterResultFromJson( + Map json) => + ExamListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ExamListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamListDtoFilterResultToJson( + ExamListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ExamListDtoFilterResultApiResponse _$ExamListDtoFilterResultApiResponseFromJson( + Map json) => + ExamListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ExamListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ExamListDtoFilterResultApiResponseToJson( + ExamListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ExamPartDto _$ExamPartDtoFromJson(Map json) => ExamPartDto( + id: json['id'] as String?, + title: json['title'] as String?, + description: json['description'] as String?, + partTime: (json['partTime'] as num?)?.toInt(), + totalMark: (json['totalMark'] as num?)?.toDouble(), + numberOfQuestion: (json['numberOfQuestion'] as num?)?.toInt(), + questions: (json['questions'] as List?) + ?.map((e) => QuestionDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamPartDtoToJson(ExamPartDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'description': instance.description, + 'partTime': instance.partTime, + 'totalMark': instance.totalMark, + 'numberOfQuestion': instance.numberOfQuestion, + 'questions': instance.questions?.map((e) => e.toJson()).toList(), + }; + +ExamPartQuestionSaveDto _$ExamPartQuestionSaveDtoFromJson( + Map json) => + ExamPartQuestionSaveDto( + id: (json['id'] as num?)?.toInt(), + mark: (json['mark'] as num?)?.toDouble(), + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$ExamPartQuestionSaveDtoToJson( + ExamPartQuestionSaveDto instance) => + { + 'id': instance.id, + 'mark': instance.mark, + 'parentId': instance.parentId, + }; + +ExamPartSaveDto _$ExamPartSaveDtoFromJson(Map json) => + ExamPartSaveDto( + id: json['id'] as String?, + title: json['title'] as String?, + partTime: (json['partTime'] as num?)?.toInt(), + totalMark: (json['totalMark'] as num?)?.toDouble(), + description: json['description'] as String?, + numberOfQuestion: (json['numberOfQuestion'] as num?)?.toInt(), + questions: (json['questions'] as List?) + ?.map((e) => + ExamPartQuestionSaveDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamPartSaveDtoToJson(ExamPartSaveDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'partTime': instance.partTime, + 'totalMark': instance.totalMark, + 'description': instance.description, + 'numberOfQuestion': instance.numberOfQuestion, + 'questions': instance.questions?.map((e) => e.toJson()).toList(), + }; + +ExamQuestionEntity _$ExamQuestionEntityFromJson(Map json) => + ExamQuestionEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + examId: (json['examId'] as num?)?.toInt(), + questionId: (json['questionId'] as num?)?.toInt(), + mark: (json['mark'] as num?)?.toDouble(), + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$ExamQuestionEntityToJson(ExamQuestionEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'examId': instance.examId, + 'questionId': instance.questionId, + 'mark': instance.mark, + 'parentId': instance.parentId, + }; + +ExamResultDto _$ExamResultDtoFromJson(Map json) => + ExamResultDto( + userId: (json['userId'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + totalExam: (json['totalExam'] as num?)?.toInt(), + totalExamDone: (json['totalExamDone'] as num?)?.toInt(), + countTest: (json['countTest'] as num?)?.toInt(), + countTestDone: (json['countTestDone'] as num?)?.toInt(), + averageScoreTest: (json['averageScoreTest'] as num?)?.toDouble(), + ); + +Map _$ExamResultDtoToJson(ExamResultDto instance) => + { + 'userId': instance.userId, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'totalExam': instance.totalExam, + 'totalExamDone': instance.totalExamDone, + 'countTest': instance.countTest, + 'countTestDone': instance.countTestDone, + 'averageScoreTest': instance.averageScoreTest, + }; + +ExamResultDtoFilterResult _$ExamResultDtoFilterResultFromJson( + Map json) => + ExamResultDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ExamResultDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ExamResultDtoFilterResultToJson( + ExamResultDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ExamResultFilterDto _$ExamResultFilterDtoFromJson(Map json) => + ExamResultFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + classId: (json['classId'] as num?)?.toInt(), + ); + +Map _$ExamResultFilterDtoToJson( + ExamResultFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'classId': instance.classId, + }; + +ExamSaveDto _$ExamSaveDtoFromJson(Map json) => ExamSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + avatar: json['avatar'] as String?, + duration: (json['duration'] as num?)?.toInt(), + type: examTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: examStatusEnumFromJson((json['status'] as num?)?.toInt()), + totalMark: (json['totalMark'] as num?)?.toDouble(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + fileUrl: json['fileUrl'] as String?, + data: json['data'] == null + ? null + : ExamDataSaveDto.fromJson(json['data'] as Map), + categoryId: (json['categoryId'] as num?)?.toInt(), + isSystem: json['isSystem'] as bool?, + isAutoScoring: json['isAutoScoring'] as bool?, + fileChoiceType: examFileChoiceTypeEnumFromJson( + (json['fileChoiceType'] as num?)?.toInt()), + questions: (json['questions'] as List?) + ?.map( + (e) => ExamQuestionEntity.fromJson(e as Map)) + .toList() ?? + [], + assignExams: (json['assignExams'] as List?) + ?.map((e) => AssignExamEntity.fromJson(e as Map)) + .toList() ?? + [], + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$ExamSaveDtoToJson(ExamSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'avatar': instance.avatar, + 'duration': instance.duration, + 'type': examTypeEnumToJson(instance.type), + 'status': examStatusEnumToJson(instance.status), + 'totalMark': instance.totalMark, + 'totalQuestion': instance.totalQuestion, + 'schoolId': instance.schoolId, + 'classLevel': instance.classLevel, + 'subjectId': instance.subjectId, + 'format': examFormatEnumToJson(instance.format), + 'fileUrl': instance.fileUrl, + 'data': instance.data?.toJson(), + 'categoryId': instance.categoryId, + 'isSystem': instance.isSystem, + 'isAutoScoring': instance.isAutoScoring, + 'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType), + 'questions': instance.questions?.map((e) => e.toJson()).toList(), + 'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(), + 'tagIds': instance.tagIds, + }; + +ExamSaveDtoApiResponse _$ExamSaveDtoApiResponseFromJson( + Map json) => + ExamSaveDtoApiResponse( + data: json['data'] == null + ? null + : ExamSaveDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ExamSaveDtoApiResponseToJson( + ExamSaveDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FacebookLoginDto _$FacebookLoginDtoFromJson(Map json) => + FacebookLoginDto( + code: json['code'] as String?, + accessToken: json['accessToken'] as String?, + ); + +Map _$FacebookLoginDtoToJson(FacebookLoginDto instance) => + { + 'code': instance.code, + 'accessToken': instance.accessToken, + }; + +FileEntity _$FileEntityFromJson(Map json) => FileEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + path: json['path'] as String?, + contentType: json['contentType'] as String?, + width: (json['width'] as num?)?.toInt(), + height: (json['height'] as num?)?.toInt(), + size: (json['size'] as num?)?.toInt(), + extension: json['extension'] as String?, + folderId: (json['folderId'] as num?)?.toInt(), + status: (json['status'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + thumbnails: json['thumbnails'] as String?, + streamUrl: json['streamUrl'] as String?, + duration: (json['duration'] as num?)?.toDouble(), + fileType: json['fileType'] as String?, + objectType: (json['objectType'] as num?)?.toInt(), + parentId: (json['parentId'] as num?)?.toInt(), + metaDatas: (json['metaDatas'] as List?) + ?.map( + (e) => FileMetaDataEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$FileEntityToJson(FileEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'path': instance.path, + 'contentType': instance.contentType, + 'width': instance.width, + 'height': instance.height, + 'size': instance.size, + 'extension': instance.extension, + 'folderId': instance.folderId, + 'status': instance.status, + 'avatar': instance.avatar, + 'thumbnails': instance.thumbnails, + 'streamUrl': instance.streamUrl, + 'duration': instance.duration, + 'fileType': instance.fileType, + 'objectType': instance.objectType, + 'parentId': instance.parentId, + 'metaDatas': instance.metaDatas?.map((e) => e.toJson()).toList(), + }; + +FileEntityFilterResult _$FileEntityFilterResultFromJson( + Map json) => + FileEntityFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => FileEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$FileEntityFilterResultToJson( + FileEntityFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +FileEntityFilterResultApiResponse _$FileEntityFilterResultApiResponseFromJson( + Map json) => + FileEntityFilterResultApiResponse( + data: json['data'] == null + ? null + : FileEntityFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$FileEntityFilterResultApiResponseToJson( + FileEntityFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FileGetListQuery _$FileGetListQueryFromJson(Map json) => + FileGetListQuery( + userId: (json['userId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + folderId: (json['folderId'] as num?)?.toInt(), + extensions: json['extensions'] as String?, + isGetAll: json['isGetAll'] as bool?, + status: (json['status'] as num?)?.toInt(), + sortBy: json['sortBy'] as String?, + sortDirection: json['sortDirection'] as String?, + pageIndex: (json['pageIndex'] as num?)?.toInt(), + pageSize: (json['pageSize'] as num?)?.toInt(), + ); + +Map _$FileGetListQueryToJson(FileGetListQuery instance) => + { + 'userId': instance.userId, + 'keyword': instance.keyword, + 'folderId': instance.folderId, + 'extensions': instance.extensions, + 'isGetAll': instance.isGetAll, + 'status': instance.status, + 'sortBy': instance.sortBy, + 'sortDirection': instance.sortDirection, + 'pageIndex': instance.pageIndex, + 'pageSize': instance.pageSize, + }; + +FileMetaDataEntity _$FileMetaDataEntityFromJson(Map json) => + FileMetaDataEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + fileId: (json['fileId'] as num?)?.toInt(), + metaDirectory: json['metaDirectory'] as String?, + metaKey: json['metaKey'] as String?, + metaValue: json['metaValue'] as String?, + ); + +Map _$FileMetaDataEntityToJson(FileMetaDataEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'fileId': instance.fileId, + 'metaDirectory': instance.metaDirectory, + 'metaKey': instance.metaKey, + 'metaValue': instance.metaValue, + }; + +FileMetaDataEntityListApiResponse _$FileMetaDataEntityListApiResponseFromJson( + Map json) => + FileMetaDataEntityListApiResponse( + data: (json['data'] as List?) + ?.map( + (e) => FileMetaDataEntity.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$FileMetaDataEntityListApiResponseToJson( + FileMetaDataEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FileUpdateAvatarCommand _$FileUpdateAvatarCommandFromJson( + Map json) => + FileUpdateAvatarCommand( + id: (json['id'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + ); + +Map _$FileUpdateAvatarCommandToJson( + FileUpdateAvatarCommand instance) => + { + 'id': instance.id, + 'avatar': instance.avatar, + }; + +FileUpdateCommand _$FileUpdateCommandFromJson(Map json) => + FileUpdateCommand( + file: json['file'] == null + ? null + : FileEntity.fromJson(json['file'] as Map), + ); + +Map _$FileUpdateCommandToJson(FileUpdateCommand instance) => + { + 'file': instance.file?.toJson(), + }; + +FileUpdateNameCommand _$FileUpdateNameCommandFromJson( + Map json) => + FileUpdateNameCommand( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + ); + +Map _$FileUpdateNameCommandToJson( + FileUpdateNameCommand instance) => + { + 'id': instance.id, + 'name': instance.name, + }; + +FileUpdateStatusCommand _$FileUpdateStatusCommandFromJson( + Map json) => + FileUpdateStatusCommand( + id: (json['id'] as num?)?.toInt(), + status: fileStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$FileUpdateStatusCommandToJson( + FileUpdateStatusCommand instance) => + { + 'id': instance.id, + 'status': fileStatusEnumToJson(instance.status), + }; + +FileUploadByUrlResponseDto _$FileUploadByUrlResponseDtoFromJson( + Map json) => + FileUploadByUrlResponseDto( + path: json['path'] as String?, + ); + +Map _$FileUploadByUrlResponseDtoToJson( + FileUploadByUrlResponseDto instance) => + { + 'path': instance.path, + }; + +FileUploadByUrlResponseDtoApiResponse + _$FileUploadByUrlResponseDtoApiResponseFromJson( + Map json) => + FileUploadByUrlResponseDtoApiResponse( + data: json['data'] == null + ? null + : FileUploadByUrlResponseDto.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$FileUploadByUrlResponseDtoApiResponseToJson( + FileUploadByUrlResponseDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FolderDeleteCommand _$FolderDeleteCommandFromJson(Map json) => + FolderDeleteCommand( + id: (json['id'] as num?)?.toInt(), + moveFileToFolderId: (json['moveFileToFolderId'] as num?)?.toInt(), + ); + +Map _$FolderDeleteCommandToJson( + FolderDeleteCommand instance) => + { + 'id': instance.id, + 'moveFileToFolderId': instance.moveFileToFolderId, + }; + +FolderEntity _$FolderEntityFromJson(Map json) => FolderEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$FolderEntityToJson(FolderEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'parentId': instance.parentId, + }; + +FolderEntityApiResponse _$FolderEntityApiResponseFromJson( + Map json) => + FolderEntityApiResponse( + data: json['data'] == null + ? null + : FolderEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$FolderEntityApiResponseToJson( + FolderEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FolderGetAllQuery _$FolderGetAllQueryFromJson(Map json) => + FolderGetAllQuery(); + +Map _$FolderGetAllQueryToJson(FolderGetAllQuery instance) => + {}; + +FolderGetListQuery _$FolderGetListQueryFromJson(Map json) => + FolderGetListQuery( + keyword: json['keyword'] as String?, + isGetAll: json['isGetAll'] as bool?, + ); + +Map _$FolderGetListQueryToJson(FolderGetListQuery instance) => + { + 'keyword': instance.keyword, + 'isGetAll': instance.isGetAll, + }; + +FolderNodeDataDto _$FolderNodeDataDtoFromJson(Map json) => + FolderNodeDataDto( + id: (json['id'] as num?)?.toInt(), + parentId: (json['parentId'] as num?)?.toInt(), + fileCount: (json['fileCount'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + ); + +Map _$FolderNodeDataDtoToJson(FolderNodeDataDto instance) => + { + 'id': instance.id, + 'parentId': instance.parentId, + 'fileCount': instance.fileCount, + 'createdBy': instance.createdBy, + }; + +FolderNodeDto _$FolderNodeDtoFromJson(Map json) => + FolderNodeDto( + id: json['id'] as String?, + text: json['text'] as String?, + data: json['data'] == null + ? null + : FolderNodeDataDto.fromJson(json['data'] as Map), + children: (json['children'] as List?) + ?.map((e) => FolderNodeDto.fromJson(e as Map)) + .toList() ?? + [], + state: json['state'] == null + ? null + : FolderNodeStateDto.fromJson(json['state'] as Map), + ); + +Map _$FolderNodeDtoToJson(FolderNodeDto instance) => + { + 'id': instance.id, + 'text': instance.text, + 'data': instance.data?.toJson(), + 'children': instance.children?.map((e) => e.toJson()).toList(), + 'state': instance.state?.toJson(), + }; + +FolderNodeDtoListApiResponse _$FolderNodeDtoListApiResponseFromJson( + Map json) => + FolderNodeDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => FolderNodeDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$FolderNodeDtoListApiResponseToJson( + FolderNodeDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +FolderNodeStateDto _$FolderNodeStateDtoFromJson(Map json) => + FolderNodeStateDto( + selected: json['selected'] as bool?, + opened: json['opened'] as bool?, + disabled: json['disabled'] as bool?, + ); + +Map _$FolderNodeStateDtoToJson(FolderNodeStateDto instance) => + { + 'selected': instance.selected, + 'opened': instance.opened, + 'disabled': instance.disabled, + }; + +FolderUpdateCommand _$FolderUpdateCommandFromJson(Map json) => + FolderUpdateCommand( + folder: json['folder'] == null + ? null + : FolderUpdateDto.fromJson(json['folder'] as Map), + ); + +Map _$FolderUpdateCommandToJson( + FolderUpdateCommand instance) => + { + 'folder': instance.folder?.toJson(), + }; + +FolderUpdateDto _$FolderUpdateDtoFromJson(Map json) => + FolderUpdateDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$FolderUpdateDtoToJson(FolderUpdateDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'parentId': instance.parentId, + }; + +ForgotPasswordCheckOTPResource _$ForgotPasswordCheckOTPResourceFromJson( + Map json) => + ForgotPasswordCheckOTPResource( + username: json['username'] as String?, + otp: json['otp'] as String?, + ); + +Map _$ForgotPasswordCheckOTPResourceToJson( + ForgotPasswordCheckOTPResource instance) => + { + 'username': instance.username, + 'otp': instance.otp, + }; + +GalleryEntity _$GalleryEntityFromJson(Map json) => + GalleryEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + media: json['media'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + ); + +Map _$GalleryEntityToJson(GalleryEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'media': instance.media, + 'categoryId': instance.categoryId, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + }; + +GalleryEntityApiResponse _$GalleryEntityApiResponseFromJson( + Map json) => + GalleryEntityApiResponse( + data: json['data'] == null + ? null + : GalleryEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$GalleryEntityApiResponseToJson( + GalleryEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +GalleryGetListQuery _$GalleryGetListQueryFromJson(Map json) => + GalleryGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + categoryUrl: json['categoryUrl'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$GalleryGetListQueryToJson( + GalleryGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'categoryId': instance.categoryId, + 'categoryUrl': instance.categoryUrl, + 'status': commonStatusEnumToJson(instance.status), + }; + +GalleryListDto _$GalleryListDtoFromJson(Map json) => + GalleryListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + media: json['media'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$GalleryListDtoToJson(GalleryListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'media': instance.media, + 'categoryId': instance.categoryId, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'tagIds': instance.tagIds, + }; + +GalleryListDtoFilterResult _$GalleryListDtoFilterResultFromJson( + Map json) => + GalleryListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => GalleryListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$GalleryListDtoFilterResultToJson( + GalleryListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +GalleryListDtoFilterResultApiResponse + _$GalleryListDtoFilterResultApiResponseFromJson( + Map json) => + GalleryListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : GalleryListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$GalleryListDtoFilterResultApiResponseToJson( + GalleryListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +GallerySaveDto _$GallerySaveDtoFromJson(Map json) => + GallerySaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + description: json['description'] as String?, + media: json['media'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$GallerySaveDtoToJson(GallerySaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'description': instance.description, + 'media': instance.media, + 'categoryId': instance.categoryId, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'tagIds': instance.tagIds, + }; + +GallerySaveDtoApiResponse _$GallerySaveDtoApiResponseFromJson( + Map json) => + GallerySaveDtoApiResponse( + data: json['data'] == null + ? null + : GallerySaveDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$GallerySaveDtoApiResponseToJson( + GallerySaveDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +GetListLogQuery _$GetListLogQueryFromJson(Map json) => + GetListLogQuery( + keyword: json['keyword'] as String?, + objectType: json['objectType'] as String?, + pageIndex: (json['pageIndex'] as num?)?.toInt(), + pageSize: (json['pageSize'] as num?)?.toInt(), + ); + +Map _$GetListLogQueryToJson(GetListLogQuery instance) => + { + 'keyword': instance.keyword, + 'objectType': instance.objectType, + 'pageIndex': instance.pageIndex, + 'pageSize': instance.pageSize, + }; + +GetListUserForCreateChatGroupQuery _$GetListUserForCreateChatGroupQueryFromJson( + Map json) => + GetListUserForCreateChatGroupQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + status: (json['status'] as num?)?.toInt(), + chatGroupType: (json['chatGroupType'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + roleIds: (json['roleIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + ); + +Map _$GetListUserForCreateChatGroupQueryToJson( + GetListUserForCreateChatGroupQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'status': instance.status, + 'chatGroupType': instance.chatGroupType, + 'keyword': instance.keyword, + 'roleIds': instance.roleIds, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + }; + +GoogleLoginDto _$GoogleLoginDtoFromJson(Map json) => + GoogleLoginDto( + code: json['code'] as String?, + accessToken: json['accessToken'] as String?, + ); + +Map _$GoogleLoginDtoToJson(GoogleLoginDto instance) => + { + 'code': instance.code, + 'accessToken': instance.accessToken, + }; + +Int64ApiResponse _$Int64ApiResponseFromJson(Map json) => + Int64ApiResponse( + data: (json['data'] as num?)?.toInt(), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$Int64ApiResponseToJson(Int64ApiResponse instance) => + { + 'data': instance.data, + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ListActivityLogDto _$ListActivityLogDtoFromJson(Map json) => + ListActivityLogDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + data: json['data'] as String?, + objectType: json['objectType'] as String?, + ip: json['ip'] as String?, + createdName: json['createdName'] as String?, + createdAvatar: json['createdAvatar'] as String?, + ); + +Map _$ListActivityLogDtoToJson(ListActivityLogDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'data': instance.data, + 'objectType': instance.objectType, + 'ip': instance.ip, + 'createdName': instance.createdName, + 'createdAvatar': instance.createdAvatar, + }; + +ListActivityLogDtoFilterResult _$ListActivityLogDtoFilterResultFromJson( + Map json) => + ListActivityLogDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map( + (e) => ListActivityLogDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ListActivityLogDtoFilterResultToJson( + ListActivityLogDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ListActivityLogDtoFilterResultApiResponse + _$ListActivityLogDtoFilterResultApiResponseFromJson( + Map json) => + ListActivityLogDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ListActivityLogDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ListActivityLogDtoFilterResultApiResponseToJson( + ListActivityLogDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ListChatGroupDto _$ListChatGroupDtoFromJson(Map json) => + ListChatGroupDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: (json['type'] as num?)?.toInt(), + documentId: (json['documentId'] as num?)?.toInt(), + lastMessage: json['lastMessage'] as String?, + lastMessageDate: json['lastMessageDate'] == null + ? null + : DateTime.parse(json['lastMessageDate'] as String), + isOnline: json['isOnline'] as bool?, + lastMessageType: (json['lastMessageType'] as num?)?.toInt(), + friendId: (json['friendId'] as num?)?.toInt(), + lastMessageId: (json['lastMessageId'] as num?)?.toInt(), + lastMessageIsRead: json['lastMessageIsRead'] as bool?, + ); + +Map _$ListChatGroupDtoToJson(ListChatGroupDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': instance.type, + 'documentId': instance.documentId, + 'lastMessage': instance.lastMessage, + 'lastMessageDate': instance.lastMessageDate?.toIso8601String(), + 'isOnline': instance.isOnline, + 'lastMessageType': instance.lastMessageType, + 'friendId': instance.friendId, + 'lastMessageId': instance.lastMessageId, + 'lastMessageIsRead': instance.lastMessageIsRead, + }; + +ListChatGroupDtoFilterResult _$ListChatGroupDtoFilterResultFromJson( + Map json) => + ListChatGroupDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ListChatGroupDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ListChatGroupDtoFilterResultToJson( + ListChatGroupDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ListChatGroupDtoFilterResultApiResponse + _$ListChatGroupDtoFilterResultApiResponseFromJson( + Map json) => + ListChatGroupDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ListChatGroupDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ListChatGroupDtoFilterResultApiResponseToJson( + ListChatGroupDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ListChatMessageByGroupDto _$ListChatMessageByGroupDtoFromJson( + Map json) => + ListChatMessageByGroupDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + senderId: (json['senderId'] as num?)?.toInt(), + chatGroupId: (json['chatGroupId'] as num?)?.toInt(), + content: json['content'] as String?, + type: (json['type'] as num?)?.toInt(), + senderName: json['senderName'] as String?, + senderAvatar: json['senderAvatar'] as String?, + chatGroupName: json['chatGroupName'] as String?, + chatGroupAvatar: json['chatGroupAvatar'] as String?, + listFilePath: (json['listFilePath'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + isOnline: json['isOnline'] as bool?, + chatGroupType: (json['chatGroupType'] as num?)?.toInt(), + isRead: json['isRead'] as bool?, + ); + +Map _$ListChatMessageByGroupDtoToJson( + ListChatMessageByGroupDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'senderId': instance.senderId, + 'chatGroupId': instance.chatGroupId, + 'content': instance.content, + 'type': instance.type, + 'senderName': instance.senderName, + 'senderAvatar': instance.senderAvatar, + 'chatGroupName': instance.chatGroupName, + 'chatGroupAvatar': instance.chatGroupAvatar, + 'listFilePath': instance.listFilePath, + 'isOnline': instance.isOnline, + 'chatGroupType': instance.chatGroupType, + 'isRead': instance.isRead, + }; + +ListChatMessageByGroupDtoFilterResult + _$ListChatMessageByGroupDtoFilterResultFromJson( + Map json) => + ListChatMessageByGroupDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ListChatMessageByGroupDto.fromJson( + e as Map)) + .toList() ?? + [], + ); + +Map _$ListChatMessageByGroupDtoFilterResultToJson( + ListChatMessageByGroupDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ListChatMessageByGroupDtoFilterResultApiResponse + _$ListChatMessageByGroupDtoFilterResultApiResponseFromJson( + Map json) => + ListChatMessageByGroupDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ListChatMessageByGroupDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ListChatMessageByGroupDtoFilterResultApiResponseToJson( + ListChatMessageByGroupDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +LocalityEntity _$LocalityEntityFromJson(Map json) => + LocalityEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + fullName: json['fullName'] as String?, + otherName: json['otherName'] as String?, + url: json['url'] as String?, + unitType: json['unitType'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + priority: (json['priority'] as num?)?.toInt(), + type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$LocalityEntityToJson(LocalityEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'fullName': instance.fullName, + 'otherName': instance.otherName, + 'url': instance.url, + 'unitType': instance.unitType, + 'parentId': instance.parentId, + 'priority': instance.priority, + 'type': localityTypeEnumToJson(instance.type), + 'status': localityStatusEnumToJson(instance.status), + }; + +LocalityEntityFilterResult _$LocalityEntityFilterResultFromJson( + Map json) => + LocalityEntityFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => LocalityEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$LocalityEntityFilterResultToJson( + LocalityEntityFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +LocalityEntityFilterResultApiResponse + _$LocalityEntityFilterResultApiResponseFromJson( + Map json) => + LocalityEntityFilterResultApiResponse( + data: json['data'] == null + ? null + : LocalityEntityFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$LocalityEntityFilterResultApiResponseToJson( + LocalityEntityFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +LocalityEntityListApiResponse _$LocalityEntityListApiResponseFromJson( + Map json) => + LocalityEntityListApiResponse( + data: (json['data'] as List?) + ?.map((e) => LocalityEntity.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$LocalityEntityListApiResponseToJson( + LocalityEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +LocalityGetListQuery _$LocalityGetListQueryFromJson( + Map json) => + LocalityGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()), + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$LocalityGetListQueryToJson( + LocalityGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'type': localityTypeEnumToJson(instance.type), + 'parentId': instance.parentId, + }; + +LoginResponseDto _$LoginResponseDtoFromJson(Map json) => + LoginResponseDto( + require2Fa: json['require2Fa'] as bool?, + token: json['token'] as String?, + refreshToken: json['refreshToken'] as String?, + userInfo: json['userInfo'] == null + ? null + : UserInfoDto.fromJson(json['userInfo'] as Map), + ); + +Map _$LoginResponseDtoToJson(LoginResponseDto instance) => + { + 'require2Fa': instance.require2Fa, + 'token': instance.token, + 'refreshToken': instance.refreshToken, + 'userInfo': instance.userInfo?.toJson(), + }; + +LoginResponseDtoApiResponse _$LoginResponseDtoApiResponseFromJson( + Map json) => + LoginResponseDtoApiResponse( + data: json['data'] == null + ? null + : LoginResponseDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$LoginResponseDtoApiResponseToJson( + LoginResponseDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +LoginWith2FADto _$LoginWith2FADtoFromJson(Map json) => + LoginWith2FADto( + userName: json['userName'] as String?, + code: json['code'] as String?, + ); + +Map _$LoginWith2FADtoToJson(LoginWith2FADto instance) => + { + 'userName': instance.userName, + 'code': instance.code, + }; + +NewsDetailDto _$NewsDetailDtoFromJson(Map json) => + NewsDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + summary: json['summary'] as String?, + content: json['content'] as String?, + image: json['image'] as String?, + author: json['author'] as String?, + publishedDate: json['publishedDate'] == null + ? null + : DateTime.parse(json['publishedDate'] as String), + viewCount: (json['viewCount'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isFeatured: json['isFeatured'] as bool?, + relatedNewsIds: (json['relatedNewsIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + tags: (json['tags'] as List?) + ?.map((e) => TagDto.fromJson(e as Map)) + .toList() ?? + [], + relatedNews: (json['relatedNews'] as List?) + ?.map((e) => NewsListDto.fromJson(e as Map)) + .toList() ?? + [], + category: json['category'], + ); + +Map _$NewsDetailDtoToJson(NewsDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'summary': instance.summary, + 'content': instance.content, + 'image': instance.image, + 'author': instance.author, + 'publishedDate': instance.publishedDate?.toIso8601String(), + 'viewCount': instance.viewCount, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'categoryId': instance.categoryId, + 'isFeatured': instance.isFeatured, + 'relatedNewsIds': instance.relatedNewsIds, + 'tagIds': instance.tagIds, + 'tags': instance.tags?.map((e) => e.toJson()).toList(), + 'relatedNews': instance.relatedNews?.map((e) => e.toJson()).toList(), + 'category': instance.category, + }; + +NewsDetailDtoApiResponse _$NewsDetailDtoApiResponseFromJson( + Map json) => + NewsDetailDtoApiResponse( + data: json['data'] == null + ? null + : NewsDetailDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$NewsDetailDtoApiResponseToJson( + NewsDetailDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +NewsEntity _$NewsEntityFromJson(Map json) => NewsEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + summary: json['summary'] as String?, + content: json['content'] as String?, + image: json['image'] as String?, + author: json['author'] as String?, + publishedDate: json['publishedDate'] == null + ? null + : DateTime.parse(json['publishedDate'] as String), + viewCount: (json['viewCount'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isFeatured: json['isFeatured'] as bool?, + relatedNewsIds: json['relatedNewsIds'] as String?, + ); + +Map _$NewsEntityToJson(NewsEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'summary': instance.summary, + 'content': instance.content, + 'image': instance.image, + 'author': instance.author, + 'publishedDate': instance.publishedDate?.toIso8601String(), + 'viewCount': instance.viewCount, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'categoryId': instance.categoryId, + 'isFeatured': instance.isFeatured, + 'relatedNewsIds': instance.relatedNewsIds, + }; + +NewsEntityApiResponse _$NewsEntityApiResponseFromJson( + Map json) => + NewsEntityApiResponse( + data: json['data'] == null + ? null + : NewsEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$NewsEntityApiResponseToJson( + NewsEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +NewsGetListQuery _$NewsGetListQueryFromJson(Map json) => + NewsGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + categoryUrl: json['categoryUrl'] as String?, + tagId: (json['tagId'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + isFeatured: json['isFeatured'] as bool?, + excludeIds: (json['excludeIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + includeIds: (json['includeIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$NewsGetListQueryToJson(NewsGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'categoryId': instance.categoryId, + 'categoryUrl': instance.categoryUrl, + 'tagId': instance.tagId, + 'status': commonStatusEnumToJson(instance.status), + 'isFeatured': instance.isFeatured, + 'excludeIds': instance.excludeIds, + 'includeIds': instance.includeIds, + }; + +NewsListDto _$NewsListDtoFromJson(Map json) => NewsListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + summary: json['summary'] as String?, + content: json['content'] as String?, + image: json['image'] as String?, + author: json['author'] as String?, + publishedDate: json['publishedDate'] == null + ? null + : DateTime.parse(json['publishedDate'] as String), + viewCount: (json['viewCount'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isFeatured: json['isFeatured'] as bool?, + relatedNewsIds: (json['relatedNewsIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$NewsListDtoToJson(NewsListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'summary': instance.summary, + 'content': instance.content, + 'image': instance.image, + 'author': instance.author, + 'publishedDate': instance.publishedDate?.toIso8601String(), + 'viewCount': instance.viewCount, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'categoryId': instance.categoryId, + 'isFeatured': instance.isFeatured, + 'relatedNewsIds': instance.relatedNewsIds, + 'tagIds': instance.tagIds, + }; + +NewsListDtoFilterResult _$NewsListDtoFilterResultFromJson( + Map json) => + NewsListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => NewsListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$NewsListDtoFilterResultToJson( + NewsListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +NewsListDtoFilterResultApiResponse _$NewsListDtoFilterResultApiResponseFromJson( + Map json) => + NewsListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : NewsListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$NewsListDtoFilterResultApiResponseToJson( + NewsListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +NewsSaveDto _$NewsSaveDtoFromJson(Map json) => NewsSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + title: json['title'] as String?, + summary: json['summary'] as String?, + content: json['content'] as String?, + image: json['image'] as String?, + author: json['author'] as String?, + publishedDate: json['publishedDate'] == null + ? null + : DateTime.parse(json['publishedDate'] as String), + viewCount: (json['viewCount'] as num?)?.toInt(), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + isFeatured: json['isFeatured'] as bool?, + relatedNewsIds: (json['relatedNewsIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$NewsSaveDtoToJson(NewsSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'title': instance.title, + 'summary': instance.summary, + 'content': instance.content, + 'image': instance.image, + 'author': instance.author, + 'publishedDate': instance.publishedDate?.toIso8601String(), + 'viewCount': instance.viewCount, + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'categoryId': instance.categoryId, + 'isFeatured': instance.isFeatured, + 'relatedNewsIds': instance.relatedNewsIds, + 'tagIds': instance.tagIds, + }; + +NotificationDto _$NotificationDtoFromJson(Map json) => + NotificationDto( + id: (json['id'] as num?)?.toInt(), + title: json['title'] as String?, + content: json['content'] as String?, + type: json['type'] as String?, + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + isRead: json['isRead'] as bool?, + url: json['url'] as String?, + ); + +Map _$NotificationDtoToJson(NotificationDto instance) => + { + 'id': instance.id, + 'title': instance.title, + 'content': instance.content, + 'type': instance.type, + 'createdDate': instance.createdDate?.toIso8601String(), + 'isRead': instance.isRead, + 'url': instance.url, + }; + +NotificationDtoFilterResult _$NotificationDtoFilterResultFromJson( + Map json) => + NotificationDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => NotificationDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$NotificationDtoFilterResultToJson( + NotificationDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ObjectApiResponse _$ObjectApiResponseFromJson(Map json) => + ObjectApiResponse( + data: json['data'], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ObjectApiResponseToJson(ObjectApiResponse instance) => + { + 'data': instance.data, + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ObjectLikeSaveCommand _$ObjectLikeSaveCommandFromJson( + Map json) => + ObjectLikeSaveCommand( + objectId: (json['objectId'] as num?)?.toInt(), + objectType: objectTypeEnumFromJson((json['objectType'] as num?)?.toInt()), + ); + +Map _$ObjectLikeSaveCommandToJson( + ObjectLikeSaveCommand instance) => + { + 'objectId': instance.objectId, + 'objectType': objectTypeEnumToJson(instance.objectType), + }; + +OfficeDto _$OfficeDtoFromJson(Map json) => OfficeDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + fullName: json['fullName'] as String?, + otherName: json['otherName'] as String?, + url: json['url'] as String?, + unitType: json['unitType'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + priority: (json['priority'] as num?)?.toInt(), + type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()), + status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()), + parentName: json['parentName'] as String?, + schoolCount: (json['schoolCount'] as num?)?.toInt(), + schoolActiveCount: (json['schoolActiveCount'] as num?)?.toInt(), + ); + +Map _$OfficeDtoToJson(OfficeDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'fullName': instance.fullName, + 'otherName': instance.otherName, + 'url': instance.url, + 'unitType': instance.unitType, + 'parentId': instance.parentId, + 'priority': instance.priority, + 'type': localityTypeEnumToJson(instance.type), + 'status': localityStatusEnumToJson(instance.status), + 'parentName': instance.parentName, + 'schoolCount': instance.schoolCount, + 'schoolActiveCount': instance.schoolActiveCount, + }; + +OfficeDtoFilterResult _$OfficeDtoFilterResultFromJson( + Map json) => + OfficeDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => OfficeDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$OfficeDtoFilterResultToJson( + OfficeDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +OfficeDtoFilterResultApiResponse _$OfficeDtoFilterResultApiResponseFromJson( + Map json) => + OfficeDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : OfficeDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$OfficeDtoFilterResultApiResponseToJson( + OfficeDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +OfficeGetListQuery _$OfficeGetListQueryFromJson(Map json) => + OfficeGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + ); + +Map _$OfficeGetListQueryToJson(OfficeGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'parentId': instance.parentId, + }; + +OrderCreateDto _$OrderCreateDtoFromJson(Map json) => + OrderCreateDto( + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + address: json['address'] as String?, + notes: json['notes'] as String?, + ); + +Map _$OrderCreateDtoToJson(OrderCreateDto instance) => + { + 'fullName': instance.fullName, + 'phone': instance.phone, + 'address': instance.address, + 'notes': instance.notes, + }; + +OrderCreateWithClassDto _$OrderCreateWithClassDtoFromJson( + Map json) => + OrderCreateWithClassDto( + productId: (json['productId'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + address: json['address'] as String?, + notes: json['notes'] as String?, + ); + +Map _$OrderCreateWithClassDtoToJson( + OrderCreateWithClassDto instance) => + { + 'productId': instance.productId, + 'classId': instance.classId, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'address': instance.address, + 'notes': instance.notes, + }; + +OrderDto _$OrderDtoFromJson(Map json) => OrderDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + address: json['address'] as String?, + notes: json['notes'] as String?, + totalAmount: (json['totalAmount'] as num?)?.toDouble(), + status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()), + items: (json['items'] as List?) + ?.map((e) => OrderItemDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$OrderDtoToJson(OrderDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'address': instance.address, + 'notes': instance.notes, + 'totalAmount': instance.totalAmount, + 'status': orderStatusEnumToJson(instance.status), + 'items': instance.items?.map((e) => e.toJson()).toList(), + }; + +OrderDtoApiResponse _$OrderDtoApiResponseFromJson(Map json) => + OrderDtoApiResponse( + data: json['data'] == null + ? null + : OrderDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$OrderDtoApiResponseToJson( + OrderDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +OrderDtoFilterResult _$OrderDtoFilterResultFromJson( + Map json) => + OrderDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => OrderDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$OrderDtoFilterResultToJson( + OrderDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +OrderDtoFilterResultApiResponse _$OrderDtoFilterResultApiResponseFromJson( + Map json) => + OrderDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : OrderDtoFilterResult.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$OrderDtoFilterResultApiResponseToJson( + OrderDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +OrderEntity _$OrderEntityFromJson(Map json) => OrderEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + address: json['address'] as String?, + notes: json['notes'] as String?, + totalAmount: (json['totalAmount'] as num?)?.toDouble(), + status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()), + items: (json['items'] as List?) + ?.map((e) => OrderItemEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$OrderEntityToJson(OrderEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'address': instance.address, + 'notes': instance.notes, + 'totalAmount': instance.totalAmount, + 'status': orderStatusEnumToJson(instance.status), + 'items': instance.items?.map((e) => e.toJson()).toList(), + }; + +OrderEntityApiResponse _$OrderEntityApiResponseFromJson( + Map json) => + OrderEntityApiResponse( + data: json['data'] == null + ? null + : OrderEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$OrderEntityApiResponseToJson( + OrderEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +OrderGetListQuery _$OrderGetListQueryFromJson(Map json) => + OrderGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + userId: (json['userId'] as num?)?.toInt(), + status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$OrderGetListQueryToJson(OrderGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'userId': instance.userId, + 'status': orderStatusEnumToJson(instance.status), + }; + +OrderItemDto _$OrderItemDtoFromJson(Map json) => OrderItemDto( + id: (json['id'] as num?)?.toInt(), + orderId: (json['orderId'] as num?)?.toInt(), + productId: (json['productId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + unitPrice: (json['unitPrice'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + totalPrice: (json['totalPrice'] as num?)?.toDouble(), + product: json['product'] == null + ? null + : ProductListDto.fromJson(json['product'] as Map), + ); + +Map _$OrderItemDtoToJson(OrderItemDto instance) => + { + 'id': instance.id, + 'orderId': instance.orderId, + 'productId': instance.productId, + 'quantity': instance.quantity, + 'unitPrice': instance.unitPrice, + 'salePrice': instance.salePrice, + 'totalPrice': instance.totalPrice, + 'product': instance.product?.toJson(), + }; + +OrderItemEntity _$OrderItemEntityFromJson(Map json) => + OrderItemEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + orderId: (json['orderId'] as num?)?.toInt(), + productId: (json['productId'] as num?)?.toInt(), + quantity: (json['quantity'] as num?)?.toInt(), + unitPrice: (json['unitPrice'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + totalPrice: (json['totalPrice'] as num?)?.toDouble(), + order: json['order'] == null + ? null + : OrderEntity.fromJson(json['order'] as Map), + product: json['product'] == null + ? null + : ProductEntity.fromJson(json['product'] as Map), + ); + +Map _$OrderItemEntityToJson(OrderItemEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'orderId': instance.orderId, + 'productId': instance.productId, + 'quantity': instance.quantity, + 'unitPrice': instance.unitPrice, + 'salePrice': instance.salePrice, + 'totalPrice': instance.totalPrice, + 'order': instance.order?.toJson(), + 'product': instance.product?.toJson(), + }; + +OrderUpdateDto _$OrderUpdateDtoFromJson(Map json) => + OrderUpdateDto( + status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()), + notes: json['notes'] as String?, + fullName: json['fullName'] as String?, + phone: json['phone'] as String?, + address: json['address'] as String?, + ); + +Map _$OrderUpdateDtoToJson(OrderUpdateDto instance) => + { + 'status': orderStatusEnumToJson(instance.status), + 'notes': instance.notes, + 'fullName': instance.fullName, + 'phone': instance.phone, + 'address': instance.address, + }; + +ProductAttributeSaveDto _$ProductAttributeSaveDtoFromJson( + Map json) => + ProductAttributeSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + productId: (json['productId'] as num?)?.toInt(), + name: json['name'] as String?, + icon: json['icon'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + ); + +Map _$ProductAttributeSaveDtoToJson( + ProductAttributeSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'productId': instance.productId, + 'name': instance.name, + 'icon': instance.icon, + 'sortOrder': instance.sortOrder, + }; + +ProductChapterDetailDto _$ProductChapterDetailDtoFromJson( + Map json) => + ProductChapterDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + productId: (json['productId'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + lessons: (json['lessons'] as List?) + ?.map((e) => + ProductLessonDetailDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ProductChapterDetailDtoToJson( + ProductChapterDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'productId': instance.productId, + 'name': instance.name, + 'description': instance.description, + 'sortOrder': instance.sortOrder, + 'lessons': instance.lessons?.map((e) => e.toJson()).toList(), + }; + +ProductChapterSaveDto _$ProductChapterSaveDtoFromJson( + Map json) => + ProductChapterSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + productId: (json['productId'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + lessons: (json['lessons'] as List?) + ?.map((e) => + ProductLessonSaveDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ProductChapterSaveDtoToJson( + ProductChapterSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'productId': instance.productId, + 'name': instance.name, + 'description': instance.description, + 'sortOrder': instance.sortOrder, + 'lessons': instance.lessons?.map((e) => e.toJson()).toList(), + }; + +ProductClassDto _$ProductClassDtoFromJson(Map json) => + ProductClassDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + maxStudents: (json['maxStudents'] as num?)?.toInt(), + currentStudents: (json['currentStudents'] as num?)?.toInt(), + startDate: json['startDate'] == null + ? null + : DateTime.parse(json['startDate'] as String), + endDate: json['endDate'] == null + ? null + : DateTime.parse(json['endDate'] as String), + status: classStatusEnumFromJson((json['status'] as num?)?.toInt()), + teacherName: json['teacherName'] as String?, + isFull: json['isFull'] as bool?, + ); + +Map _$ProductClassDtoToJson(ProductClassDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'maxStudents': instance.maxStudents, + 'currentStudents': instance.currentStudents, + 'startDate': instance.startDate?.toIso8601String(), + 'endDate': instance.endDate?.toIso8601String(), + 'status': classStatusEnumToJson(instance.status), + 'teacherName': instance.teacherName, + 'isFull': instance.isFull, + }; + +ProductClassDtoListApiResponse _$ProductClassDtoListApiResponseFromJson( + Map json) => + ProductClassDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => ProductClassDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductClassDtoListApiResponseToJson( + ProductClassDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductComboItemDto _$ProductComboItemDtoFromJson(Map json) => + ProductComboItemDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + price: (json['price'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + totalLessons: (json['totalLessons'] as num?)?.toInt(), + totalDurationMinutes: (json['totalDurationMinutes'] as num?)?.toInt(), + ); + +Map _$ProductComboItemDtoToJson( + ProductComboItemDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'description': instance.description, + 'image': instance.image, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'price': instance.price, + 'salePrice': instance.salePrice, + 'totalLessons': instance.totalLessons, + 'totalDurationMinutes': instance.totalDurationMinutes, + }; + +ProductDetailDto _$ProductDetailDtoFromJson(Map json) => + ProductDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + price: (json['price'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + chapters: (json['chapters'] as List?) + ?.map((e) => + ProductChapterDetailDto.fromJson(e as Map)) + .toList() ?? + [], + comboProducts: (json['comboProducts'] as List?) + ?.map((e) => + ProductComboItemDto.fromJson(e as Map)) + .toList() ?? + [], + attributes: (json['attributes'] as List?) + ?.map((e) => + ProductAttributeSaveDto.fromJson(e as Map)) + .toList() ?? + [], + combos: (json['combos'] as List?) + ?.map((e) => ProductEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ProductDetailDtoToJson(ProductDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'description': instance.description, + 'image': instance.image, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'price': instance.price, + 'salePrice': instance.salePrice, + 'chapters': instance.chapters?.map((e) => e.toJson()).toList(), + 'comboProducts': instance.comboProducts?.map((e) => e.toJson()).toList(), + 'attributes': instance.attributes?.map((e) => e.toJson()).toList(), + 'combos': instance.combos?.map((e) => e.toJson()).toList(), + }; + +ProductDetailDtoApiResponse _$ProductDetailDtoApiResponseFromJson( + Map json) => + ProductDetailDtoApiResponse( + data: json['data'] == null + ? null + : ProductDetailDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductDetailDtoApiResponseToJson( + ProductDetailDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductEntity _$ProductEntityFromJson(Map json) => + ProductEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + price: (json['price'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + ); + +Map _$ProductEntityToJson(ProductEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'description': instance.description, + 'image': instance.image, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'price': instance.price, + 'salePrice': instance.salePrice, + }; + +ProductEntityApiResponse _$ProductEntityApiResponseFromJson( + Map json) => + ProductEntityApiResponse( + data: json['data'] == null + ? null + : ProductEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductEntityApiResponseToJson( + ProductEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductGetByIdsQuery _$ProductGetByIdsQueryFromJson( + Map json) => + ProductGetByIdsQuery( + ids: (json['ids'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$ProductGetByIdsQueryToJson( + ProductGetByIdsQuery instance) => + { + 'ids': instance.ids, + }; + +ProductGetListQuery _$ProductGetListQueryFromJson(Map json) => + ProductGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ProductGetListQueryToJson( + ProductGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + }; + +ProductLessonDetailDto _$ProductLessonDetailDtoFromJson( + Map json) => + ProductLessonDetailDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + chapterId: (json['chapterId'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()), + content: json['content'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + isFree: json['isFree'] as bool?, + ); + +Map _$ProductLessonDetailDtoToJson( + ProductLessonDetailDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'chapterId': instance.chapterId, + 'name': instance.name, + 'description': instance.description, + 'lessonType': lessonTypeEnumToJson(instance.lessonType), + 'content': instance.content, + 'sortOrder': instance.sortOrder, + 'isFree': instance.isFree, + }; + +ProductLessonEntity _$ProductLessonEntityFromJson(Map json) => + ProductLessonEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + chapterId: (json['chapterId'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()), + content: json['content'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + isFree: json['isFree'] as bool?, + ); + +Map _$ProductLessonEntityToJson( + ProductLessonEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'chapterId': instance.chapterId, + 'name': instance.name, + 'description': instance.description, + 'lessonType': lessonTypeEnumToJson(instance.lessonType), + 'content': instance.content, + 'sortOrder': instance.sortOrder, + 'isFree': instance.isFree, + }; + +ProductLessonSaveDto _$ProductLessonSaveDtoFromJson( + Map json) => + ProductLessonSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + chapterId: (json['chapterId'] as num?)?.toInt(), + name: json['name'] as String?, + description: json['description'] as String?, + lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()), + content: json['content'] as String?, + sortOrder: (json['sortOrder'] as num?)?.toInt(), + isFree: json['isFree'] as bool?, + ); + +Map _$ProductLessonSaveDtoToJson( + ProductLessonSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'chapterId': instance.chapterId, + 'name': instance.name, + 'description': instance.description, + 'lessonType': lessonTypeEnumToJson(instance.lessonType), + 'content': instance.content, + 'sortOrder': instance.sortOrder, + 'isFree': instance.isFree, + }; + +ProductListDto _$ProductListDtoFromJson(Map json) => + ProductListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + price: (json['price'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + averageRating: (json['averageRating'] as num?)?.toDouble(), + reviewCount: (json['reviewCount'] as num?)?.toInt(), + ); + +Map _$ProductListDtoToJson(ProductListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'description': instance.description, + 'image': instance.image, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'price': instance.price, + 'salePrice': instance.salePrice, + 'averageRating': instance.averageRating, + 'reviewCount': instance.reviewCount, + }; + +ProductListDtoFilterResult _$ProductListDtoFilterResultFromJson( + Map json) => + ProductListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => ProductListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ProductListDtoFilterResultToJson( + ProductListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ProductListDtoFilterResultApiResponse + _$ProductListDtoFilterResultApiResponseFromJson( + Map json) => + ProductListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ProductListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductListDtoFilterResultApiResponseToJson( + ProductListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductListDtoListApiResponse _$ProductListDtoListApiResponseFromJson( + Map json) => + ProductListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => ProductListDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductListDtoListApiResponseToJson( + ProductListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductReviewApproveCommand _$ProductReviewApproveCommandFromJson( + Map json) => + ProductReviewApproveCommand( + id: (json['id'] as num?)?.toInt(), + status: + productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ProductReviewApproveCommandToJson( + ProductReviewApproveCommand instance) => + { + 'id': instance.id, + 'status': productReviewStatusEnumToJson(instance.status), + }; + +ProductReviewCreateDto _$ProductReviewCreateDtoFromJson( + Map json) => + ProductReviewCreateDto( + productId: (json['productId'] as num?)?.toInt(), + rating: (json['rating'] as num?)?.toInt(), + comment: json['comment'] as String?, + createdByName: json['createdByName'] as String?, + ); + +Map _$ProductReviewCreateDtoToJson( + ProductReviewCreateDto instance) => + { + 'productId': instance.productId, + 'rating': instance.rating, + 'comment': instance.comment, + 'createdByName': instance.createdByName, + }; + +ProductReviewEntity _$ProductReviewEntityFromJson(Map json) => + ProductReviewEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + productId: (json['productId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + avatar: json['avatar'] as String?, + rating: (json['rating'] as num?)?.toInt(), + comment: json['comment'] as String?, + status: + productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ProductReviewEntityToJson( + ProductReviewEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'productId': instance.productId, + 'userId': instance.userId, + 'fullName': instance.fullName, + 'avatar': instance.avatar, + 'rating': instance.rating, + 'comment': instance.comment, + 'status': productReviewStatusEnumToJson(instance.status), + }; + +ProductReviewEntityApiResponse _$ProductReviewEntityApiResponseFromJson( + Map json) => + ProductReviewEntityApiResponse( + data: json['data'] == null + ? null + : ProductReviewEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductReviewEntityApiResponseToJson( + ProductReviewEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductReviewEntityListApiResponse _$ProductReviewEntityListApiResponseFromJson( + Map json) => + ProductReviewEntityListApiResponse( + data: (json['data'] as List?) + ?.map((e) => + ProductReviewEntity.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductReviewEntityListApiResponseToJson( + ProductReviewEntityListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductReviewGenerateAiRequest _$ProductReviewGenerateAiRequestFromJson( + Map json) => + ProductReviewGenerateAiRequest( + count: (json['count'] as num?)?.toInt(), + ); + +Map _$ProductReviewGenerateAiRequestToJson( + ProductReviewGenerateAiRequest instance) => + { + 'count': instance.count, + }; + +ProductReviewGetListQuery _$ProductReviewGetListQueryFromJson( + Map json) => + ProductReviewGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + productId: (json['productId'] as num?)?.toInt(), + status: + productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ProductReviewGetListQueryToJson( + ProductReviewGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'productId': instance.productId, + 'status': productReviewStatusEnumToJson(instance.status), + }; + +ProductReviewListDto _$ProductReviewListDtoFromJson( + Map json) => + ProductReviewListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + productId: (json['productId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + fullName: json['fullName'] as String?, + avatar: json['avatar'] as String?, + rating: (json['rating'] as num?)?.toInt(), + comment: json['comment'] as String?, + status: + productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$ProductReviewListDtoToJson( + ProductReviewListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'productId': instance.productId, + 'userId': instance.userId, + 'fullName': instance.fullName, + 'avatar': instance.avatar, + 'rating': instance.rating, + 'comment': instance.comment, + 'status': productReviewStatusEnumToJson(instance.status), + }; + +ProductReviewListDtoFilterResult _$ProductReviewListDtoFilterResultFromJson( + Map json) => + ProductReviewListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => + ProductReviewListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$ProductReviewListDtoFilterResultToJson( + ProductReviewListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +ProductReviewListDtoFilterResultApiResponse + _$ProductReviewListDtoFilterResultApiResponseFromJson( + Map json) => + ProductReviewListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : ProductReviewListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductReviewListDtoFilterResultApiResponseToJson( + ProductReviewListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ProductSaveDto _$ProductSaveDtoFromJson(Map json) => + ProductSaveDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + categoryId: (json['categoryId'] as num?)?.toInt(), + productType: + productTypeEnumFromJson((json['productType'] as num?)?.toInt()), + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + metaTitle: json['metaTitle'] as String?, + metaDescription: json['metaDescription'] as String?, + metaKeywords: json['metaKeywords'] as String?, + slug: json['slug'] as String?, + price: (json['price'] as num?)?.toDouble(), + salePrice: (json['salePrice'] as num?)?.toDouble(), + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + chapters: (json['chapters'] as List?) + ?.map((e) => + ProductChapterSaveDto.fromJson(e as Map)) + .toList() ?? + [], + attributes: (json['attributes'] as List?) + ?.map((e) => + ProductAttributeSaveDto.fromJson(e as Map)) + .toList() ?? + [], + comboProductIds: (json['comboProductIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$ProductSaveDtoToJson(ProductSaveDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'description': instance.description, + 'image': instance.image, + 'categoryId': instance.categoryId, + 'productType': productTypeEnumToJson(instance.productType), + 'status': commonStatusEnumToJson(instance.status), + 'metaTitle': instance.metaTitle, + 'metaDescription': instance.metaDescription, + 'metaKeywords': instance.metaKeywords, + 'slug': instance.slug, + 'price': instance.price, + 'salePrice': instance.salePrice, + 'tagIds': instance.tagIds, + 'chapters': instance.chapters?.map((e) => e.toJson()).toList(), + 'attributes': instance.attributes?.map((e) => e.toJson()).toList(), + 'comboProductIds': instance.comboProductIds, + }; + +ProductSaveDtoApiResponse _$ProductSaveDtoApiResponseFromJson( + Map json) => + ProductSaveDtoApiResponse( + data: json['data'] == null + ? null + : ProductSaveDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ProductSaveDtoApiResponseToJson( + ProductSaveDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +PupilAddDto _$PupilAddDtoFromJson(Map json) => PupilAddDto( + fullName: json['fullName'] as String?, + email: json['email'] as String?, + phoneNumber: json['phoneNumber'] as String?, + ); + +Map _$PupilAddDtoToJson(PupilAddDto instance) => + { + 'fullName': instance.fullName, + 'email': instance.email, + 'phoneNumber': instance.phoneNumber, + }; + +PupilAddMultiCommand _$PupilAddMultiCommandFromJson( + Map json) => + PupilAddMultiCommand( + pupils: (json['pupils'] as List?) + ?.map((e) => PupilAddDto.fromJson(e as Map)) + .toList() ?? + [], + password: json['password'] as String?, + classId: (json['classId'] as num?)?.toInt(), + ); + +Map _$PupilAddMultiCommandToJson( + PupilAddMultiCommand instance) => + { + 'pupils': instance.pupils?.map((e) => e.toJson()).toList(), + 'password': instance.password, + 'classId': instance.classId, + }; + +PupilChangePasswordCommand _$PupilChangePasswordCommandFromJson( + Map json) => + PupilChangePasswordCommand( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + password: json['password'] as String?, + ); + +Map _$PupilChangePasswordCommandToJson( + PupilChangePasswordCommand instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + 'password': instance.password, + }; + +PupilCheckGoToClassDto _$PupilCheckGoToClassDtoFromJson( + Map json) => + PupilCheckGoToClassDto( + classId: (json['classId'] as num?)?.toInt(), + className: json['className'] as String?, + academicYearId: (json['academicYearId'] as num?)?.toInt(), + academicYearName: json['academicYearName'] as String?, + grade: (json['grade'] as num?)?.toInt(), + ); + +Map _$PupilCheckGoToClassDtoToJson( + PupilCheckGoToClassDto instance) => + { + 'classId': instance.classId, + 'className': instance.className, + 'academicYearId': instance.academicYearId, + 'academicYearName': instance.academicYearName, + 'grade': instance.grade, + }; + +PupilCheckGoToClassDtoApiResponse _$PupilCheckGoToClassDtoApiResponseFromJson( + Map json) => + PupilCheckGoToClassDtoApiResponse( + data: json['data'] == null + ? null + : PupilCheckGoToClassDto.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$PupilCheckGoToClassDtoApiResponseToJson( + PupilCheckGoToClassDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +PupilCopyFromClassCommand _$PupilCopyFromClassCommandFromJson( + Map json) => + PupilCopyFromClassCommand( + classId: (json['classId'] as num?)?.toInt(), + newClassId: (json['newClassId'] as num?)?.toInt(), + ); + +Map _$PupilCopyFromClassCommandToJson( + PupilCopyFromClassCommand instance) => + { + 'classId': instance.classId, + 'newClassId': instance.newClassId, + }; + +PupilFilterDto _$PupilFilterDtoFromJson(Map json) => + PupilFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + classId: (json['classId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$PupilFilterDtoToJson(PupilFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'classId': instance.classId, + 'keyword': instance.keyword, + 'status': classUserStatusEnumToJson(instance.status), + }; + +PupilGoToClassCommand _$PupilGoToClassCommandFromJson( + Map json) => + PupilGoToClassCommand( + classId: (json['classId'] as num?)?.toInt(), + checkGoToClass: json['checkGoToClass'] == null + ? null + : PupilCheckGoToClassDto.fromJson( + json['checkGoToClass'] as Map), + ); + +Map _$PupilGoToClassCommandToJson( + PupilGoToClassCommand instance) => + { + 'classId': instance.classId, + 'checkGoToClass': instance.checkGoToClass?.toJson(), + }; + +PupilHistoryDoExamDto _$PupilHistoryDoExamDtoFromJson( + Map json) => + PupilHistoryDoExamDto( + assignExamId: (json['assignExamId'] as num?)?.toInt(), + title: json['title'] as String?, + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + subject: json['subject'] as String?, + submitDate: json['submitDate'] == null + ? null + : DateTime.parse(json['submitDate'] as String), + score: (json['score'] as num?)?.toDouble(), + status: + assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + createdBy: (json['createdBy'] as num?)?.toInt(), + canMark: json['canMark'] as bool?, + examId: (json['examId'] as num?)?.toInt(), + examResultId: (json['examResultId'] as num?)?.toInt(), + ); + +Map _$PupilHistoryDoExamDtoToJson( + PupilHistoryDoExamDto instance) => + { + 'assignExamId': instance.assignExamId, + 'title': instance.title, + 'type': assignExamTypeEnumToJson(instance.type), + 'subject': instance.subject, + 'submitDate': instance.submitDate?.toIso8601String(), + 'score': instance.score, + 'status': assignExamUserStatusEnumToJson(instance.status), + 'createdBy': instance.createdBy, + 'canMark': instance.canMark, + 'examId': instance.examId, + 'examResultId': instance.examResultId, + }; + +PupilHistoryDoExamDtoFilterResult _$PupilHistoryDoExamDtoFilterResultFromJson( + Map json) => + PupilHistoryDoExamDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => + PupilHistoryDoExamDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$PupilHistoryDoExamDtoFilterResultToJson( + PupilHistoryDoExamDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +PupilHistoryDoExamDtoFilterResultApiResponse + _$PupilHistoryDoExamDtoFilterResultApiResponseFromJson( + Map json) => + PupilHistoryDoExamDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : PupilHistoryDoExamDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$PupilHistoryDoExamDtoFilterResultApiResponseToJson( + PupilHistoryDoExamDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +PupilHistoryDoExamFilterDto _$PupilHistoryDoExamFilterDtoFromJson( + Map json) => + PupilHistoryDoExamFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + userId: (json['userId'] as num?)?.toInt(), + classId: (json['classId'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + submitDate: json['submitDate'] == null + ? null + : DateTime.parse(json['submitDate'] as String), + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + ); + +Map _$PupilHistoryDoExamFilterDtoToJson( + PupilHistoryDoExamFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'userId': instance.userId, + 'classId': instance.classId, + 'subjectId': instance.subjectId, + 'keyword': instance.keyword, + 'submitDate': instance.submitDate?.toIso8601String(), + 'type': assignExamTypeEnumToJson(instance.type), + }; + +PupilListDto _$PupilListDtoFromJson(Map json) => PupilListDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + email: json['email'] as String?, + phoneNumber: json['phoneNumber'] as String?, + studentCode: json['studentCode'] as String?, + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + birthDay: json['birthDay'] == null + ? null + : DateTime.parse(json['birthDay'] as String), + gender: (json['gender'] as num?)?.toInt(), + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + identifierCode: json['identifierCode'] as String?, + ); + +Map _$PupilListDtoToJson(PupilListDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'email': instance.email, + 'phoneNumber': instance.phoneNumber, + 'studentCode': instance.studentCode, + 'createdDate': instance.createdDate?.toIso8601String(), + 'birthDay': instance.birthDay?.toIso8601String(), + 'gender': instance.gender, + 'status': classUserStatusEnumToJson(instance.status), + 'identifierCode': instance.identifierCode, + }; + +PupilListDtoFilterResult _$PupilListDtoFilterResultFromJson( + Map json) => + PupilListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => PupilListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$PupilListDtoFilterResultToJson( + PupilListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +PupilStaticByTypeExamDto _$PupilStaticByTypeExamDtoFromJson( + Map json) => + PupilStaticByTypeExamDto( + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + total: (json['total'] as num?)?.toInt(), + done: (json['done'] as num?)?.toInt(), + averageScore: (json['averageScore'] as num?)?.toDouble(), + ); + +Map _$PupilStaticByTypeExamDtoToJson( + PupilStaticByTypeExamDto instance) => + { + 'type': assignExamTypeEnumToJson(instance.type), + 'total': instance.total, + 'done': instance.done, + 'averageScore': instance.averageScore, + }; + +PupilStaticByTypeExamDtoListApiResponse + _$PupilStaticByTypeExamDtoListApiResponseFromJson( + Map json) => + PupilStaticByTypeExamDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => PupilStaticByTypeExamDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$PupilStaticByTypeExamDtoListApiResponseToJson( + PupilStaticByTypeExamDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +PupilStaticDto _$PupilStaticDtoFromJson(Map json) => + PupilStaticDto( + averageScore: (json['averageScore'] as num?)?.toDouble(), + percentage: (json['percentage'] as num?)?.toDouble(), + total: (json['total'] as num?)?.toInt(), + ); + +Map _$PupilStaticDtoToJson(PupilStaticDto instance) => + { + 'averageScore': instance.averageScore, + 'percentage': instance.percentage, + 'total': instance.total, + }; + +PupilStaticDtoApiResponse _$PupilStaticDtoApiResponseFromJson( + Map json) => + PupilStaticDtoApiResponse( + data: json['data'] == null + ? null + : PupilStaticDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$PupilStaticDtoApiResponseToJson( + PupilStaticDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +PupilStatisticalDto _$PupilStatisticalDtoFromJson(Map json) => + PupilStatisticalDto( + totalClass: (json['totalClass'] as num?)?.toInt(), + totalExamNeedDo: (json['totalExamNeedDo'] as num?)?.toInt(), + totalExam: (json['totalExam'] as num?)?.toInt(), + totalExamDone: (json['totalExamDone'] as num?)?.toInt(), + ); + +Map _$PupilStatisticalDtoToJson( + PupilStatisticalDto instance) => + { + 'totalClass': instance.totalClass, + 'totalExamNeedDo': instance.totalExamNeedDo, + 'totalExam': instance.totalExam, + 'totalExamDone': instance.totalExamDone, + }; + +PupilStatisticalDtoApiResponse _$PupilStatisticalDtoApiResponseFromJson( + Map json) => + PupilStatisticalDtoApiResponse( + data: json['data'] == null + ? null + : PupilStatisticalDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$PupilStatisticalDtoApiResponseToJson( + PupilStatisticalDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +QuestionDto _$QuestionDtoFromJson(Map json) => QuestionDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + schoolId: (json['schoolId'] as num?)?.toInt(), + type: json['type'] as String?, + content: json['content'] as String?, + avatar: json['avatar'] as String?, + image: + (json['image'] as List?)?.map((e) => e as String).toList() ?? + [], + answers: json['answers'], + explain: json['explain'] as String?, + transcript: json['transcript'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + sound: + (json['sound'] as List?)?.map((e) => e as String).toList() ?? + [], + video: json['video'] as String?, + classLevel: (json['classLevel'] as num?)?.toInt(), + level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()), + subjectId: (json['subjectId'] as num?)?.toInt(), + status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + labelType: (json['labelType'] as num?)?.toInt(), + isSystem: json['isSystem'] as bool?, + tagIds: (json['tagIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + mark: (json['mark'] as num?)?.toDouble(), + childs: (json['childs'] as List?) + ?.map((e) => QuestionDto.fromJson(e as Map)) + .toList() ?? + [], + file: json['file'] as String?, + ); + +Map _$QuestionDtoToJson(QuestionDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'schoolId': instance.schoolId, + 'type': instance.type, + 'content': instance.content, + 'avatar': instance.avatar, + 'image': instance.image, + 'answers': instance.answers, + 'explain': instance.explain, + 'transcript': instance.transcript, + 'parentId': instance.parentId, + 'sound': instance.sound, + 'video': instance.video, + 'classLevel': instance.classLevel, + 'level': questionLevelEnumToJson(instance.level), + 'subjectId': instance.subjectId, + 'status': questionStatusEnumToJson(instance.status), + 'format': examFormatEnumToJson(instance.format), + 'labelType': instance.labelType, + 'isSystem': instance.isSystem, + 'tagIds': instance.tagIds, + 'mark': instance.mark, + 'childs': instance.childs?.map((e) => e.toJson()).toList(), + 'file': instance.file, + }; + +QuestionDtoApiResponse _$QuestionDtoApiResponseFromJson( + Map json) => + QuestionDtoApiResponse( + data: json['data'] == null + ? null + : QuestionDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$QuestionDtoApiResponseToJson( + QuestionDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +QuestionDtoListApiResponse _$QuestionDtoListApiResponseFromJson( + Map json) => + QuestionDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => QuestionDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$QuestionDtoListApiResponseToJson( + QuestionDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +QuestionGetListQuery _$QuestionGetListQueryFromJson( + Map json) => + QuestionGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + type: json['type'] as String?, + userId: (json['userId'] as num?)?.toInt(), + schoolId: (json['schoolId'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + classLevel: (json['classLevel'] as num?)?.toInt(), + level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()), + status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()), + filterType: (json['filterType'] as num?)?.toInt(), + ids: (json['ids'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$QuestionGetListQueryToJson( + QuestionGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'type': instance.type, + 'userId': instance.userId, + 'schoolId': instance.schoolId, + 'subjectId': instance.subjectId, + 'classLevel': instance.classLevel, + 'level': questionLevelEnumToJson(instance.level), + 'status': questionStatusEnumToJson(instance.status), + 'filterType': instance.filterType, + 'ids': instance.ids, + }; + +QuestionListDto _$QuestionListDtoFromJson(Map json) => + QuestionListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + schoolId: (json['schoolId'] as num?)?.toInt(), + type: json['type'] as String?, + content: json['content'] as String?, + avatar: json['avatar'] as String?, + image: + (json['image'] as List?)?.map((e) => e as String).toList() ?? + [], + answers: json['answers'] as String?, + explain: json['explain'] as String?, + transcript: json['transcript'] as String?, + parentId: (json['parentId'] as num?)?.toInt(), + sound: + (json['sound'] as List?)?.map((e) => e as String).toList() ?? + [], + video: json['video'] as String?, + classLevel: (json['classLevel'] as num?)?.toInt(), + level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()), + subjectId: (json['subjectId'] as num?)?.toInt(), + status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()), + format: examFormatEnumFromJson((json['format'] as num?)?.toInt()), + labelType: (json['labelType'] as num?)?.toInt(), + isSystem: json['isSystem'] as bool?, + isLike: json['isLike'] as bool?, + ); + +Map _$QuestionListDtoToJson(QuestionListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'schoolId': instance.schoolId, + 'type': instance.type, + 'content': instance.content, + 'avatar': instance.avatar, + 'image': instance.image, + 'answers': instance.answers, + 'explain': instance.explain, + 'transcript': instance.transcript, + 'parentId': instance.parentId, + 'sound': instance.sound, + 'video': instance.video, + 'classLevel': instance.classLevel, + 'level': questionLevelEnumToJson(instance.level), + 'subjectId': instance.subjectId, + 'status': questionStatusEnumToJson(instance.status), + 'format': examFormatEnumToJson(instance.format), + 'labelType': instance.labelType, + 'isSystem': instance.isSystem, + 'isLike': instance.isLike, + }; + +QuestionListDtoFilterResult _$QuestionListDtoFilterResultFromJson( + Map json) => + QuestionListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => QuestionListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$QuestionListDtoFilterResultToJson( + QuestionListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +QuestionListDtoFilterResultApiResponse + _$QuestionListDtoFilterResultApiResponseFromJson( + Map json) => + QuestionListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : QuestionListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$QuestionListDtoFilterResultApiResponseToJson( + QuestionListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RefreshTokenEntity _$RefreshTokenEntityFromJson(Map json) => + RefreshTokenEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + token: json['token'] as String?, + userId: (json['userId'] as num?)?.toInt(), + user: json['user'] == null + ? null + : UserEntity.fromJson(json['user'] as Map), + expires: json['expires'] == null + ? null + : DateTime.parse(json['expires'] as String), + isExpired: json['isExpired'] as bool?, + revoked: json['revoked'] == null + ? null + : DateTime.parse(json['revoked'] as String), + isActive: json['isActive'] as bool?, + ); + +Map _$RefreshTokenEntityToJson(RefreshTokenEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'token': instance.token, + 'userId': instance.userId, + 'user': instance.user?.toJson(), + 'expires': instance.expires?.toIso8601String(), + 'isExpired': instance.isExpired, + 'revoked': instance.revoked?.toIso8601String(), + 'isActive': instance.isActive, + }; + +RefreshTokenResponseDto _$RefreshTokenResponseDtoFromJson( + Map json) => + RefreshTokenResponseDto( + token: json['token'] as String?, + ); + +Map _$RefreshTokenResponseDtoToJson( + RefreshTokenResponseDto instance) => + { + 'token': instance.token, + }; + +RefreshTokenResponseDtoApiResponse _$RefreshTokenResponseDtoApiResponseFromJson( + Map json) => + RefreshTokenResponseDtoApiResponse( + data: json['data'] == null + ? null + : RefreshTokenResponseDto.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$RefreshTokenResponseDtoApiResponseToJson( + RefreshTokenResponseDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RegisterDto _$RegisterDtoFromJson(Map json) => RegisterDto( + userName: json['userName'] as String?, + email: json['email'] as String?, + password: json['password'] as String?, + fullName: json['fullName'] as String?, + phoneNumber: json['phoneNumber'] as String?, + roles: (json['roles'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + id: (json['id'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + identifierCode: json['identifierCode'] as String?, + birthDay: json['birthDay'] == null + ? null + : DateTime.parse(json['birthDay'] as String), + gender: (json['gender'] as num?)?.toInt(), + address: json['address'] as String?, + ); + +Map _$RegisterDtoToJson(RegisterDto instance) => + { + 'userName': instance.userName, + 'email': instance.email, + 'password': instance.password, + 'fullName': instance.fullName, + 'phoneNumber': instance.phoneNumber, + 'roles': instance.roles, + 'id': instance.id, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + 'provinceId': instance.provinceId, + 'identifierCode': instance.identifierCode, + 'birthDay': instance.birthDay?.toIso8601String(), + 'gender': instance.gender, + 'address': instance.address, + }; + +RegisterDtoApiResponse _$RegisterDtoApiResponseFromJson( + Map json) => + RegisterDtoApiResponse( + data: json['data'] == null + ? null + : RegisterDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$RegisterDtoApiResponseToJson( + RegisterDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +ResetPasswordByUserNameResource _$ResetPasswordByUserNameResourceFromJson( + Map json) => + ResetPasswordByUserNameResource( + username: json['username'] as String?, + password: json['password'] as String?, + rePassword: json['rePassword'] as String?, + token: json['token'] as String?, + ); + +Map _$ResetPasswordByUserNameResourceToJson( + ResetPasswordByUserNameResource instance) => + { + 'username': instance.username, + 'password': instance.password, + 'rePassword': instance.rePassword, + 'token': instance.token, + }; + +ResponseX _$ResponseXFromJson(Map json) => ResponseX( + sessionId: (json['sessionId'] as num?)?.toInt(), + fileId: (json['fileId'] as num?)?.toInt(), + docType: json['docType'] as String?, + pages: json['pages'], + ); + +Map _$ResponseXToJson(ResponseX instance) => { + 'sessionId': instance.sessionId, + 'fileId': instance.fileId, + 'docType': instance.docType, + 'pages': instance.pages, + }; + +ResponseXApiResponse _$ResponseXApiResponseFromJson( + Map json) => + ResponseXApiResponse( + data: json['data'] == null + ? null + : ResponseX.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$ResponseXApiResponseToJson( + ResponseXApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RoleDto _$RoleDtoFromJson(Map json) => RoleDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + userCount: (json['userCount'] as num?)?.toInt(), + listModule: (json['listModule'] as List?) + ?.map((e) => RoleModuleDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$RoleDtoToJson(RoleDto instance) => { + 'id': instance.id, + 'name': instance.name, + 'userCount': instance.userCount, + 'listModule': instance.listModule?.map((e) => e.toJson()).toList(), + }; + +RoleDtoApiResponse _$RoleDtoApiResponseFromJson(Map json) => + RoleDtoApiResponse( + data: json['data'] == null + ? null + : RoleDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$RoleDtoApiResponseToJson(RoleDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RoleDtoListApiResponse _$RoleDtoListApiResponseFromJson( + Map json) => + RoleDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => RoleDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$RoleDtoListApiResponseToJson( + RoleDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RoleModuleDto _$RoleModuleDtoFromJson(Map json) => + RoleModuleDto( + module: moduleEnumFromJson((json['module'] as num?)?.toInt()), + moduleName: json['moduleName'] as String?, + isZone: json['isZone'] as bool?, + isFull: json['isFull'] as bool?, + tenantId: (json['tenantId'] as num?)?.toInt(), + permissions: (json['permissions'] as List?) + ?.map( + (e) => RolePermissionDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$RoleModuleDtoToJson(RoleModuleDto instance) => + { + 'module': moduleEnumToJson(instance.module), + 'moduleName': instance.moduleName, + 'isZone': instance.isZone, + 'isFull': instance.isFull, + 'tenantId': instance.tenantId, + 'permissions': instance.permissions?.map((e) => e.toJson()).toList(), + }; + +RoleModuleDtoListApiResponse _$RoleModuleDtoListApiResponseFromJson( + Map json) => + RoleModuleDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => RoleModuleDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$RoleModuleDtoListApiResponseToJson( + RoleModuleDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +RolePermissionDto _$RolePermissionDtoFromJson(Map json) => + RolePermissionDto( + fullZone: json['fullZone'] as bool?, + zoneIds: (json['zoneIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + permission: (json['permission'] as num?)?.toInt(), + ); + +Map _$RolePermissionDtoToJson(RolePermissionDto instance) => + { + 'fullZone': instance.fullZone, + 'zoneIds': instance.zoneIds, + 'permission': instance.permission, + }; + +SafetySkillEntity _$SafetySkillEntityFromJson(Map json) => + SafetySkillEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + detail: json['detail'] as String?, + icon: json['icon'] as String?, + image: json['image'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$SafetySkillEntityToJson(SafetySkillEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'detail': instance.detail, + 'icon': instance.icon, + 'image': instance.image, + 'status': commonStatusEnumToJson(instance.status), + }; + +SafetySkillEntityApiResponse _$SafetySkillEntityApiResponseFromJson( + Map json) => + SafetySkillEntityApiResponse( + data: json['data'] == null + ? null + : SafetySkillEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SafetySkillEntityApiResponseToJson( + SafetySkillEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SafetySkillGetListQuery _$SafetySkillGetListQueryFromJson( + Map json) => + SafetySkillGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + ); + +Map _$SafetySkillGetListQueryToJson( + SafetySkillGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + }; + +SafetySkillListDto _$SafetySkillListDtoFromJson(Map json) => + SafetySkillListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + summary: json['summary'] as String?, + detail: json['detail'] as String?, + icon: json['icon'] as String?, + image: json['image'] as String?, + status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$SafetySkillListDtoToJson(SafetySkillListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'summary': instance.summary, + 'detail': instance.detail, + 'icon': instance.icon, + 'image': instance.image, + 'status': commonStatusEnumToJson(instance.status), + }; + +SafetySkillListDtoFilterResult _$SafetySkillListDtoFilterResultFromJson( + Map json) => + SafetySkillListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map( + (e) => SafetySkillListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SafetySkillListDtoFilterResultToJson( + SafetySkillListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +SafetySkillListDtoFilterResultApiResponse + _$SafetySkillListDtoFilterResultApiResponseFromJson( + Map json) => + SafetySkillListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : SafetySkillListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SafetySkillListDtoFilterResultApiResponseToJson( + SafetySkillListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SchoolClassDto _$SchoolClassDtoFromJson(Map json) => + SchoolClassDto( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + classes: (json['classes'] as List?) + ?.map((e) => ClassShortDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SchoolClassDtoToJson(SchoolClassDto instance) => + { + 'id': instance.id, + 'name': instance.name, + 'classes': instance.classes?.map((e) => e.toJson()).toList(), + }; + +SchoolDto _$SchoolDtoFromJson(Map json) => SchoolDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + districtId: (json['districtId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + wardId: (json['wardId'] as num?)?.toInt(), + address: json['address'] as String?, + email: json['email'] as String?, + phone: json['phone'] as String?, + logo: json['logo'] as String?, + url: json['url'] as String?, + description: json['description'] as String?, + type: json['type'] as String?, + departmentId: (json['departmentId'] as num?)?.toInt(), + ); + +Map _$SchoolDtoToJson(SchoolDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'status': schoolStatusEnumToJson(instance.status), + 'districtId': instance.districtId, + 'provinceId': instance.provinceId, + 'wardId': instance.wardId, + 'address': instance.address, + 'email': instance.email, + 'phone': instance.phone, + 'logo': instance.logo, + 'url': instance.url, + 'description': instance.description, + 'type': instance.type, + 'departmentId': instance.departmentId, + }; + +SchoolDtoApiResponse _$SchoolDtoApiResponseFromJson( + Map json) => + SchoolDtoApiResponse( + data: json['data'] == null + ? null + : SchoolDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SchoolDtoApiResponseToJson( + SchoolDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SchoolEntity _$SchoolEntityFromJson(Map json) => SchoolEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + districtId: (json['districtId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + wardId: (json['wardId'] as num?)?.toInt(), + address: json['address'] as String?, + email: json['email'] as String?, + phone: json['phone'] as String?, + logo: json['logo'] as String?, + url: json['url'] as String?, + description: json['description'] as String?, + type: json['type'] as String?, + ); + +Map _$SchoolEntityToJson(SchoolEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'status': schoolStatusEnumToJson(instance.status), + 'districtId': instance.districtId, + 'provinceId': instance.provinceId, + 'wardId': instance.wardId, + 'address': instance.address, + 'email': instance.email, + 'phone': instance.phone, + 'logo': instance.logo, + 'url': instance.url, + 'description': instance.description, + 'type': instance.type, + }; + +SchoolEntityApiResponse _$SchoolEntityApiResponseFromJson( + Map json) => + SchoolEntityApiResponse( + data: json['data'] == null + ? null + : SchoolEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SchoolEntityApiResponseToJson( + SchoolEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SchoolGetListQuery _$SchoolGetListQueryFromJson(Map json) => + SchoolGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + departmentId: (json['departmentId'] as num?)?.toInt(), + officeId: (json['officeId'] as num?)?.toInt(), + type: (json['type'] as num?)?.toInt(), + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + ); + +Map _$SchoolGetListQueryToJson(SchoolGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'departmentId': instance.departmentId, + 'officeId': instance.officeId, + 'type': instance.type, + 'status': schoolStatusEnumToJson(instance.status), + }; + +SchoolLevel _$SchoolLevelFromJson(Map json) => SchoolLevel( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + classLevels: (json['classLevels'] as List?) + ?.map((e) => ClassLevel.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SchoolLevelToJson(SchoolLevel instance) => + { + 'id': instance.id, + 'name': instance.name, + 'classLevels': instance.classLevels?.map((e) => e.toJson()).toList(), + }; + +SchoolListDto _$SchoolListDtoFromJson(Map json) => + SchoolListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + code: json['code'] as String?, + name: json['name'] as String?, + status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()), + districtId: (json['districtId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + wardId: (json['wardId'] as num?)?.toInt(), + address: json['address'] as String?, + email: json['email'] as String?, + phone: json['phone'] as String?, + logo: json['logo'] as String?, + url: json['url'] as String?, + description: json['description'] as String?, + type: json['type'] as String?, + countActiveClass: (json['countActiveClass'] as num?)?.toInt(), + departmentName: json['departmentName'] as String?, + officeName: json['officeName'] as String?, + studentCount: (json['studentCount'] as num?)?.toInt(), + teacherCount: (json['teacherCount'] as num?)?.toInt(), + ); + +Map _$SchoolListDtoToJson(SchoolListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'code': instance.code, + 'name': instance.name, + 'status': schoolStatusEnumToJson(instance.status), + 'districtId': instance.districtId, + 'provinceId': instance.provinceId, + 'wardId': instance.wardId, + 'address': instance.address, + 'email': instance.email, + 'phone': instance.phone, + 'logo': instance.logo, + 'url': instance.url, + 'description': instance.description, + 'type': instance.type, + 'countActiveClass': instance.countActiveClass, + 'departmentName': instance.departmentName, + 'officeName': instance.officeName, + 'studentCount': instance.studentCount, + 'teacherCount': instance.teacherCount, + }; + +SchoolListDtoFilterResult _$SchoolListDtoFilterResultFromJson( + Map json) => + SchoolListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => SchoolListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SchoolListDtoFilterResultToJson( + SchoolListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +SchoolListDtoFilterResultApiResponse + _$SchoolListDtoFilterResultApiResponseFromJson(Map json) => + SchoolListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : SchoolListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SchoolListDtoFilterResultApiResponseToJson( + SchoolListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SchoolListDtoListApiResponse _$SchoolListDtoListApiResponseFromJson( + Map json) => + SchoolListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => SchoolListDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SchoolListDtoListApiResponseToJson( + SchoolListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SchoolStaticCountDto _$SchoolStaticCountDtoFromJson( + Map json) => + SchoolStaticCountDto( + schoolName: json['schoolName'] as String?, + classCount: (json['classCount'] as num?)?.toInt(), + teacherCount: (json['teacherCount'] as num?)?.toInt(), + assignmentCount: (json['assignmentCount'] as num?)?.toInt(), + ); + +Map _$SchoolStaticCountDtoToJson( + SchoolStaticCountDto instance) => + { + 'schoolName': instance.schoolName, + 'classCount': instance.classCount, + 'teacherCount': instance.teacherCount, + 'assignmentCount': instance.assignmentCount, + }; + +SchoolStaticCountDtoApiResponse _$SchoolStaticCountDtoApiResponseFromJson( + Map json) => + SchoolStaticCountDtoApiResponse( + data: json['data'] == null + ? null + : SchoolStaticCountDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SchoolStaticCountDtoApiResponseToJson( + SchoolStaticCountDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +SessionAttendanceEntity _$SessionAttendanceEntityFromJson( + Map json) => + SessionAttendanceEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + sessionId: (json['sessionId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + joinTime: json['joinTime'] == null + ? null + : DateTime.parse(json['joinTime'] as String), + leaveTime: json['leaveTime'] == null + ? null + : DateTime.parse(json['leaveTime'] as String), + durationMinutes: (json['durationMinutes'] as num?)?.toInt(), + status: attendanceStatusEnumFromJson((json['status'] as num?)?.toInt()), + notes: json['notes'] as String?, + session: json['session'] == null + ? null + : ClassSessionEntity.fromJson( + json['session'] as Map), + user: json['user'] == null + ? null + : UserEntity.fromJson(json['user'] as Map), + ); + +Map _$SessionAttendanceEntityToJson( + SessionAttendanceEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'sessionId': instance.sessionId, + 'userId': instance.userId, + 'joinTime': instance.joinTime?.toIso8601String(), + 'leaveTime': instance.leaveTime?.toIso8601String(), + 'durationMinutes': instance.durationMinutes, + 'status': attendanceStatusEnumToJson(instance.status), + 'notes': instance.notes, + 'session': instance.session?.toJson(), + 'user': instance.user?.toJson(), + }; + +Setup2FADto _$Setup2FADtoFromJson(Map json) => Setup2FADto( + sharedKey: json['sharedKey'] as String?, + authenticatorUri: json['authenticatorUri'] as String?, + ); + +Map _$Setup2FADtoToJson(Setup2FADto instance) => + { + 'sharedKey': instance.sharedKey, + 'authenticatorUri': instance.authenticatorUri, + }; + +SimpleChatRequest _$SimpleChatRequestFromJson(Map json) => + SimpleChatRequest( + message: json['message'] as String?, + systemPrompt: json['systemPrompt'] as String?, + ); + +Map _$SimpleChatRequestToJson(SimpleChatRequest instance) => + { + 'message': instance.message, + 'systemPrompt': instance.systemPrompt, + }; + +StatisticalDto _$StatisticalDtoFromJson(Map json) => + StatisticalDto( + totalClass: (json['totalClass'] as num?)?.toInt(), + totalStudent: (json['totalStudent'] as num?)?.toInt(), + totalExam: (json['totalExam'] as num?)?.toInt(), + totalQuestion: (json['totalQuestion'] as num?)?.toInt(), + ); + +Map _$StatisticalDtoToJson(StatisticalDto instance) => + { + 'totalClass': instance.totalClass, + 'totalStudent': instance.totalStudent, + 'totalExam': instance.totalExam, + 'totalQuestion': instance.totalQuestion, + }; + +StatisticalDtoApiResponse _$StatisticalDtoApiResponseFromJson( + Map json) => + StatisticalDtoApiResponse( + data: json['data'] == null + ? null + : StatisticalDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$StatisticalDtoApiResponseToJson( + StatisticalDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +Subject _$SubjectFromJson(Map json) => Subject( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, + ); + +Map _$SubjectToJson(Subject instance) => { + 'id': instance.id, + 'name': instance.name, + }; + +SystemEnums _$SystemEnumsFromJson(Map json) => SystemEnums( + code: json['code'] as String?, + values: json['values'] == null + ? null + : Enum.fromJson(json['values'] as Map), + items: (json['items'] as List?) + ?.map((e) => EnumItemEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SystemEnumsToJson(SystemEnums instance) => + { + 'code': instance.code, + 'values': instance.values?.toJson(), + 'items': instance.items?.map((e) => e.toJson()).toList(), + }; + +SystemInitDto _$SystemInitDtoFromJson(Map json) => + SystemInitDto( + category: (json['category'] as List?) + ?.map((e) => CategoryEntity.fromJson(e as Map)) + .toList() ?? + [], + enums: (json['enums'] as List?) + ?.map((e) => SystemEnums.fromJson(e as Map)) + .toList() ?? + [], + userPermissions: (json['userPermissions'] as List?) + ?.map((e) => RoleModuleDto.fromJson(e as Map)) + .toList() ?? + [], + currentObject: json['currentObject'] == null + ? null + : CurrentObjectDto.fromJson( + json['currentObject'] as Map), + processingStatus: json['processingStatus'], + schoolLevels: (json['schoolLevels'] as List?) + ?.map((e) => SchoolLevel.fromJson(e as Map)) + .toList() ?? + [], + school: json['school'] == null + ? null + : SchoolEntity.fromJson(json['school'] as Map), + academicYears: (json['academicYears'] as List?) + ?.map( + (e) => AcademicYearEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$SystemInitDtoToJson(SystemInitDto instance) => + { + 'category': instance.category?.map((e) => e.toJson()).toList(), + 'enums': instance.enums?.map((e) => e.toJson()).toList(), + 'userPermissions': + instance.userPermissions?.map((e) => e.toJson()).toList(), + 'currentObject': instance.currentObject?.toJson(), + 'processingStatus': instance.processingStatus, + 'schoolLevels': instance.schoolLevels?.map((e) => e.toJson()).toList(), + 'school': instance.school?.toJson(), + 'academicYears': instance.academicYears?.map((e) => e.toJson()).toList(), + }; + +SystemInitDtoApiResponse _$SystemInitDtoApiResponseFromJson( + Map json) => + SystemInitDtoApiResponse( + data: json['data'] == null + ? null + : SystemInitDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$SystemInitDtoApiResponseToJson( + SystemInitDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TagAddNewsDto _$TagAddNewsDtoFromJson(Map json) => + TagAddNewsDto( + tagId: (json['tagId'] as num?)?.toInt(), + newsIds: (json['newsIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$TagAddNewsDtoToJson(TagAddNewsDto instance) => + { + 'tagId': instance.tagId, + 'newsIds': instance.newsIds, + }; + +TagDto _$TagDtoFromJson(Map json) => TagDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + name: json['name'] as String?, + unsignName: json['unsignName'] as String?, + url: json['url'] as String?, + isHotTag: json['isHotTag'] as bool?, + status: (json['status'] as num?)?.toInt(), + ); + +Map _$TagDtoToJson(TagDto instance) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'name': instance.name, + 'unsignName': instance.unsignName, + 'url': instance.url, + 'isHotTag': instance.isHotTag, + 'status': instance.status, + }; + +TagDtoApiResponse _$TagDtoApiResponseFromJson(Map json) => + TagDtoApiResponse( + data: json['data'] == null + ? null + : TagDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TagDtoApiResponseToJson(TagDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TagDtoListApiResponse _$TagDtoListApiResponseFromJson( + Map json) => + TagDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => TagDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TagDtoListApiResponseToJson( + TagDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TagGetListQuery _$TagGetListQueryFromJson(Map json) => + TagGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + keyword: json['keyword'] as String?, + zoneId: (json['zoneId'] as num?)?.toInt(), + type: (json['type'] as num?)?.toInt(), + ); + +Map _$TagGetListQueryToJson(TagGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'keyword': instance.keyword, + 'zoneId': instance.zoneId, + 'type': instance.type, + }; + +TagGetListWithNewsCountQuery _$TagGetListWithNewsCountQueryFromJson( + Map json) => + TagGetListWithNewsCountQuery( + onlyHotTags: json['onlyHotTags'] as bool?, + ); + +Map _$TagGetListWithNewsCountQueryToJson( + TagGetListWithNewsCountQuery instance) => + { + 'onlyHotTags': instance.onlyHotTags, + }; + +TagListDto _$TagListDtoFromJson(Map json) => TagListDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + name: json['name'] as String?, + isHotTag: json['isHotTag'] as bool?, + newsCount: (json['newsCount'] as num?)?.toInt(), + zoneId: (json['zoneId'] as num?)?.toInt(), + zone: json['zone'] as String?, + url: json['url'] as String?, + ); + +Map _$TagListDtoToJson(TagListDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'name': instance.name, + 'isHotTag': instance.isHotTag, + 'newsCount': instance.newsCount, + 'zoneId': instance.zoneId, + 'zone': instance.zone, + 'url': instance.url, + }; + +TagListDtoFilterResult _$TagListDtoFilterResultFromJson( + Map json) => + TagListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => TagListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$TagListDtoFilterResultToJson( + TagListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +TagListDtoFilterResultApiResponse _$TagListDtoFilterResultApiResponseFromJson( + Map json) => + TagListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : TagListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TagListDtoFilterResultApiResponseToJson( + TagListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TagListDtoListApiResponse _$TagListDtoListApiResponseFromJson( + Map json) => + TagListDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => TagListDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TagListDtoListApiResponseToJson( + TagListDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TeacherCreateDto _$TeacherCreateDtoFromJson(Map json) => + TeacherCreateDto( + userName: json['userName'] as String?, + email: json['email'] as String?, + password: json['password'] as String?, + fullName: json['fullName'] as String?, + phoneNumber: json['phoneNumber'] as String?, + roles: (json['roles'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + id: (json['id'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + birthDay: json['birthDay'] == null + ? null + : DateTime.parse(json['birthDay'] as String), + gender: (json['gender'] as num?)?.toInt(), + identifierCode: json['identifierCode'] as String?, + isTemp: json['isTemp'] as bool?, + classId: (json['classId'] as num?)?.toInt(), + className: json['className'] as String?, + ethnic: json['ethnic'] as String?, + rowIndex: (json['rowIndex'] as num?)?.toInt(), + address: json['address'] as String?, + classListStr: json['classListStr'] as String?, + classManageStr: json['classManageStr'] as String?, + subject: json['subject'] as String?, + ); + +Map _$TeacherCreateDtoToJson(TeacherCreateDto instance) => + { + 'userName': instance.userName, + 'email': instance.email, + 'password': instance.password, + 'fullName': instance.fullName, + 'phoneNumber': instance.phoneNumber, + 'roles': instance.roles, + 'id': instance.id, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + 'provinceId': instance.provinceId, + 'birthDay': instance.birthDay?.toIso8601String(), + 'gender': instance.gender, + 'identifierCode': instance.identifierCode, + 'isTemp': instance.isTemp, + 'classId': instance.classId, + 'className': instance.className, + 'ethnic': instance.ethnic, + 'rowIndex': instance.rowIndex, + 'address': instance.address, + 'classListStr': instance.classListStr, + 'classManageStr': instance.classManageStr, + 'subject': instance.subject, + }; + +TeacherFilterDto _$TeacherFilterDtoFromJson(Map json) => + TeacherFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + classId: (json['classId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + isGetCountAssignExam: json['isGetCountAssignExam'] as bool?, + ); + +Map _$TeacherFilterDtoToJson(TeacherFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'classId': instance.classId, + 'keyword': instance.keyword, + 'status': classUserStatusEnumToJson(instance.status), + 'isGetCountAssignExam': instance.isGetCountAssignExam, + }; + +TeacherGetBySchoolDto _$TeacherGetBySchoolDtoFromJson( + Map json) => + TeacherGetBySchoolDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + fullNameNonAccent: json['fullNameNonAccent'] as String?, + classCount: (json['classCount'] as num?)?.toInt(), + assignmentCount: (json['assignmentCount'] as num?)?.toInt(), + assignmentMarkedCount: (json['assignmentMarkedCount'] as num?)?.toInt(), + assignmentMarkedWaitingCount: + (json['assignmentMarkedWaitingCount'] as num?)?.toInt(), + ); + +Map _$TeacherGetBySchoolDtoToJson( + TeacherGetBySchoolDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'fullNameNonAccent': instance.fullNameNonAccent, + 'classCount': instance.classCount, + 'assignmentCount': instance.assignmentCount, + 'assignmentMarkedCount': instance.assignmentMarkedCount, + 'assignmentMarkedWaitingCount': instance.assignmentMarkedWaitingCount, + }; + +TeacherGetBySchoolDtoFilterResult _$TeacherGetBySchoolDtoFilterResultFromJson( + Map json) => + TeacherGetBySchoolDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => + TeacherGetBySchoolDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$TeacherGetBySchoolDtoFilterResultToJson( + TeacherGetBySchoolDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +TeacherGetBySchoolDtoFilterResultApiResponse + _$TeacherGetBySchoolDtoFilterResultApiResponseFromJson( + Map json) => + TeacherGetBySchoolDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : TeacherGetBySchoolDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TeacherGetBySchoolDtoFilterResultApiResponseToJson( + TeacherGetBySchoolDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TeacherGetBySchoolFilterDto _$TeacherGetBySchoolFilterDtoFromJson( + Map json) => + TeacherGetBySchoolFilterDto( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + schoolId: (json['schoolId'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + ); + +Map _$TeacherGetBySchoolFilterDtoToJson( + TeacherGetBySchoolFilterDto instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'schoolId': instance.schoolId, + 'keyword': instance.keyword, + }; + +TeacherListDto _$TeacherListDtoFromJson(Map json) => + TeacherListDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + email: json['email'] as String?, + status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + subjectIds: (json['subjectIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + subject: json['subject'] as String?, + isManager: json['isManager'] as bool?, + countAssignExam: (json['countAssignExam'] as num?)?.toInt(), + countAssignExamMarkedWaiting: + (json['countAssignExamMarkedWaiting'] as num?)?.toInt(), + ); + +Map _$TeacherListDtoToJson(TeacherListDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'email': instance.email, + 'status': classUserStatusEnumToJson(instance.status), + 'createdDate': instance.createdDate?.toIso8601String(), + 'subjectIds': instance.subjectIds, + 'subject': instance.subject, + 'isManager': instance.isManager, + 'countAssignExam': instance.countAssignExam, + 'countAssignExamMarkedWaiting': instance.countAssignExamMarkedWaiting, + }; + +TeacherListDtoFilterResult _$TeacherListDtoFilterResultFromJson( + Map json) => + TeacherListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => TeacherListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$TeacherListDtoFilterResultToJson( + TeacherListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +TeacherStaticByTypeExamDto _$TeacherStaticByTypeExamDtoFromJson( + Map json) => + TeacherStaticByTypeExamDto( + type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()), + total: (json['total'] as num?)?.toInt(), + markedCount: (json['markedCount'] as num?)?.toInt(), + markedWaitingCount: (json['markedWaitingCount'] as num?)?.toInt(), + averageScore: (json['averageScore'] as num?)?.toDouble(), + ); + +Map _$TeacherStaticByTypeExamDtoToJson( + TeacherStaticByTypeExamDto instance) => + { + 'type': assignExamTypeEnumToJson(instance.type), + 'total': instance.total, + 'markedCount': instance.markedCount, + 'markedWaitingCount': instance.markedWaitingCount, + 'averageScore': instance.averageScore, + }; + +TeacherStaticByTypeExamDtoListApiResponse + _$TeacherStaticByTypeExamDtoListApiResponseFromJson( + Map json) => + TeacherStaticByTypeExamDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => TeacherStaticByTypeExamDto.fromJson( + e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$TeacherStaticByTypeExamDtoListApiResponseToJson( + TeacherStaticByTypeExamDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +TeacherUpdateManagerCommand _$TeacherUpdateManagerCommandFromJson( + Map json) => + TeacherUpdateManagerCommand( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + ); + +Map _$TeacherUpdateManagerCommandToJson( + TeacherUpdateManagerCommand instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + }; + +TeacherUpdateSubjectsCommand _$TeacherUpdateSubjectsCommandFromJson( + Map json) => + TeacherUpdateSubjectsCommand( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + subjectIds: (json['subjectIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + ); + +Map _$TeacherUpdateSubjectsCommandToJson( + TeacherUpdateSubjectsCommand instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + 'subjectIds': instance.subjectIds, + }; + +TopAverageScoreDto _$TopAverageScoreDtoFromJson(Map json) => + TopAverageScoreDto( + userId: (json['userId'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + averageScore: (json['averageScore'] as num?)?.toDouble(), + ); + +Map _$TopAverageScoreDtoToJson(TopAverageScoreDto instance) => + { + 'userId': instance.userId, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'averageScore': instance.averageScore, + }; + +TopNeedsToDoHomeworkDto _$TopNeedsToDoHomeworkDtoFromJson( + Map json) => + TopNeedsToDoHomeworkDto( + userId: (json['userId'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + countExam: (json['countExam'] as num?)?.toInt(), + countExamDone: (json['countExamDone'] as num?)?.toInt(), + countExamNotStarted: (json['countExamNotStarted'] as num?)?.toInt(), + ); + +Map _$TopNeedsToDoHomeworkDtoToJson( + TopNeedsToDoHomeworkDto instance) => + { + 'userId': instance.userId, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'countExam': instance.countExam, + 'countExamDone': instance.countExamDone, + 'countExamNotStarted': instance.countExamNotStarted, + }; + +UpdateAvatarDto _$UpdateAvatarDtoFromJson(Map json) => + UpdateAvatarDto( + avatar: json['avatar'] as String?, + ); + +Map _$UpdateAvatarDtoToJson(UpdateAvatarDto instance) => + { + 'avatar': instance.avatar, + }; + +UpdateInfoDto _$UpdateInfoDtoFromJson(Map json) => + UpdateInfoDto( + fullName: json['fullName'] as String?, + phoneNumber: json['phoneNumber'] as String?, + avatar: json['avatar'] as String?, + ); + +Map _$UpdateInfoDtoToJson(UpdateInfoDto instance) => + { + 'fullName': instance.fullName, + 'phoneNumber': instance.phoneNumber, + 'avatar': instance.avatar, + }; + +UserAnsweDataDto _$UserAnsweDataDtoFromJson(Map json) => + UserAnsweDataDto( + id: json['id'] as String?, + content: json['content'] as String?, + itemId: json['itemId'] as String?, + isCorrect: json['isCorrect'] as bool?, + mark: (json['mark'] as num?)?.toDouble(), + ); + +Map _$UserAnsweDataDtoToJson(UserAnsweDataDto instance) => + { + 'id': instance.id, + 'content': instance.content, + 'itemId': instance.itemId, + 'isCorrect': instance.isCorrect, + 'mark': instance.mark, + }; + +UserAnswerDto _$UserAnswerDtoFromJson(Map json) => + UserAnswerDto( + id: (json['id'] as num?)?.toInt(), + questionId: (json['questionId'] as num?)?.toInt(), + parentId: (json['parentId'] as num?)?.toInt(), + content: json['content'] as String?, + isCorrect: json['isCorrect'] as bool?, + mark: (json['mark'] as num?)?.toDouble(), + comment: json['comment'] as String?, + commentBy: (json['commentBy'] as num?)?.toInt(), + commentDate: json['commentDate'] == null + ? null + : DateTime.parse(json['commentDate'] as String), + answer: (json['answer'] as List?) + ?.map((e) => UserAnsweDataDto.fromJson(e as Map)) + .toList() ?? + [], + childAnswer: (json['childAnswer'] as List?) + ?.map((e) => UserAnswerDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$UserAnswerDtoToJson(UserAnswerDto instance) => + { + 'id': instance.id, + 'questionId': instance.questionId, + 'parentId': instance.parentId, + 'content': instance.content, + 'isCorrect': instance.isCorrect, + 'mark': instance.mark, + 'comment': instance.comment, + 'commentBy': instance.commentBy, + 'commentDate': instance.commentDate?.toIso8601String(), + 'answer': instance.answer?.map((e) => e.toJson()).toList(), + 'childAnswer': instance.childAnswer?.map((e) => e.toJson()).toList(), + }; + +UserAnswerEntity _$UserAnswerEntityFromJson(Map json) => + UserAnswerEntity( + id: (json['id'] as num?)?.toInt(), + userExamResultId: (json['userExamResultId'] as num?)?.toInt(), + questionId: (json['questionId'] as num?)?.toInt(), + parentId: (json['parentId'] as num?)?.toInt(), + content: json['content'] as String?, + fileUrl: json['fileUrl'] as String?, + mark: (json['mark'] as num?)?.toDouble(), + isCorrect: json['isCorrect'] as bool?, + answer: json['answer'] as String?, + comment: json['comment'] as String?, + commentBy: (json['commentBy'] as num?)?.toInt(), + commentDate: json['commentDate'] == null + ? null + : DateTime.parse(json['commentDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + ); + +Map _$UserAnswerEntityToJson(UserAnswerEntity instance) => + { + 'id': instance.id, + 'userExamResultId': instance.userExamResultId, + 'questionId': instance.questionId, + 'parentId': instance.parentId, + 'content': instance.content, + 'fileUrl': instance.fileUrl, + 'mark': instance.mark, + 'isCorrect': instance.isCorrect, + 'answer': instance.answer, + 'comment': instance.comment, + 'commentBy': instance.commentBy, + 'commentDate': instance.commentDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + }; + +UserClaimEntity _$UserClaimEntityFromJson(Map json) => + UserClaimEntity( + id: (json['id'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + claimType: json['claimType'] as String?, + claimValue: json['claimValue'] as String?, + ); + +Map _$UserClaimEntityToJson(UserClaimEntity instance) => + { + 'id': instance.id, + 'userId': instance.userId, + 'claimType': instance.claimType, + 'claimValue': instance.claimValue, + }; + +UserCreateDto _$UserCreateDtoFromJson(Map json) => + UserCreateDto( + userName: json['userName'] as String?, + email: json['email'] as String?, + password: json['password'] as String?, + fullName: json['fullName'] as String?, + phoneNumber: json['phoneNumber'] as String?, + roles: (json['roles'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + id: (json['id'] as num?)?.toInt(), + avatar: json['avatar'] as String?, + status: (json['status'] as num?)?.toInt(), + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + birthDay: json['birthDay'] == null + ? null + : DateTime.parse(json['birthDay'] as String), + gender: (json['gender'] as num?)?.toInt(), + identifierCode: json['identifierCode'] as String?, + isTemp: json['isTemp'] as bool?, + classId: (json['classId'] as num?)?.toInt(), + className: json['className'] as String?, + ethnic: json['ethnic'] as String?, + rowIndex: (json['rowIndex'] as num?)?.toInt(), + address: json['address'] as String?, + ); + +Map _$UserCreateDtoToJson(UserCreateDto instance) => + { + 'userName': instance.userName, + 'email': instance.email, + 'password': instance.password, + 'fullName': instance.fullName, + 'phoneNumber': instance.phoneNumber, + 'roles': instance.roles, + 'id': instance.id, + 'avatar': instance.avatar, + 'status': instance.status, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + 'provinceId': instance.provinceId, + 'birthDay': instance.birthDay?.toIso8601String(), + 'gender': instance.gender, + 'identifierCode': instance.identifierCode, + 'isTemp': instance.isTemp, + 'classId': instance.classId, + 'className': instance.className, + 'ethnic': instance.ethnic, + 'rowIndex': instance.rowIndex, + 'address': instance.address, + }; + +UserEntity _$UserEntityFromJson(Map json) => UserEntity( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + normalizedUserName: json['normalizedUserName'] as String?, + email: json['email'] as String?, + normalizedEmail: json['normalizedEmail'] as String?, + emailConfirmed: json['emailConfirmed'] as bool?, + passwordHash: json['passwordHash'] as String?, + securityStamp: json['securityStamp'] as String?, + concurrencyStamp: json['concurrencyStamp'] as String?, + phoneNumber: json['phoneNumber'] as String?, + phoneNumberConfirmed: json['phoneNumberConfirmed'] as bool?, + twoFactorEnabled: json['twoFactorEnabled'] as bool?, + lockoutEnd: json['lockoutEnd'] == null + ? null + : DateTime.parse(json['lockoutEnd'] as String), + lockoutEnabled: json['lockoutEnabled'] as bool?, + accessFailedCount: (json['accessFailedCount'] as num?)?.toInt(), + claims: (json['claims'] as List?) + ?.map((e) => UserClaimEntity.fromJson(e as Map)) + .toList() ?? + [], + refreshTokens: (json['refreshTokens'] as List?) + ?.map( + (e) => RefreshTokenEntity.fromJson(e as Map)) + .toList() ?? + [], + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + fullNameNonAccent: json['fullNameNonAccent'] as String?, + lastLoginDate: json['lastLoginDate'] == null + ? null + : DateTime.parse(json['lastLoginDate'] as String), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + isDeleted: json['isDeleted'] as bool?, + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + provinceId: (json['provinceId'] as num?)?.toInt(), + isOnline: json['isOnline'] as bool?, + studentCode: json['studentCode'] as String?, + birthDay: json['birthDay'] == null + ? null + : DateTime.parse(json['birthDay'] as String), + gender: (json['gender'] as num?)?.toInt(), + identifierCode: json['identifierCode'] as String?, + address: json['address'] as String?, + ethnic: json['ethnic'] as String?, + ); + +Map _$UserEntityToJson(UserEntity instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'normalizedUserName': instance.normalizedUserName, + 'email': instance.email, + 'normalizedEmail': instance.normalizedEmail, + 'emailConfirmed': instance.emailConfirmed, + 'passwordHash': instance.passwordHash, + 'securityStamp': instance.securityStamp, + 'concurrencyStamp': instance.concurrencyStamp, + 'phoneNumber': instance.phoneNumber, + 'phoneNumberConfirmed': instance.phoneNumberConfirmed, + 'twoFactorEnabled': instance.twoFactorEnabled, + 'lockoutEnd': instance.lockoutEnd?.toIso8601String(), + 'lockoutEnabled': instance.lockoutEnabled, + 'accessFailedCount': instance.accessFailedCount, + 'claims': instance.claims?.map((e) => e.toJson()).toList(), + 'refreshTokens': instance.refreshTokens?.map((e) => e.toJson()).toList(), + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'fullNameNonAccent': instance.fullNameNonAccent, + 'lastLoginDate': instance.lastLoginDate?.toIso8601String(), + 'createdDate': instance.createdDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + 'provinceId': instance.provinceId, + 'isOnline': instance.isOnline, + 'studentCode': instance.studentCode, + 'birthDay': instance.birthDay?.toIso8601String(), + 'gender': instance.gender, + 'identifierCode': instance.identifierCode, + 'address': instance.address, + 'ethnic': instance.ethnic, + }; + +UserExamResultDetailWithMessageDto _$UserExamResultDetailWithMessageDtoFromJson( + Map json) => + UserExamResultDetailWithMessageDto( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + examId: (json['examId'] as num?)?.toInt(), + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + mark: (json['mark'] as num?)?.toDouble(), + duration: (json['duration'] as num?)?.toInt(), + correctAnswerCount: (json['correctAnswerCount'] as num?)?.toInt(), + correctQuestions: json['correctQuestions'] as String?, + fromType: (json['fromType'] as num?)?.toInt(), + comment: json['comment'] as String?, + status: userExamResultStatusFromJson((json['status'] as num?)?.toInt()), + userAnswer: (json['userAnswer'] as List?) + ?.map((e) => UserAnswerDto.fromJson(e as Map)) + .toList() ?? + [], + examInfo: json['examInfo'] == null + ? null + : ExamLearnDto.fromJson(json['examInfo'] as Map), + userInfo: json['userInfo'] == null + ? null + : UserWithSimpleInfoDto.fromJson( + json['userInfo'] as Map), + message: json['message'] as String?, + teacherNote: json['teacherNote'] as String?, + isAssigner: json['isAssigner'] as bool?, + canMarkScore: json['canMarkScore'] as bool?, + ); + +Map _$UserExamResultDetailWithMessageDtoToJson( + UserExamResultDetailWithMessageDto instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'examId': instance.examId, + 'assignExamId': instance.assignExamId, + 'userId': instance.userId, + 'mark': instance.mark, + 'duration': instance.duration, + 'correctAnswerCount': instance.correctAnswerCount, + 'correctQuestions': instance.correctQuestions, + 'fromType': instance.fromType, + 'comment': instance.comment, + 'status': userExamResultStatusToJson(instance.status), + 'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(), + 'examInfo': instance.examInfo?.toJson(), + 'userInfo': instance.userInfo?.toJson(), + 'message': instance.message, + 'teacherNote': instance.teacherNote, + 'isAssigner': instance.isAssigner, + 'canMarkScore': instance.canMarkScore, + }; + +UserExamResultDto _$UserExamResultDtoFromJson(Map json) => + UserExamResultDto( + startTime: json['startTime'] == null + ? null + : DateTime.parse(json['startTime'] as String), + duration: (json['duration'] as num?)?.toInt(), + examId: (json['examId'] as num?)?.toInt(), + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userAnswer: (json['userAnswer'] as List?) + ?.map((e) => UserAnswerDto.fromJson(e as Map)) + .toList() ?? + [], + fromType: (json['fromType'] as num?)?.toInt(), + ); + +Map _$UserExamResultDtoToJson(UserExamResultDto instance) => + { + 'startTime': instance.startTime?.toIso8601String(), + 'duration': instance.duration, + 'examId': instance.examId, + 'assignExamId': instance.assignExamId, + 'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(), + 'fromType': instance.fromType, + }; + +UserExamResultEntity _$UserExamResultEntityFromJson( + Map json) => + UserExamResultEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + examId: (json['examId'] as num?)?.toInt(), + assignExamId: (json['assignExamId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + mark: (json['mark'] as num?)?.toDouble(), + duration: (json['duration'] as num?)?.toInt(), + correctAnswerCount: (json['correctAnswerCount'] as num?)?.toInt(), + correctQuestions: json['correctQuestions'] as String?, + fromType: (json['fromType'] as num?)?.toInt(), + comment: json['comment'] as String?, + status: userExamResultStatusFromJson((json['status'] as num?)?.toInt()), + userAnswer: (json['userAnswer'] as List?) + ?.map((e) => UserAnswerEntity.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$UserExamResultEntityToJson( + UserExamResultEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'examId': instance.examId, + 'assignExamId': instance.assignExamId, + 'userId': instance.userId, + 'mark': instance.mark, + 'duration': instance.duration, + 'correctAnswerCount': instance.correctAnswerCount, + 'correctQuestions': instance.correctQuestions, + 'fromType': instance.fromType, + 'comment': instance.comment, + 'status': userExamResultStatusToJson(instance.status), + 'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(), + }; + +UserExamResultEntityApiResponse _$UserExamResultEntityApiResponseFromJson( + Map json) => + UserExamResultEntityApiResponse( + data: json['data'] == null + ? null + : UserExamResultEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserExamResultEntityApiResponseToJson( + UserExamResultEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +UserGetListQuery _$UserGetListQueryFromJson(Map json) => + UserGetListQuery( + sortExpression: json['sortExpression'] as String?, + pageSize: (json['pageSize'] as num?)?.toInt(), + pageIndex: (json['pageIndex'] as num?)?.toInt(), + skip: (json['skip'] as num?)?.toInt(), + notSkip: (json['notSkip'] as num?)?.toInt(), + propertyIncludes: (json['propertyIncludes'] as List?) + ?.map((e) => e as String) + .toList() ?? + [], + status: (json['status'] as num?)?.toInt(), + keyword: json['keyword'] as String?, + roleIds: (json['roleIds'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() ?? + [], + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + ); + +Map _$UserGetListQueryToJson(UserGetListQuery instance) => + { + 'sortExpression': instance.sortExpression, + 'pageSize': instance.pageSize, + 'pageIndex': instance.pageIndex, + 'skip': instance.skip, + 'notSkip': instance.notSkip, + 'propertyIncludes': instance.propertyIncludes, + 'status': instance.status, + 'keyword': instance.keyword, + 'roleIds': instance.roleIds, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + }; + +UserInfoDto _$UserInfoDtoFromJson(Map json) => UserInfoDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + email: json['email'] as String?, + phoneNumber: json['phoneNumber'] as String?, + fullName: json['fullName'] as String?, + avatar: json['avatar'] as String?, + lastLoginDate: json['lastLoginDate'] as String?, + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + ); + +Map _$UserInfoDtoToJson(UserInfoDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'email': instance.email, + 'phoneNumber': instance.phoneNumber, + 'fullName': instance.fullName, + 'avatar': instance.avatar, + 'lastLoginDate': instance.lastLoginDate, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + }; + +UserInfoDtoApiResponse _$UserInfoDtoApiResponseFromJson( + Map json) => + UserInfoDtoApiResponse( + data: json['data'] == null + ? null + : UserInfoDto.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserInfoDtoApiResponseToJson( + UserInfoDtoApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +UserListDto _$UserListDtoFromJson(Map json) => UserListDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + email: json['email'] as String?, + phoneNumber: json['phoneNumber'] as String?, + status: (json['status'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + roles: json['roles'] as String?, + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + objectId: (json['objectId'] as num?)?.toInt(), + objectName: json['objectName'] as String?, + ); + +Map _$UserListDtoToJson(UserListDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'email': instance.email, + 'phoneNumber': instance.phoneNumber, + 'status': instance.status, + 'createdDate': instance.createdDate?.toIso8601String(), + 'roles': instance.roles, + 'type': userTypeEnumToJson(instance.type), + 'objectId': instance.objectId, + 'objectName': instance.objectName, + }; + +UserListDtoFilterResult _$UserListDtoFilterResultFromJson( + Map json) => + UserListDtoFilterResult( + totalRows: (json['totalRows'] as num?)?.toInt(), + data: (json['data'] as List?) + ?.map((e) => UserListDto.fromJson(e as Map)) + .toList() ?? + [], + ); + +Map _$UserListDtoFilterResultToJson( + UserListDtoFilterResult instance) => + { + 'totalRows': instance.totalRows, + 'data': instance.data?.map((e) => e.toJson()).toList(), + }; + +UserListDtoFilterResultApiResponse _$UserListDtoFilterResultApiResponseFromJson( + Map json) => + UserListDtoFilterResultApiResponse( + data: json['data'] == null + ? null + : UserListDtoFilterResult.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserListDtoFilterResultApiResponseToJson( + UserListDtoFilterResultApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +UserMobileTokenEntity _$UserMobileTokenEntityFromJson( + Map json) => + UserMobileTokenEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + deviceToken: json['deviceToken'] as String?, + os: json['os'] as String?, + appId: (json['appId'] as num?)?.toInt(), + ); + +Map _$UserMobileTokenEntityToJson( + UserMobileTokenEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'deviceToken': instance.deviceToken, + 'os': instance.os, + 'appId': instance.appId, + }; + +UserMobileTokenEntityApiResponse _$UserMobileTokenEntityApiResponseFromJson( + Map json) => + UserMobileTokenEntityApiResponse( + data: json['data'] == null + ? null + : UserMobileTokenEntity.fromJson( + json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserMobileTokenEntityApiResponseToJson( + UserMobileTokenEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +UserMobileTokenUpdateCommand _$UserMobileTokenUpdateCommandFromJson( + Map json) => + UserMobileTokenUpdateCommand( + token: json['token'] == null + ? null + : UserMobileTokenEntity.fromJson( + json['token'] as Map), + ); + +Map _$UserMobileTokenUpdateCommandToJson( + UserMobileTokenUpdateCommand instance) => + { + 'token': instance.token?.toJson(), + }; + +UserWebTokenDeleteCommand _$UserWebTokenDeleteCommandFromJson( + Map json) => + UserWebTokenDeleteCommand( + id: (json['id'] as num?)?.toInt(), + ); + +Map _$UserWebTokenDeleteCommandToJson( + UserWebTokenDeleteCommand instance) => + { + 'id': instance.id, + }; + +UserWebTokenEntity _$UserWebTokenEntityFromJson(Map json) => + UserWebTokenEntity( + id: (json['id'] as num?)?.toInt(), + createdBy: (json['createdBy'] as num?)?.toInt(), + createdDate: json['createdDate'] == null + ? null + : DateTime.parse(json['createdDate'] as String), + lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(), + lastModifiedDate: json['lastModifiedDate'] == null + ? null + : DateTime.parse(json['lastModifiedDate'] as String), + isDeleted: json['isDeleted'] as bool?, + userId: (json['userId'] as num?)?.toInt(), + pushEndPoint: json['pushEndPoint'] as String?, + pushP256DH: json['pushP256DH'] as String?, + pushAuth: json['pushAuth'] as String?, + appId: (json['appId'] as num?)?.toInt(), + ); + +Map _$UserWebTokenEntityToJson(UserWebTokenEntity instance) => + { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'createdDate': instance.createdDate?.toIso8601String(), + 'lastModifiedBy': instance.lastModifiedBy, + 'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(), + 'isDeleted': instance.isDeleted, + 'userId': instance.userId, + 'pushEndPoint': instance.pushEndPoint, + 'pushP256DH': instance.pushP256DH, + 'pushAuth': instance.pushAuth, + 'appId': instance.appId, + }; + +UserWebTokenEntityApiResponse _$UserWebTokenEntityApiResponseFromJson( + Map json) => + UserWebTokenEntityApiResponse( + data: json['data'] == null + ? null + : UserWebTokenEntity.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserWebTokenEntityApiResponseToJson( + UserWebTokenEntityApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +UserWebTokenUpdateCommand _$UserWebTokenUpdateCommandFromJson( + Map json) => + UserWebTokenUpdateCommand( + token: json['token'] == null + ? null + : UserWebTokenEntity.fromJson(json['token'] as Map), + ); + +Map _$UserWebTokenUpdateCommandToJson( + UserWebTokenUpdateCommand instance) => + { + 'token': instance.token?.toJson(), + }; + +UserWithSimpleInfoDto _$UserWithSimpleInfoDtoFromJson( + Map json) => + UserWithSimpleInfoDto( + id: (json['id'] as num?)?.toInt(), + userName: json['userName'] as String?, + avatar: json['avatar'] as String?, + fullName: json['fullName'] as String?, + type: userTypeEnumFromJson((json['type'] as num?)?.toInt()), + isOnline: json['isOnline'] as bool?, + ); + +Map _$UserWithSimpleInfoDtoToJson( + UserWithSimpleInfoDto instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'avatar': instance.avatar, + 'fullName': instance.fullName, + 'type': userTypeEnumToJson(instance.type), + 'isOnline': instance.isOnline, + }; + +UserWithSimpleInfoDtoListApiResponse + _$UserWithSimpleInfoDtoListApiResponseFromJson(Map json) => + UserWithSimpleInfoDtoListApiResponse( + data: (json['data'] as List?) + ?.map((e) => + UserWithSimpleInfoDto.fromJson(e as Map)) + .toList() ?? + [], + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$UserWithSimpleInfoDtoListApiResponseToJson( + UserWithSimpleInfoDtoListApiResponse instance) => + { + 'data': instance.data?.map((e) => e.toJson()).toList(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +VapidDetails _$VapidDetailsFromJson(Map json) => VapidDetails( + subject: json['subject'] as String?, + publicKey: json['publicKey'] as String?, + privateKey: json['privateKey'] as String?, + expiration: (json['expiration'] as num?)?.toInt(), + ); + +Map _$VapidDetailsToJson(VapidDetails instance) => + { + 'subject': instance.subject, + 'publicKey': instance.publicKey, + 'privateKey': instance.privateKey, + 'expiration': instance.expiration, + }; + +VapidDetailsApiResponse _$VapidDetailsApiResponseFromJson( + Map json) => + VapidDetailsApiResponse( + data: json['data'] == null + ? null + : VapidDetails.fromJson(json['data'] as Map), + message: json['message'] as String?, + success: json['success'] as bool?, + code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()), + ); + +Map _$VapidDetailsApiResponseToJson( + VapidDetailsApiResponse instance) => + { + 'data': instance.data?.toJson(), + 'message': instance.message, + 'success': instance.success, + 'code': errorCodeEnumToJson(instance.code), + }; + +WeatherForecast _$WeatherForecastFromJson(Map json) => + WeatherForecast( + date: + json['date'] == null ? null : DateTime.parse(json['date'] as String), + temperatureC: (json['temperatureC'] as num?)?.toInt(), + temperatureF: (json['temperatureF'] as num?)?.toInt(), + summary: json['summary'] as String?, + ); + +Map _$WeatherForecastToJson(WeatherForecast instance) => + { + 'date': instance.date?.toIso8601String(), + 'temperatureC': instance.temperatureC, + 'temperatureF': instance.temperatureF, + 'summary': instance.summary, + }; + +AiPromptByCodeCodeRequest _$AiPromptByCodeCodeRequestFromJson( + Map json) => + AiPromptByCodeCodeRequest( + code: json['code'] as String?, + grade: (json['grade'] as num?)?.toInt(), + categoryId: (json['categoryId'] as num?)?.toInt(), + ); + +Map _$AiPromptByCodeCodeRequestToJson( + AiPromptByCodeCodeRequest instance) => + { + 'code': instance.code, + 'grade': instance.grade, + 'categoryId': instance.categoryId, + }; + +ChatListChatGroupOfUserRequest _$ChatListChatGroupOfUserRequestFromJson( + Map json) => + ChatListChatGroupOfUserRequest( + keyword: json['keyword'] as String?, + pageIndex: (json['pageIndex'] as num?)?.toInt(), + pageSize: (json['pageSize'] as num?)?.toInt(), + ); + +Map _$ChatListChatGroupOfUserRequestToJson( + ChatListChatGroupOfUserRequest instance) => + { + 'keyword': instance.keyword, + 'pageIndex': instance.pageIndex, + 'pageSize': instance.pageSize, + }; + +ChatGetListMessageByGroupidRequest _$ChatGetListMessageByGroupidRequestFromJson( + Map json) => + ChatGetListMessageByGroupidRequest( + chatGroupId: (json['chatGroupId'] as num?)?.toInt(), + skipSize: (json['skipSize'] as num?)?.toInt(), + pageSize: (json['pageSize'] as num?)?.toInt(), + ); + +Map _$ChatGetListMessageByGroupidRequestToJson( + ChatGetListMessageByGroupidRequest instance) => + { + 'chatGroupId': instance.chatGroupId, + 'skipSize': instance.skipSize, + 'pageSize': instance.pageSize, + }; + +PupilPupilStaticRequest _$PupilPupilStaticRequestFromJson( + Map json) => + PupilPupilStaticRequest( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + ); + +Map _$PupilPupilStaticRequestToJson( + PupilPupilStaticRequest instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + 'subjectId': instance.subjectId, + }; + +PupilPupilStaticByTypeExamRequest _$PupilPupilStaticByTypeExamRequestFromJson( + Map json) => + PupilPupilStaticByTypeExamRequest( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + ); + +Map _$PupilPupilStaticByTypeExamRequestToJson( + PupilPupilStaticByTypeExamRequest instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + 'subjectId': instance.subjectId, + }; + +TeacherStaticByTypeExamRequest _$TeacherStaticByTypeExamRequestFromJson( + Map json) => + TeacherStaticByTypeExamRequest( + classId: (json['classId'] as num?)?.toInt(), + userId: (json['userId'] as num?)?.toInt(), + subjectId: (json['subjectId'] as num?)?.toInt(), + ); + +Map _$TeacherStaticByTypeExamRequestToJson( + TeacherStaticByTypeExamRequest instance) => + { + 'classId': instance.classId, + 'userId': instance.userId, + 'subjectId': instance.subjectId, + }; + +UserExamResultChangeMarkRequest _$UserExamResultChangeMarkRequestFromJson( + Map json) => + UserExamResultChangeMarkRequest( + userExamResultId: (json['userExamResultId'] as num?)?.toInt(), + comment: json['comment'] as String?, + ); + +Map _$UserExamResultChangeMarkRequestToJson( + UserExamResultChangeMarkRequest instance) => + { + 'userExamResultId': instance.userExamResultId, + 'comment': instance.comment, + }; diff --git a/lib/features/usecases/user_use_cases.dart b/lib/features/usecases/user_use_cases.dart new file mode 100644 index 0000000..1a94d25 --- /dev/null +++ b/lib/features/usecases/user_use_cases.dart @@ -0,0 +1,35 @@ +import 'package:baseproject/features/model/index.dart'; +import 'package:baseproject/features/repositories/hra_repository.dart'; +import 'package:dartz/dartz.dart'; +import 'package:injectable/injectable.dart'; + +@lazySingleton +class UserUseCases { + final HraRepository _hraRepository; + + UserUseCases(this._hraRepository); + + Future> loginAccount(LoginDto request) async { + try { + final result = await _hraRepository.accountLogin(request); + + if (result.data == null) { + return Left(result.message ?? 'Login failed'); + } + + return Right(result.data!); + } catch (ex) { + return Left(ex.toString()); + } + } + + Future> getCaptcha() async { + try { + final result = await _hraRepository.accountCaptcha(); + + return Right(result); + } catch (ex) { + return Left(ex.toString()); + } + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 825ebbe..b8ceee8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.16.1 <3.0.0" + sdk: ">=3.3.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -57,6 +57,7 @@ dependencies: file_picker: ^8.1.6 flutter_staggered_grid_view: ^0.7.0 pull_to_refresh: ^2.0.0 + dartz: ^0.10.1 dependency_overrides: watcher: ^1.1.0 @@ -65,14 +66,18 @@ dependency_overrides: pub_semver: 2.1.4 win32: 5.13.0 http: ^1.4.0 + # Dart 3.5+ chỉ có frontend_server_aot; package 3.x tìm JIT snapshot → ép dùng 4.x + frontend_server_client: ^4.0.0 dev_dependencies: flutter_test: sdk: flutter injectable_generator: - build_runner: 2.3.3 - retrofit_generator: 4.2.0 - json_serializable: ^6.3.0 + build_runner: ^2.4.0 + retrofit_generator: ^4.2.0 + json_serializable: ^6.8.0 + swagger_dart_code_generator: + path: ./api_automatic/ diff --git a/update_open_api.ps1 b/update_open_api.ps1 new file mode 100644 index 0000000..b4138a6 --- /dev/null +++ b/update_open_api.ps1 @@ -0,0 +1,14 @@ +# Đảm bảo dùng Dart của Flutter (tránh lỗi frontend_server.dart.snapshot trên Dart 3.5+) +$flutterRoot = if ($env:FLUTTER_ROOT) { $env:FLUTTER_ROOT } else { (Get-Command flutter -ErrorAction SilentlyContinue).Source | ForEach-Object { Split-Path (Split-Path $_) } } +if ($flutterRoot) { + $env:Path = "$flutterRoot\bin\cache\dart-sdk\bin;$flutterRoot\bin;$env:Path" +} + +# Tải các file JSON về thư mục tương ứng +Invoke-WebRequest -Uri "https://api.hra.edu.vn/swagger/v1/swagger.json" -OutFile "./lib/features/repositories/hra_repository.json" + +# Chạy build_runner +dart run build_runner build --delete-conflicting-outputs + +# Xóa các file JSON đã tải về +Remove-Item "./lib/features/repositories/hra_repository.json" \ No newline at end of file diff --git a/update_open_api.sh b/update_open_api.sh new file mode 100644 index 0000000..5c4c2e6 --- /dev/null +++ b/update_open_api.sh @@ -0,0 +1,4 @@ +curl -s https://api.hra.edu.vn/swagger/v1/swagger.json -o ./lib/features/repositories/hra_repository.json + +flutter pub run build_runner build --delete-conflicting-outputs +rm ./lib/features/repositories/hra_repository.json