From 07064f13ce987e7c3192ff3349eceb4aef6c1e44 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Wed, 6 Mar 2024 02:15:53 +0700 Subject: [PATCH] feat: initial commit --- .gitignore | 1 + .idea/.gitignore | 8 + .idea/.name | 1 + .idea/go-humas-be.iml | 9 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .../entity/article_categories.entity.go | 20 + .../entity/article_category_details.entity.go | 12 + app/database/entity/article_files.entity.go | 24 + app/database/entity/articles.entity.go | 26 + app/database/entity/cities.entity.go | 7 + app/database/entity/districts.entity.go | 7 + app/database/entity/magazine_files.entity.go | 17 + app/database/entity/magazines.entity.go | 19 + app/database/entity/master_menus.entity.go | 17 + app/database/entity/master_modules.entity.go | 14 + app/database/entity/master_statuses.entity.go | 7 + .../entity/ppid_data_categories.entity.go | 13 + app/database/entity/ppid_data_files.entity.go | 20 + app/database/entity/ppid_datas.entity.go | 17 + app/database/entity/provinces.entity.go | 9 + app/database/entity/user_levels.entity.go | 15 + .../entity/user_role_accesses.entity.go | 18 + app/database/entity/user_roles.entity.go | 16 + app/database/entity/users.entity.go | 27 + app/database/index.database.go | 111 + app/database/seeds/master_statuses.seeds.go | 45 + app/middleware/register.middleware.go | 61 + .../article_categories.module.go | 53 + .../article_categories.controller.go | 181 + .../controller/controller.go | 13 + .../mapper/article_categories.mapper.go | 28 + .../article_categories.repository.go | 69 + .../request/article_categories.request.go | 92 + .../response/article_categories.response.go | 20 + .../service/article_categories.service.go | 72 + .../article_category_details.module.go | 53 + .../article_category_details.controller.go | 181 + .../controller/controller.go | 13 + .../mapper/article_category_details.mapper.go | 20 + .../article_category_details.repository.go | 69 + .../article_category_details.request.go | 52 + .../article_category_details.response.go | 12 + .../article_category_details.service.go | 72 + .../article_files/article_files.module.go | 55 + .../controller/article_files.controller.go | 221 + .../article_files/controller/controller.go | 13 + .../mapper/article_files.mapper.go | 32 + .../repository/article_files.repository.go | 69 + .../request/article_files.request.go | 112 + .../response/article_files.response.go | 24 + .../service/article_files.service.go | 182 + app/module/articles/articles.module.go | 53 + .../controller/articles.controller.go | 181 + app/module/articles/controller/controller.go | 13 + app/module/articles/mapper/articles.mapper.go | 34 + .../repository/articles.repository.go | 69 + .../articles/request/articles.request.go | 122 + .../articles/response/articles.response.go | 26 + .../articles/service/articles.service.go | 72 + app/module/cities/cities.module.go | 53 + .../cities/controller/cities.controller.go | 184 + app/module/cities/controller/controller.go | 13 + app/module/cities/mapper/cities.mapper.go | 17 + .../cities/repository/cities.repository.go | 69 + app/module/cities/request/cities.request.go | 43 + app/module/cities/response/cities.response.go | 7 + app/module/cities/service/cities.service.go | 72 + app/module/districts/controller/controller.go | 13 + .../controller/districts.controller.go | 181 + app/module/districts/districts.module.go | 53 + .../districts/mapper/districts.mapper.go | 17 + .../repository/districts.repository.go | 69 + .../districts/request/districts.request.go | 43 + .../districts/response/districts.response.go | 7 + .../districts/service/districts.service.go | 72 + .../magazine_files/controller/controller.go | 13 + .../controller/magazine_files.controller.go | 181 + .../magazine_files/magazine_files.module.go | 53 + .../mapper/magazine_files.mapper.go | 25 + .../repository/magazine_files.repository.go | 69 + .../request/magazine_files.request.go | 77 + .../response/magazine_files.response.go | 17 + .../service/magazine_files.service.go | 72 + app/module/magazines/controller/controller.go | 13 + .../controller/magazines.controller.go | 181 + app/module/magazines/magazines.module.go | 53 + .../magazines/mapper/magazines.mapper.go | 27 + .../repository/magazines.repository.go | 69 + .../magazines/request/magazines.request.go | 87 + .../magazines/response/magazines.response.go | 19 + .../magazines/service/magazines.service.go | 72 + .../master_menus/controller/controller.go | 13 + .../controller/master_menus.controller.go | 181 + .../mapper/master_menus.mapper.go | 25 + .../master_menus/master_menus.module.go | 53 + .../repository/master_menus.repository.go | 69 + .../request/master_menus.request.go | 78 + .../response/master_menus.response.go | 17 + .../service/master_menus.service.go | 72 + .../master_modules/controller/controller.go | 13 + .../controller/master_modules.controller.go | 181 + .../entity/master_modules.entity.go | 14 + .../mapper/master_modules.mapper.go | 22 + .../master_modules/master_modules.module.go | 53 + .../repository/master_modules.repository.go | 69 + .../request/master_modules.request.go | 63 + .../response/master_modules.response.go | 14 + .../service/master_modules.service.go | 72 + .../master_statuses/controller/controller.go | 13 + .../controller/master_statuses.controller.go | 181 + .../entity/master_statuses.entity.go | 9 + .../mapper/master_statuses.mapper.go | 17 + .../master_statuses/master_statuses.module.go | 53 + .../repository/master_statuses.repository.go | 69 + .../request/master_statuses.request.go | 44 + .../response/master_statuses.response.go | 9 + .../service/master_statuses.service.go | 73 + .../controller/controller.go | 13 + .../ppid_data_categories.controller.go | 181 + .../mapper/ppid_data_categories.mapper.go | 21 + .../ppid_data_categories.module.go | 53 + .../ppid_data_categories.repository.go | 69 + .../request/ppid_data_categories.request.go | 57 + .../response/ppid_data_categories.response.go | 13 + .../service/ppid_data_categories.service.go | 72 + .../ppid_data_files/controller/controller.go | 13 + .../controller/ppid_data_files.controller.go | 181 + .../mapper/ppid_data_files.mapper.go | 28 + .../ppid_data_files/ppid_data_files.module.go | 53 + .../repository/ppid_data_files.repository.go | 69 + .../request/ppid_data_files.request.go | 92 + .../response/ppid_data_files.response.go | 20 + .../service/ppid_data_files.service.go | 72 + .../ppid_datas/controller/controller.go | 13 + .../controller/ppid_datas.controller.go | 181 + .../ppid_datas/mapper/ppid_datas.mapper.go | 25 + app/module/ppid_datas/ppid_datas.module.go | 53 + .../repository/ppid_datas.repository.go | 69 + .../ppid_datas/request/ppid_datas.request.go | 77 + .../response/ppid_datas.response.go | 17 + .../ppid_datas/service/ppid_datas.service.go | 72 + app/module/provinces/controller/controller.go | 13 + .../controller/provinces.controller.go | 181 + .../provinces/mapper/provinces.mapper.go | 19 + app/module/provinces/provinces.module.go | 53 + .../repository/provinces.repository.go | 69 + .../provinces/request/provinces.request.go | 53 + .../provinces/response/provinces.response.go | 9 + .../provinces/service/provinces.service.go | 72 + .../user_levels/controller/controller.go | 13 + .../controller/user_levels.controller.go | 181 + .../user_levels/mapper/user_levels.mapper.go | 23 + .../repository/user_levels.repository.go | 69 + .../request/user_levels.request.go | 67 + .../response/user_levels.response.go | 15 + .../service/user_levels.service.go | 72 + app/module/user_levels/user_levels.module.go | 53 + .../controller/controller.go | 13 + .../user_role_accesses.controller.go | 181 + .../entity/user_role_accesses.entity.go | 18 + .../mapper/user_role_accesses.mapper.go | 26 + .../user_role_accesses.repository.go | 69 + .../request/user_role_accesses.request.go | 83 + .../response/user_role_accesses.response.go | 18 + .../service/user_role_accesses.service.go | 72 + .../user_role_accesses.module.go | 53 + .../user_roles/controller/controller.go | 13 + .../controller/user_roles.controller.go | 181 + .../user_roles/mapper/user_roles.mapper.go | 24 + .../repository/user_roles.repository.go | 69 + .../user_roles/request/user_roles.request.go | 72 + .../response/user_roles.response.go | 16 + .../user_roles/service/user_roles.service.go | 72 + app/module/user_roles/user_roles.module.go | 53 + app/module/users/controller/controller.go | 13 + .../users/controller/users.controller.go | 181 + app/module/users/mapper/users.mapper.go | 35 + .../users/repository/users.repository.go | 69 + app/module/users/request/users.request.go | 127 + app/module/users/response/users.response.go | 27 + app/module/users/service/users.service.go | 72 + app/module/users/users.module.go | 53 + app/router/api.go | 122 + config/config/index.config.main.go | 119 + config/logger/index.logger.go | 45 + config/toml/config.toml | 38 + config/webserver/webserver.config.go | 144 + docs/swagger/docs.go | 5002 +++++++++++++++++ docs/swagger/swagger.json | 4973 ++++++++++++++++ docs/swagger/swagger.yaml | 3176 +++++++++++ go.mod | 69 + go.sum | 265 + hl.exe | Bin 0 -> 6577152 bytes main.go | 73 + readme.md | 7 + storage/ascii_art.txt | 9 + storage/private.go | 8 + storage/private/example.html | 1 + storage/public/example.txt | 1 + utils/index.utils.go | 11 + utils/minio/index.minio.go | 43 + utils/paginator/index.paginator.go | 58 + utils/response/index.response.go | 91 + utils/validator/index.validator.go | 63 + 205 files changed, 24655 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/go-humas-be.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 app/database/entity/article_categories.entity.go create mode 100644 app/database/entity/article_category_details.entity.go create mode 100644 app/database/entity/article_files.entity.go create mode 100644 app/database/entity/articles.entity.go create mode 100644 app/database/entity/cities.entity.go create mode 100644 app/database/entity/districts.entity.go create mode 100644 app/database/entity/magazine_files.entity.go create mode 100644 app/database/entity/magazines.entity.go create mode 100644 app/database/entity/master_menus.entity.go create mode 100644 app/database/entity/master_modules.entity.go create mode 100644 app/database/entity/master_statuses.entity.go create mode 100644 app/database/entity/ppid_data_categories.entity.go create mode 100644 app/database/entity/ppid_data_files.entity.go create mode 100644 app/database/entity/ppid_datas.entity.go create mode 100644 app/database/entity/provinces.entity.go create mode 100644 app/database/entity/user_levels.entity.go create mode 100644 app/database/entity/user_role_accesses.entity.go create mode 100644 app/database/entity/user_roles.entity.go create mode 100644 app/database/entity/users.entity.go create mode 100644 app/database/index.database.go create mode 100644 app/database/seeds/master_statuses.seeds.go create mode 100644 app/middleware/register.middleware.go create mode 100644 app/module/article_categories/article_categories.module.go create mode 100644 app/module/article_categories/controller/article_categories.controller.go create mode 100644 app/module/article_categories/controller/controller.go create mode 100644 app/module/article_categories/mapper/article_categories.mapper.go create mode 100644 app/module/article_categories/repository/article_categories.repository.go create mode 100644 app/module/article_categories/request/article_categories.request.go create mode 100644 app/module/article_categories/response/article_categories.response.go create mode 100644 app/module/article_categories/service/article_categories.service.go create mode 100644 app/module/article_category_details/article_category_details.module.go create mode 100644 app/module/article_category_details/controller/article_category_details.controller.go create mode 100644 app/module/article_category_details/controller/controller.go create mode 100644 app/module/article_category_details/mapper/article_category_details.mapper.go create mode 100644 app/module/article_category_details/repository/article_category_details.repository.go create mode 100644 app/module/article_category_details/request/article_category_details.request.go create mode 100644 app/module/article_category_details/response/article_category_details.response.go create mode 100644 app/module/article_category_details/service/article_category_details.service.go create mode 100644 app/module/article_files/article_files.module.go create mode 100644 app/module/article_files/controller/article_files.controller.go create mode 100644 app/module/article_files/controller/controller.go create mode 100644 app/module/article_files/mapper/article_files.mapper.go create mode 100644 app/module/article_files/repository/article_files.repository.go create mode 100644 app/module/article_files/request/article_files.request.go create mode 100644 app/module/article_files/response/article_files.response.go create mode 100644 app/module/article_files/service/article_files.service.go create mode 100644 app/module/articles/articles.module.go create mode 100644 app/module/articles/controller/articles.controller.go create mode 100644 app/module/articles/controller/controller.go create mode 100644 app/module/articles/mapper/articles.mapper.go create mode 100644 app/module/articles/repository/articles.repository.go create mode 100644 app/module/articles/request/articles.request.go create mode 100644 app/module/articles/response/articles.response.go create mode 100644 app/module/articles/service/articles.service.go create mode 100644 app/module/cities/cities.module.go create mode 100644 app/module/cities/controller/cities.controller.go create mode 100644 app/module/cities/controller/controller.go create mode 100644 app/module/cities/mapper/cities.mapper.go create mode 100644 app/module/cities/repository/cities.repository.go create mode 100644 app/module/cities/request/cities.request.go create mode 100644 app/module/cities/response/cities.response.go create mode 100644 app/module/cities/service/cities.service.go create mode 100644 app/module/districts/controller/controller.go create mode 100644 app/module/districts/controller/districts.controller.go create mode 100644 app/module/districts/districts.module.go create mode 100644 app/module/districts/mapper/districts.mapper.go create mode 100644 app/module/districts/repository/districts.repository.go create mode 100644 app/module/districts/request/districts.request.go create mode 100644 app/module/districts/response/districts.response.go create mode 100644 app/module/districts/service/districts.service.go create mode 100644 app/module/magazine_files/controller/controller.go create mode 100644 app/module/magazine_files/controller/magazine_files.controller.go create mode 100644 app/module/magazine_files/magazine_files.module.go create mode 100644 app/module/magazine_files/mapper/magazine_files.mapper.go create mode 100644 app/module/magazine_files/repository/magazine_files.repository.go create mode 100644 app/module/magazine_files/request/magazine_files.request.go create mode 100644 app/module/magazine_files/response/magazine_files.response.go create mode 100644 app/module/magazine_files/service/magazine_files.service.go create mode 100644 app/module/magazines/controller/controller.go create mode 100644 app/module/magazines/controller/magazines.controller.go create mode 100644 app/module/magazines/magazines.module.go create mode 100644 app/module/magazines/mapper/magazines.mapper.go create mode 100644 app/module/magazines/repository/magazines.repository.go create mode 100644 app/module/magazines/request/magazines.request.go create mode 100644 app/module/magazines/response/magazines.response.go create mode 100644 app/module/magazines/service/magazines.service.go create mode 100644 app/module/master_menus/controller/controller.go create mode 100644 app/module/master_menus/controller/master_menus.controller.go create mode 100644 app/module/master_menus/mapper/master_menus.mapper.go create mode 100644 app/module/master_menus/master_menus.module.go create mode 100644 app/module/master_menus/repository/master_menus.repository.go create mode 100644 app/module/master_menus/request/master_menus.request.go create mode 100644 app/module/master_menus/response/master_menus.response.go create mode 100644 app/module/master_menus/service/master_menus.service.go create mode 100644 app/module/master_modules/controller/controller.go create mode 100644 app/module/master_modules/controller/master_modules.controller.go create mode 100644 app/module/master_modules/entity/master_modules.entity.go create mode 100644 app/module/master_modules/mapper/master_modules.mapper.go create mode 100644 app/module/master_modules/master_modules.module.go create mode 100644 app/module/master_modules/repository/master_modules.repository.go create mode 100644 app/module/master_modules/request/master_modules.request.go create mode 100644 app/module/master_modules/response/master_modules.response.go create mode 100644 app/module/master_modules/service/master_modules.service.go create mode 100644 app/module/master_statuses/controller/controller.go create mode 100644 app/module/master_statuses/controller/master_statuses.controller.go create mode 100644 app/module/master_statuses/entity/master_statuses.entity.go create mode 100644 app/module/master_statuses/mapper/master_statuses.mapper.go create mode 100644 app/module/master_statuses/master_statuses.module.go create mode 100644 app/module/master_statuses/repository/master_statuses.repository.go create mode 100644 app/module/master_statuses/request/master_statuses.request.go create mode 100644 app/module/master_statuses/response/master_statuses.response.go create mode 100644 app/module/master_statuses/service/master_statuses.service.go create mode 100644 app/module/ppid_data_categories/controller/controller.go create mode 100644 app/module/ppid_data_categories/controller/ppid_data_categories.controller.go create mode 100644 app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go create mode 100644 app/module/ppid_data_categories/ppid_data_categories.module.go create mode 100644 app/module/ppid_data_categories/repository/ppid_data_categories.repository.go create mode 100644 app/module/ppid_data_categories/request/ppid_data_categories.request.go create mode 100644 app/module/ppid_data_categories/response/ppid_data_categories.response.go create mode 100644 app/module/ppid_data_categories/service/ppid_data_categories.service.go create mode 100644 app/module/ppid_data_files/controller/controller.go create mode 100644 app/module/ppid_data_files/controller/ppid_data_files.controller.go create mode 100644 app/module/ppid_data_files/mapper/ppid_data_files.mapper.go create mode 100644 app/module/ppid_data_files/ppid_data_files.module.go create mode 100644 app/module/ppid_data_files/repository/ppid_data_files.repository.go create mode 100644 app/module/ppid_data_files/request/ppid_data_files.request.go create mode 100644 app/module/ppid_data_files/response/ppid_data_files.response.go create mode 100644 app/module/ppid_data_files/service/ppid_data_files.service.go create mode 100644 app/module/ppid_datas/controller/controller.go create mode 100644 app/module/ppid_datas/controller/ppid_datas.controller.go create mode 100644 app/module/ppid_datas/mapper/ppid_datas.mapper.go create mode 100644 app/module/ppid_datas/ppid_datas.module.go create mode 100644 app/module/ppid_datas/repository/ppid_datas.repository.go create mode 100644 app/module/ppid_datas/request/ppid_datas.request.go create mode 100644 app/module/ppid_datas/response/ppid_datas.response.go create mode 100644 app/module/ppid_datas/service/ppid_datas.service.go create mode 100644 app/module/provinces/controller/controller.go create mode 100644 app/module/provinces/controller/provinces.controller.go create mode 100644 app/module/provinces/mapper/provinces.mapper.go create mode 100644 app/module/provinces/provinces.module.go create mode 100644 app/module/provinces/repository/provinces.repository.go create mode 100644 app/module/provinces/request/provinces.request.go create mode 100644 app/module/provinces/response/provinces.response.go create mode 100644 app/module/provinces/service/provinces.service.go create mode 100644 app/module/user_levels/controller/controller.go create mode 100644 app/module/user_levels/controller/user_levels.controller.go create mode 100644 app/module/user_levels/mapper/user_levels.mapper.go create mode 100644 app/module/user_levels/repository/user_levels.repository.go create mode 100644 app/module/user_levels/request/user_levels.request.go create mode 100644 app/module/user_levels/response/user_levels.response.go create mode 100644 app/module/user_levels/service/user_levels.service.go create mode 100644 app/module/user_levels/user_levels.module.go create mode 100644 app/module/user_role_accesses/controller/controller.go create mode 100644 app/module/user_role_accesses/controller/user_role_accesses.controller.go create mode 100644 app/module/user_role_accesses/entity/user_role_accesses.entity.go create mode 100644 app/module/user_role_accesses/mapper/user_role_accesses.mapper.go create mode 100644 app/module/user_role_accesses/repository/user_role_accesses.repository.go create mode 100644 app/module/user_role_accesses/request/user_role_accesses.request.go create mode 100644 app/module/user_role_accesses/response/user_role_accesses.response.go create mode 100644 app/module/user_role_accesses/service/user_role_accesses.service.go create mode 100644 app/module/user_role_accesses/user_role_accesses.module.go create mode 100644 app/module/user_roles/controller/controller.go create mode 100644 app/module/user_roles/controller/user_roles.controller.go create mode 100644 app/module/user_roles/mapper/user_roles.mapper.go create mode 100644 app/module/user_roles/repository/user_roles.repository.go create mode 100644 app/module/user_roles/request/user_roles.request.go create mode 100644 app/module/user_roles/response/user_roles.response.go create mode 100644 app/module/user_roles/service/user_roles.service.go create mode 100644 app/module/user_roles/user_roles.module.go create mode 100644 app/module/users/controller/controller.go create mode 100644 app/module/users/controller/users.controller.go create mode 100644 app/module/users/mapper/users.mapper.go create mode 100644 app/module/users/repository/users.repository.go create mode 100644 app/module/users/request/users.request.go create mode 100644 app/module/users/response/users.response.go create mode 100644 app/module/users/service/users.service.go create mode 100644 app/module/users/users.module.go create mode 100644 app/router/api.go create mode 100644 config/config/index.config.main.go create mode 100644 config/logger/index.logger.go create mode 100644 config/toml/config.toml create mode 100644 config/webserver/webserver.config.go create mode 100644 docs/swagger/docs.go create mode 100644 docs/swagger/swagger.json create mode 100644 docs/swagger/swagger.yaml create mode 100644 go.mod create mode 100644 go.sum create mode 100644 hl.exe create mode 100644 main.go create mode 100644 readme.md create mode 100644 storage/ascii_art.txt create mode 100644 storage/private.go create mode 100644 storage/private/example.html create mode 100644 storage/public/example.txt create mode 100644 utils/index.utils.go create mode 100644 utils/minio/index.minio.go create mode 100644 utils/paginator/index.paginator.go create mode 100644 utils/response/index.response.go create mode 100644 utils/validator/index.validator.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..49ce3c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vendor \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..438afd1 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +go-humas-be \ No newline at end of file diff --git a/.idea/go-humas-be.iml b/.idea/go-humas-be.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/go-humas-be.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..20f9e85 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/database/entity/article_categories.entity.go b/app/database/entity/article_categories.entity.go new file mode 100644 index 0000000..49ab815 --- /dev/null +++ b/app/database/entity/article_categories.entity.go @@ -0,0 +1,20 @@ +package entity + +import "time" + +type ArticleCategories struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + ThumbnailPath string `json:"thumbnail_path" gorm:"type:varchar"` + ThumbnailUrl string `json:"thumbnail_url" gorm:"type:varchar"` + ParentId int `json:"parent_id" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsEnabled bool `json:"is_enabled" gorm:"type:bool"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} diff --git a/app/database/entity/article_category_details.entity.go b/app/database/entity/article_category_details.entity.go new file mode 100644 index 0000000..e7a1f5f --- /dev/null +++ b/app/database/entity/article_category_details.entity.go @@ -0,0 +1,12 @@ +package entity + +import "time" + +type ArticleCategoryDetails struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + ArticleId int `json:"article_id" gorm:"type:int4"` + CategoryId int `json:"category_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/article_files.entity.go b/app/database/entity/article_files.entity.go new file mode 100644 index 0000000..eaa85a8 --- /dev/null +++ b/app/database/entity/article_files.entity.go @@ -0,0 +1,24 @@ +package entity + +import "time" + +type ArticleFiles struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + ArticleId int `json:"article_id" gorm:"type:int4"` + FilePath string `json:"file_path" gorm:"type:varchar"` + FileUrl string `json:"file_url" gorm:"type:varchar"` + FileName string `json:"file_name" gorm:"type:varchar"` + FileThumbnail string `json:"file_thumbnail" gorm:"type:varchar"` + FileAlt string `json:"file_alt" gorm:"type:varchar"` + WidthPixel string `json:"width_pixel" gorm:"type:varchar"` + HeightPixel string `json:"height_pixel" gorm:"type:varchar"` + Size string `json:"size" gorm:"type:varchar"` + DownloadCount int `json:"download_count" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/articles.entity.go b/app/database/entity/articles.entity.go new file mode 100644 index 0000000..a48222b --- /dev/null +++ b/app/database/entity/articles.entity.go @@ -0,0 +1,26 @@ +package entity + +import "time" + +type Articles struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Slug string `json:"slug" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + HtmlDescription string `json:"html_description" gorm:"type:varchar"` + TypeId int `json:"type_id" gorm:"type:int4"` + Tags string `json:"tags" gorm:"type:varchar"` + ThumbnailPath string `json:"thumbnail_path" gorm:"type:varchar"` + ThumbnailUrl string `json:"thumbnail_url" gorm:"type:varchar"` + PageUrl string `json:"page_url" gorm:"type:varchar"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + ShareCount int `json:"share_count" gorm:"type:int4"` + ViewCount int `json:"view_count" gorm:"type:int4"` + DownloadCount int `json:"download_count" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/cities.entity.go b/app/database/entity/cities.entity.go new file mode 100644 index 0000000..bdb0a80 --- /dev/null +++ b/app/database/entity/cities.entity.go @@ -0,0 +1,7 @@ +package entity + +type Cities struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + CityName string `json:"city_name" gorm:"type:varchar"` + ProvId int `json:"prov_id" gorm:"type:int4"` +} diff --git a/app/database/entity/districts.entity.go b/app/database/entity/districts.entity.go new file mode 100644 index 0000000..5892118 --- /dev/null +++ b/app/database/entity/districts.entity.go @@ -0,0 +1,7 @@ +package entity + +type Districts struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + DisNam string `json:"dis_nam" gorm:"type:varchar"` + CityId int `json:"city_id" gorm:"type:int4"` +} diff --git a/app/database/entity/magazine_files.entity.go b/app/database/entity/magazine_files.entity.go new file mode 100644 index 0000000..e694a32 --- /dev/null +++ b/app/database/entity/magazine_files.entity.go @@ -0,0 +1,17 @@ +package entity + +import "time" + +type MagazineFiles struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + MagazineId int `json:"magazine_id" gorm:"type:int4"` + DownloadCount int `json:"download_count" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/magazines.entity.go b/app/database/entity/magazines.entity.go new file mode 100644 index 0000000..fabd435 --- /dev/null +++ b/app/database/entity/magazines.entity.go @@ -0,0 +1,19 @@ +package entity + +import "time" + +type Magazines struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + ThumbnailPath string `json:"thumbnail_path" gorm:"type:varchar"` + ThumbnailUrl string `json:"thumbnail_url" gorm:"type:varchar"` + PageUrl string `json:"page_url" gorm:"type:varchar"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/master_menus.entity.go b/app/database/entity/master_menus.entity.go new file mode 100644 index 0000000..25a1731 --- /dev/null +++ b/app/database/entity/master_menus.entity.go @@ -0,0 +1,17 @@ +package entity + +import "time" + +type MasterMenus struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + ModuleId int `json:"module_id" gorm:"type:int4"` + ParentMenuId int `json:"parent_menu_id" gorm:"type:int4"` + Icon string `json:"icon" gorm:"type:varchar"` + Position int `json:"position" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} diff --git a/app/database/entity/master_modules.entity.go b/app/database/entity/master_modules.entity.go new file mode 100644 index 0000000..592ec04 --- /dev/null +++ b/app/database/entity/master_modules.entity.go @@ -0,0 +1,14 @@ +package entity + +import "time" + +type MasterModules struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + PathUrl string `json:"path_url" gorm:"type:varchar"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} diff --git a/app/database/entity/master_statuses.entity.go b/app/database/entity/master_statuses.entity.go new file mode 100644 index 0000000..75d20a0 --- /dev/null +++ b/app/database/entity/master_statuses.entity.go @@ -0,0 +1,7 @@ +package entity + +type MasterStatuses struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + IsActive bool `json:"is_active" gorm:"type:bool"` +} diff --git a/app/database/entity/ppid_data_categories.entity.go b/app/database/entity/ppid_data_categories.entity.go new file mode 100644 index 0000000..0a08763 --- /dev/null +++ b/app/database/entity/ppid_data_categories.entity.go @@ -0,0 +1,13 @@ +package entity + +import "time" + +type PpidDataCategories struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + Slug string `json:"slug" gorm:"type:varchar"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/ppid_data_files.entity.go b/app/database/entity/ppid_data_files.entity.go new file mode 100644 index 0000000..e4ff541 --- /dev/null +++ b/app/database/entity/ppid_data_files.entity.go @@ -0,0 +1,20 @@ +package entity + +import "time" + +type PpidDataFiles struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + PpidDataId int `json:"ppid_data_id" gorm:"type:int4"` + Description string `json:"description" gorm:"type:varchar"` + Unit string `json:"unit" gorm:"type:varchar"` + FileType string `json:"file_type" gorm:"type:varchar"` + DownloadCount int `json:"download_count" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/ppid_datas.entity.go b/app/database/entity/ppid_datas.entity.go new file mode 100644 index 0000000..8d7e228 --- /dev/null +++ b/app/database/entity/ppid_datas.entity.go @@ -0,0 +1,17 @@ +package entity + +import "time" + +type PpidDatas struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Title string `json:"title" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + CategoryId int `json:"category_id" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsPublish bool `json:"is_publish" gorm:"type:bool"` + PublishedAt time.Time `json:"published_at" gorm:"type:timestamp"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/provinces.entity.go b/app/database/entity/provinces.entity.go new file mode 100644 index 0000000..f9f3902 --- /dev/null +++ b/app/database/entity/provinces.entity.go @@ -0,0 +1,9 @@ +package entity + +type Provinces struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + ProvName string `json:"prov_name" gorm:"type:varchar"` + LocationId int `json:"location_id" gorm:"type:int4"` + Status int `json:"status" gorm:"type:int4"` + Timezone string `json:"timezone" gorm:"type:varchar"` +} diff --git a/app/database/entity/user_levels.entity.go b/app/database/entity/user_levels.entity.go new file mode 100644 index 0000000..920cb1a --- /dev/null +++ b/app/database/entity/user_levels.entity.go @@ -0,0 +1,15 @@ +package entity + +import "time" + +type UserLevels struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + AliasName string `json:"alias_name" gorm:"type:varchar"` + LevelNumber int `json:"level_number" gorm:"type:int4"` + ParentLevelId int `json:"parent_level_id" gorm:"type:int4"` + ProvinceId int `json:"province_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/user_role_accesses.entity.go b/app/database/entity/user_role_accesses.entity.go new file mode 100644 index 0000000..a0632ff --- /dev/null +++ b/app/database/entity/user_role_accesses.entity.go @@ -0,0 +1,18 @@ +package entity + +import "time" + +type UserRoleAccesses struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + UserRoleId int `json:"user_role_id" gorm:"type:int4"` + MenuId int `json:"menu_id" gorm:"type:int4"` + IsViewEnabled bool `json:"is_view_enabled" gorm:"type:bool"` + IsInsertEnabled bool `json:"is_insert_enabled" gorm:"type:bool"` + IsUpdateEnabled bool `json:"is_update_enabled" gorm:"type:bool"` + IsDeleteEnabled bool `json:"is_delete_enabled" gorm:"type:bool"` + IsApprovalEnabled bool `json:"is_approval_enabled" gorm:"type:bool"` + IsAdminEnabled bool `json:"is_admin_enabled" gorm:"type:bool"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} diff --git a/app/database/entity/user_roles.entity.go b/app/database/entity/user_roles.entity.go new file mode 100644 index 0000000..bda73a5 --- /dev/null +++ b/app/database/entity/user_roles.entity.go @@ -0,0 +1,16 @@ +package entity + +import "time" + +type UserRoles struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + Code string `json:"code" gorm:"type:varchar"` + LevelNumber int `json:"level_number" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/entity/users.entity.go b/app/database/entity/users.entity.go new file mode 100644 index 0000000..cf63bf3 --- /dev/null +++ b/app/database/entity/users.entity.go @@ -0,0 +1,27 @@ +package entity + +import "time" + +type Users struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Username string `json:"username" gorm:"type:varchar"` + Email string `json:"email" gorm:"type:varchar"` + Fullname string `json:"fullname" gorm:"type:varchar"` + Address string `json:"address" gorm:"type:varchar"` + PhoneNumber string `json:"phone_number" gorm:"type:varchar"` + WorkType string `json:"work_type" gorm:"type:varchar"` + GenderType string `json:"gender_type" gorm:"type:varchar"` + IdentityType string `json:"identity_type" gorm:"type:varchar"` + IdentityNumber string `json:"identity_number" gorm:"type:varchar"` + DateOfBirth string `json:"date_of_birth" gorm:"type:varchar"` + LastEducation string `json:"last_education" gorm:"type:varchar"` + KeycloakId string `json:"keycloak_id" gorm:"type:varchar"` + UserRoleId int `json:"user_role_id" gorm:"type:int4"` + StatusId int `json:"status_id" gorm:"type:int4"` + UserLevelsId int `json:"user_levels_id" gorm:"type:int4"` + CreatedById int `json:"created_by_id" gorm:"type:int4"` + ProfilePicturePath string `json:"profile_picture_path" gorm:"type:varchar"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/database/index.database.go b/app/database/index.database.go new file mode 100644 index 0000000..6db9707 --- /dev/null +++ b/app/database/index.database.go @@ -0,0 +1,111 @@ +package database + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/database/entity" + "go-humas-be/config/config" + "gorm.io/driver/postgres" + "gorm.io/gorm" +) + +// Database setup database with gorm +type Database struct { + DB *gorm.DB + Log zerolog.Logger + Cfg *config.Config +} + +type Seeder interface { + Seed(*gorm.DB) error + Count(*gorm.DB) (int, error) +} + +func NewDatabase(cfg *config.Config, log zerolog.Logger) *Database { + db := &Database{ + Cfg: cfg, + Log: log, + } + + return db +} + +// ConnectDatabase connect database +func (_db *Database) ConnectDatabase() { + conn, err := gorm.Open(postgres.Open(_db.Cfg.DB.Postgres.DSN), &gorm.Config{}) + if err != nil { + _db.Log.Error().Err(err).Msg("An unknown error occurred when to connect the database!") + } else { + _db.Log.Info().Msg("Connected the database succesfully!") + } + + _db.DB = conn +} + +// ShutdownDatabase shutdown database +func (_db *Database) ShutdownDatabase() { + sqlDB, err := _db.DB.DB() + if err != nil { + _db.Log.Error().Err(err).Msg("An unknown error occurred when to shutdown the database!") + } else { + _db.Log.Info().Msg("Shutdown the database succesfully!") + } + sqlDB.Close() +} + +// MigrateModels migrate models +func (_db *Database) MigrateModels() { + err := _db.DB.AutoMigrate( + Models()..., + ) + if err != nil { + _db.Log.Error().Err(err).Msg("An unknown error occurred when to migrate the database!") + } else { + _db.Log.Info().Msg("Migrate the database entity succesfully!") + } +} + +// Models list of models for migration +func Models() []interface{} { + return []interface{}{ + entity.ArticleCategories{}, + entity.ArticleCategoryDetails{}, + entity.ArticleFiles{}, + entity.Cities{}, + entity.Districts{}, + entity.Magazines{}, + entity.MagazineFiles{}, + entity.MasterMenus{}, + entity.MasterModules{}, + entity.MasterStatuses{}, + entity.PpidDatas{}, + entity.PpidDataFiles{}, + entity.PpidDataCategories{}, + entity.Provinces{}, + entity.UserLevels{}, + entity.UserRoles{}, + entity.UserRoleAccesses{}, + entity.Users{}, + } +} + +// SeedModels seed data +func (_db *Database) SeedModels(seeder []Seeder) { + for _, seed := range seeder { + count, err := seed.Count(_db.DB) + if err != nil { + _db.Log.Error().Err(err).Msg("An unknown error occurred when to seed the database!") + } + + if count == 0 { + if err := seed.Seed(_db.DB); err != nil { + _db.Log.Error().Err(err).Msg("An unknown error occurred when to seed the database!") + } + + _db.Log.Info().Msg("Seeded the database successfully!") + } else { + _db.Log.Info().Msg("Database is already seeded!") + } + } + + _db.Log.Info().Msg("Seeded the database succesfully!") +} diff --git a/app/database/seeds/master_statuses.seeds.go b/app/database/seeds/master_statuses.seeds.go new file mode 100644 index 0000000..0834786 --- /dev/null +++ b/app/database/seeds/master_statuses.seeds.go @@ -0,0 +1,45 @@ +package seeds + +import ( + "go-humas-be/app/database/entity" + "gorm.io/gorm" +) + +type MasterStatusesSeeder struct{} + +var masterStatuses = []entity.MasterStatuses{ + { + ID: 1, + Name: "Waiting", + IsActive: true, + }, + { + ID: 2, + Name: "Active", + IsActive: true, + }, + { + ID: 3, + Name: "Inactive", + IsActive: true, + }, +} + +func (MasterStatusesSeeder) Seed(conn *gorm.DB) error { + for _, row := range masterStatuses { + if err := conn.Create(&row).Error; err != nil { + return err + } + } + + return nil +} + +func (MasterStatusesSeeder) Count(conn *gorm.DB) (int, error) { + var count int64 + if err := conn.Model(&entity.MasterStatuses{}).Count(&count).Error; err != nil { + return 0, err + } + + return int(count), nil +} diff --git a/app/middleware/register.middleware.go b/app/middleware/register.middleware.go new file mode 100644 index 0000000..5f04cf5 --- /dev/null +++ b/app/middleware/register.middleware.go @@ -0,0 +1,61 @@ +package middleware + +import ( + "go-humas-be/config/config" + "go-humas-be/utils" + "time" + + "github.com/gofiber/fiber/v2" + "github.com/gofiber/fiber/v2/middleware/compress" + "github.com/gofiber/fiber/v2/middleware/limiter" + "github.com/gofiber/fiber/v2/middleware/monitor" + "github.com/gofiber/fiber/v2/middleware/pprof" + "github.com/gofiber/fiber/v2/middleware/recover" +) + +// Middleware is a struct that contains all the middleware functions +type Middleware struct { + App *fiber.App + Cfg *config.Config +} + +func NewMiddleware(app *fiber.App, cfg *config.Config) *Middleware { + return &Middleware{ + App: app, + Cfg: cfg, + } +} + +// Register registers all the middleware functions +func (m *Middleware) Register() { + // Add Extra Middlewares + m.App.Use(limiter.New(limiter.Config{ + Next: utils.IsEnabled(m.Cfg.Middleware.Limiter.Enable), + Max: m.Cfg.Middleware.Limiter.Max, + Expiration: m.Cfg.Middleware.Limiter.Expiration * time.Second, + })) + + m.App.Use(compress.New(compress.Config{ + Next: utils.IsEnabled(m.Cfg.Middleware.Compress.Enable), + Level: m.Cfg.Middleware.Compress.Level, + })) + + m.App.Use(recover.New(recover.Config{ + Next: utils.IsEnabled(m.Cfg.Middleware.Recover.Enable), + })) + + m.App.Use(pprof.New(pprof.Config{ + Next: utils.IsEnabled(m.Cfg.Middleware.Pprof.Enable), + })) + + //m.App.Use(filesystem.New(filesystem.Config{ + // Next: utils.IsEnabled(m.Cfg.Middleware.FileSystem.Enable), + // Root: http.Dir(m.Cfg.Middleware.FileSystem.Root), + // Browse: m.Cfg.Middleware.FileSystem.Browse, + // MaxAge: m.Cfg.Middleware.FileSystem.MaxAge, + //})) + + m.App.Get(m.Cfg.Middleware.Monitor.Path, monitor.New(monitor.Config{ + Next: utils.IsEnabled(m.Cfg.Middleware.Monitor.Enable), + })) +} diff --git a/app/module/article_categories/article_categories.module.go b/app/module/article_categories/article_categories.module.go new file mode 100644 index 0000000..5cd2cfd --- /dev/null +++ b/app/module/article_categories/article_categories.module.go @@ -0,0 +1,53 @@ +package article_categories + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_categories/controller" + "go-humas-be/app/module/article_categories/repository" + "go-humas-be/app/module/article_categories/service" + "go.uber.org/fx" +) + +// struct of ArticleCategoriesRouter +type ArticleCategoriesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of ArticleCategories module +var NewArticleCategoriesModule = fx.Options( + // register repository of ArticleCategories module + fx.Provide(repository.NewArticleCategoriesRepository), + + // register service of ArticleCategories module + fx.Provide(service.NewArticleCategoriesService), + + // register controller of ArticleCategories module + fx.Provide(controller.NewController), + + // register router of ArticleCategories module + fx.Provide(NewArticleCategoriesRouter), +) + +// init ArticleCategoriesRouter +func NewArticleCategoriesRouter(fiber *fiber.App, controller *controller.Controller) *ArticleCategoriesRouter { + return &ArticleCategoriesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of ArticleCategories module +func (_i *ArticleCategoriesRouter) RegisterArticleCategoriesRoutes() { + // define controllers + articleCategoriesController := _i.Controller.ArticleCategories + + // define routes + _i.App.Route("/article-categories", func(router fiber.Router) { + router.Get("/", articleCategoriesController.All) + router.Get("/:id", articleCategoriesController.Show) + router.Post("/", articleCategoriesController.Save) + router.Put("/:id", articleCategoriesController.Update) + router.Delete("/:id", articleCategoriesController.Delete) + }) +} diff --git a/app/module/article_categories/controller/article_categories.controller.go b/app/module/article_categories/controller/article_categories.controller.go new file mode 100644 index 0000000..cbca66f --- /dev/null +++ b/app/module/article_categories/controller/article_categories.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_categories/request" + "go-humas-be/app/module/article_categories/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type articleCategoriesController struct { + articleCategoriesService service.ArticleCategoriesService +} + +type ArticleCategoriesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewArticleCategoriesController(articleCategoriesService service.ArticleCategoriesService) ArticleCategoriesController { + return &articleCategoriesController{ + articleCategoriesService: articleCategoriesService, + } +} + +// All get all ArticleCategories +// @Summary Get all ArticleCategories +// @Description API for getting all ArticleCategories +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-categories [get] +func (_i *articleCategoriesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.ArticleCategoriesQueryRequest + req.Pagination = paginate + + articleCategoriesData, paging, err := _i.articleCategoriesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategories list successfully retrieved"}, + Data: articleCategoriesData, + Meta: paging, + }) +} + +// Show get one ArticleCategories +// @Summary Get one ArticleCategories +// @Description API for getting one ArticleCategories +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-categories/{id} [get] +func (_i *articleCategoriesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + articleCategoriesData, err := _i.articleCategoriesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategories successfully retrieved"}, + Data: articleCategoriesData, + }) +} + +// Save create ArticleCategories +// @Summary Create ArticleCategories +// @Description API for create ArticleCategories +// @Tags Task +// @Security Bearer +// @Param payload body request.ArticleCategoriesCreateRequest true "Required payload" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-categories [post] +func (_i *articleCategoriesController) Save(c *fiber.Ctx) error { + req := new(request.ArticleCategoriesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.articleCategoriesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategories successfully created"}, + }) +} + +// Update update ArticleCategories +// @Summary update ArticleCategories +// @Description API for update ArticleCategories +// @Tags Task +// @Security Bearer +// @Param payload body request.ArticleCategoriesCreateRequest true "Required payload" +// @Param id path int true "ArticleCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-categories/{id} [put] +func (_i *articleCategoriesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.ArticleCategoriesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.articleCategoriesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategories successfully updated"}, + }) +} + +// Delete delete ArticleCategories +// @Summary delete ArticleCategories +// @Description API for delete ArticleCategories +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-categories/{id} [delete] +func (_i *articleCategoriesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.articleCategoriesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategories successfully deleted"}, + }) +} diff --git a/app/module/article_categories/controller/controller.go b/app/module/article_categories/controller/controller.go new file mode 100644 index 0000000..0a510ae --- /dev/null +++ b/app/module/article_categories/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/article_categories/service" + +type Controller struct { + ArticleCategories ArticleCategoriesController +} + +func NewController(ArticleCategoriesService service.ArticleCategoriesService) *Controller { + return &Controller{ + ArticleCategories: NewArticleCategoriesController(ArticleCategoriesService), + } +} \ No newline at end of file diff --git a/app/module/article_categories/mapper/article_categories.mapper.go b/app/module/article_categories/mapper/article_categories.mapper.go new file mode 100644 index 0000000..e3ccdad --- /dev/null +++ b/app/module/article_categories/mapper/article_categories.mapper.go @@ -0,0 +1,28 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/article_categories/response" +) + +func ArticleCategoriesResponseMapper(articleCategoriesReq *entity.ArticleCategories) (articleCategoriesRes *res.ArticleCategoriesResponse) { + if articleCategoriesReq != nil { + articleCategoriesRes = &res.ArticleCategoriesResponse{ + ID: articleCategoriesReq.ID, + Title: articleCategoriesReq.Title, + Description: articleCategoriesReq.Description, + ThumbnailPath: articleCategoriesReq.ThumbnailPath, + ThumbnailUrl: articleCategoriesReq.ThumbnailUrl, + ParentId: articleCategoriesReq.ParentId, + CreatedById: articleCategoriesReq.CreatedById, + StatusId: articleCategoriesReq.StatusId, + IsPublish: articleCategoriesReq.IsPublish, + PublishedAt: articleCategoriesReq.PublishedAt, + IsEnabled: articleCategoriesReq.IsEnabled, + IsActive: articleCategoriesReq.IsActive, + CreatedAt: articleCategoriesReq.CreatedAt, + UpdatedAt: articleCategoriesReq.UpdatedAt, + } + } + return articleCategoriesRes +} diff --git a/app/module/article_categories/repository/article_categories.repository.go b/app/module/article_categories/repository/article_categories.repository.go new file mode 100644 index 0000000..5fe67f2 --- /dev/null +++ b/app/module/article_categories/repository/article_categories.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/article_categories/request" + "go-humas-be/utils/paginator" +) + +type articleCategoriesRepository struct { + DB *database.Database +} + +// ArticleCategoriesRepository define interface of IArticleCategoriesRepository +type ArticleCategoriesRepository interface { + GetAll(req request.ArticleCategoriesQueryRequest) (articleCategoriess []*entity.ArticleCategories, paging paginator.Pagination, err error) + FindOne(id uint) (articleCategories *entity.ArticleCategories, err error) + Create(articleCategories *entity.ArticleCategories) (err error) + Update(id uint, articleCategories *entity.ArticleCategories) (err error) + Delete(id uint) (err error) +} + +func NewArticleCategoriesRepository(db *database.Database) ArticleCategoriesRepository { + return &articleCategoriesRepository{ + DB: db, + } +} + +// implement interface of IArticleCategoriesRepository +func (_i *articleCategoriesRepository) GetAll(req request.ArticleCategoriesQueryRequest) (articleCategoriess []*entity.ArticleCategories, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.ArticleCategories{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&articleCategoriess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *articleCategoriesRepository) FindOne(id uint) (articleCategories *entity.ArticleCategories, err error) { + if err := _i.DB.DB.First(&articleCategories, id).Error; err != nil { + return nil, err + } + + return articleCategories, nil +} + +func (_i *articleCategoriesRepository) Create(articleCategories *entity.ArticleCategories) (err error) { + return _i.DB.DB.Create(articleCategories).Error +} + +func (_i *articleCategoriesRepository) Update(id uint, articleCategories *entity.ArticleCategories) (err error) { + return _i.DB.DB.Model(&entity.ArticleCategories{}). + Where(&entity.ArticleCategories{ID: id}). + Updates(articleCategories).Error +} + +func (_i *articleCategoriesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.ArticleCategories{}, id).Error +} diff --git a/app/module/article_categories/request/article_categories.request.go b/app/module/article_categories/request/article_categories.request.go new file mode 100644 index 0000000..dc03feb --- /dev/null +++ b/app/module/article_categories/request/article_categories.request.go @@ -0,0 +1,92 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type ArticleCategoriesGeneric interface { + ToEntity() +} + +type ArticleCategoriesQueryRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + ParentId int `json:"parent_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsEnabled bool `json:"is_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type ArticleCategoriesCreateRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + ParentId int `json:"parent_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsEnabled bool `json:"is_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req ArticleCategoriesCreateRequest) ToEntity() *entity.ArticleCategories { + return &entity.ArticleCategories{ + Title: req.Title, + Description: req.Description, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + ParentId: req.ParentId, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsEnabled: req.IsEnabled, + IsActive: req.IsActive, + } +} + +type ArticleCategoriesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + ParentId int `json:"parent_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsEnabled bool `json:"is_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories { + return &entity.ArticleCategories{ + ID: req.ID, + Title: req.Title, + Description: req.Description, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + ParentId: req.ParentId, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsEnabled: req.IsEnabled, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/article_categories/response/article_categories.response.go b/app/module/article_categories/response/article_categories.response.go new file mode 100644 index 0000000..90824ba --- /dev/null +++ b/app/module/article_categories/response/article_categories.response.go @@ -0,0 +1,20 @@ +package response + +import "time" + +type ArticleCategoriesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + ThumbnailPath string `json:"thumbnail_path"` + ThumbnailUrl string `json:"thumbnail_url"` + ParentId int `json:"parent_id"` + CreatedById int `json:"created_by_id"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsEnabled bool `json:"is_enabled"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/article_categories/service/article_categories.service.go b/app/module/article_categories/service/article_categories.service.go new file mode 100644 index 0000000..640b711 --- /dev/null +++ b/app/module/article_categories/service/article_categories.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/article_categories/mapper" + "go-humas-be/app/module/article_categories/repository" + "go-humas-be/app/module/article_categories/request" + "go-humas-be/app/module/article_categories/response" + "go-humas-be/utils/paginator" +) + +// ArticleCategoriesService +type articleCategoriesService struct { + Repo repository.ArticleCategoriesRepository + Log zerolog.Logger +} + +// ArticleCategoriesService define interface of IArticleCategoriesService +type ArticleCategoriesService interface { + All(req request.ArticleCategoriesQueryRequest) (articleCategories []*response.ArticleCategoriesResponse, paging paginator.Pagination, err error) + Show(id uint) (articleCategories *response.ArticleCategoriesResponse, err error) + Save(req request.ArticleCategoriesCreateRequest) (err error) + Update(id uint, req request.ArticleCategoriesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewArticleCategoriesService init ArticleCategoriesService +func NewArticleCategoriesService(repo repository.ArticleCategoriesRepository, log zerolog.Logger) ArticleCategoriesService { + + return &articleCategoriesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of ArticleCategoriesService +func (_i *articleCategoriesService) All(req request.ArticleCategoriesQueryRequest) (articleCategoriess []*response.ArticleCategoriesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + articleCategoriess = append(articleCategoriess, mapper.ArticleCategoriesResponseMapper(result)) + } + + return +} + +func (_i *articleCategoriesService) Show(id uint) (articleCategories *response.ArticleCategoriesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.ArticleCategoriesResponseMapper(result), nil +} + +func (_i *articleCategoriesService) Save(req request.ArticleCategoriesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *articleCategoriesService) Update(id uint, req request.ArticleCategoriesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *articleCategoriesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/article_category_details/article_category_details.module.go b/app/module/article_category_details/article_category_details.module.go new file mode 100644 index 0000000..e482392 --- /dev/null +++ b/app/module/article_category_details/article_category_details.module.go @@ -0,0 +1,53 @@ +package article_category_details + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_category_details/controller" + "go-humas-be/app/module/article_category_details/repository" + "go-humas-be/app/module/article_category_details/service" + "go.uber.org/fx" +) + +// struct of ArticleCategoryDetailsRouter +type ArticleCategoryDetailsRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of ArticleCategoryDetails module +var NewArticleCategoryDetailsModule = fx.Options( + // register repository of ArticleCategoryDetails module + fx.Provide(repository.NewArticleCategoryDetailsRepository), + + // register service of ArticleCategoryDetails module + fx.Provide(service.NewArticleCategoryDetailsService), + + // register controller of ArticleCategoryDetails module + fx.Provide(controller.NewController), + + // register router of ArticleCategoryDetails module + fx.Provide(NewArticleCategoryDetailsRouter), +) + +// init ArticleCategoryDetailsRouter +func NewArticleCategoryDetailsRouter(fiber *fiber.App, controller *controller.Controller) *ArticleCategoryDetailsRouter { + return &ArticleCategoryDetailsRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of ArticleCategoryDetails module +func (_i *ArticleCategoryDetailsRouter) RegisterArticleCategoryDetailsRoutes() { + // define controllers + articleCategoryDetailsController := _i.Controller.ArticleCategoryDetails + + // define routes + _i.App.Route("/article-category-details", func(router fiber.Router) { + router.Get("/", articleCategoryDetailsController.All) + router.Get("/:id", articleCategoryDetailsController.Show) + router.Post("/", articleCategoryDetailsController.Save) + router.Put("/:id", articleCategoryDetailsController.Update) + router.Delete("/:id", articleCategoryDetailsController.Delete) + }) +} diff --git a/app/module/article_category_details/controller/article_category_details.controller.go b/app/module/article_category_details/controller/article_category_details.controller.go new file mode 100644 index 0000000..cf794b2 --- /dev/null +++ b/app/module/article_category_details/controller/article_category_details.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_category_details/request" + "go-humas-be/app/module/article_category_details/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type articleCategoryDetailsController struct { + articleCategoryDetailsService service.ArticleCategoryDetailsService +} + +type ArticleCategoryDetailsController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewArticleCategoryDetailsController(articleCategoryDetailsService service.ArticleCategoryDetailsService) ArticleCategoryDetailsController { + return &articleCategoryDetailsController{ + articleCategoryDetailsService: articleCategoryDetailsService, + } +} + +// All get all ArticleCategoryDetails +// @Summary Get all ArticleCategoryDetails +// @Description API for getting all ArticleCategoryDetails +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-category-details [get] +func (_i *articleCategoryDetailsController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.ArticleCategoryDetailsQueryRequest + req.Pagination = paginate + + articleCategoryDetailsData, paging, err := _i.articleCategoryDetailsService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategoryDetails list successfully retrieved"}, + Data: articleCategoryDetailsData, + Meta: paging, + }) +} + +// Show get one ArticleCategoryDetails +// @Summary Get one ArticleCategoryDetails +// @Description API for getting one ArticleCategoryDetails +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleCategoryDetails ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-category-details/{id} [get] +func (_i *articleCategoryDetailsController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + articleCategoryDetailsData, err := _i.articleCategoryDetailsService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategoryDetails successfully retrieved"}, + Data: articleCategoryDetailsData, + }) +} + +// Save create ArticleCategoryDetails +// @Summary Create ArticleCategoryDetails +// @Description API for create ArticleCategoryDetails +// @Tags Task +// @Security Bearer +// @Body request.ArticleCategoryDetailsCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-category-details [post] +func (_i *articleCategoryDetailsController) Save(c *fiber.Ctx) error { + req := new(request.ArticleCategoryDetailsCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.articleCategoryDetailsService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategoryDetails successfully created"}, + }) +} + +// Update update ArticleCategoryDetails +// @Summary update ArticleCategoryDetails +// @Description API for update ArticleCategoryDetails +// @Tags Task +// @Security Bearer +// @Body request.ArticleCategoryDetailsUpdateRequest +// @Param id path int true "ArticleCategoryDetails ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-category-details/{id} [put] +func (_i *articleCategoryDetailsController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.ArticleCategoryDetailsUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.articleCategoryDetailsService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategoryDetails successfully updated"}, + }) +} + +// Delete delete ArticleCategoryDetails +// @Summary delete ArticleCategoryDetails +// @Description API for delete ArticleCategoryDetails +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleCategoryDetails ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-category-details/{id} [delete] +func (_i *articleCategoryDetailsController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.articleCategoryDetailsService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleCategoryDetails successfully deleted"}, + }) +} diff --git a/app/module/article_category_details/controller/controller.go b/app/module/article_category_details/controller/controller.go new file mode 100644 index 0000000..ff2de77 --- /dev/null +++ b/app/module/article_category_details/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/article_category_details/service" + +type Controller struct { + ArticleCategoryDetails ArticleCategoryDetailsController +} + +func NewController(ArticleCategoryDetailsService service.ArticleCategoryDetailsService) *Controller { + return &Controller{ + ArticleCategoryDetails: NewArticleCategoryDetailsController(ArticleCategoryDetailsService), + } +} \ No newline at end of file diff --git a/app/module/article_category_details/mapper/article_category_details.mapper.go b/app/module/article_category_details/mapper/article_category_details.mapper.go new file mode 100644 index 0000000..7eaf33f --- /dev/null +++ b/app/module/article_category_details/mapper/article_category_details.mapper.go @@ -0,0 +1,20 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/article_category_details/response" +) + +func ArticleCategoryDetailsResponseMapper(articleCategoryDetailsReq *entity.ArticleCategoryDetails) (articleCategoryDetailsRes *res.ArticleCategoryDetailsResponse) { + if articleCategoryDetailsReq != nil { + articleCategoryDetailsRes = &res.ArticleCategoryDetailsResponse{ + ID: articleCategoryDetailsReq.ID, + ArticleId: articleCategoryDetailsReq.ArticleId, + CategoryId: articleCategoryDetailsReq.CategoryId, + IsActive: articleCategoryDetailsReq.IsActive, + CreatedAt: articleCategoryDetailsReq.CreatedAt, + UpdatedAt: articleCategoryDetailsReq.UpdatedAt, + } + } + return articleCategoryDetailsRes +} \ No newline at end of file diff --git a/app/module/article_category_details/repository/article_category_details.repository.go b/app/module/article_category_details/repository/article_category_details.repository.go new file mode 100644 index 0000000..5fd4821 --- /dev/null +++ b/app/module/article_category_details/repository/article_category_details.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/article_category_details/request" + "go-humas-be/utils/paginator" +) + +type articleCategoryDetailsRepository struct { + DB *database.Database +} + +// ArticleCategoryDetailsRepository define interface of IArticleCategoryDetailsRepository +type ArticleCategoryDetailsRepository interface { + GetAll(req request.ArticleCategoryDetailsQueryRequest) (articleCategoryDetailss []*entity.ArticleCategoryDetails, paging paginator.Pagination, err error) + FindOne(id uint) (articleCategoryDetails *entity.ArticleCategoryDetails, err error) + Create(articleCategoryDetails *entity.ArticleCategoryDetails) (err error) + Update(id uint, articleCategoryDetails *entity.ArticleCategoryDetails) (err error) + Delete(id uint) (err error) +} + +func NewArticleCategoryDetailsRepository(db *database.Database) ArticleCategoryDetailsRepository { + return &articleCategoryDetailsRepository{ + DB: db, + } +} + +// implement interface of IArticleCategoryDetailsRepository +func (_i *articleCategoryDetailsRepository) GetAll(req request.ArticleCategoryDetailsQueryRequest) (articleCategoryDetailss []*entity.ArticleCategoryDetails, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.ArticleCategoryDetails{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&articleCategoryDetailss).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *articleCategoryDetailsRepository) FindOne(id uint) (articleCategoryDetails *entity.ArticleCategoryDetails, err error) { + if err := _i.DB.DB.First(&articleCategoryDetails, id).Error; err != nil { + return nil, err + } + + return articleCategoryDetails, nil +} + +func (_i *articleCategoryDetailsRepository) Create(articleCategoryDetails *entity.ArticleCategoryDetails) (err error) { + return _i.DB.DB.Create(articleCategoryDetails).Error +} + +func (_i *articleCategoryDetailsRepository) Update(id uint, articleCategoryDetails *entity.ArticleCategoryDetails) (err error) { + return _i.DB.DB.Model(&entity.ArticleCategoryDetails{}). + Where(&entity.ArticleCategoryDetails{ID: id}). + Updates(articleCategoryDetails).Error +} + +func (_i *articleCategoryDetailsRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.ArticleCategoryDetails{}, id).Error +} \ No newline at end of file diff --git a/app/module/article_category_details/request/article_category_details.request.go b/app/module/article_category_details/request/article_category_details.request.go new file mode 100644 index 0000000..8c8f749 --- /dev/null +++ b/app/module/article_category_details/request/article_category_details.request.go @@ -0,0 +1,52 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type ArticleCategoryDetailsGeneric interface { + ToEntity() +} + +type ArticleCategoryDetailsQueryRequest struct { + ArticleId int `json:"article_id" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type ArticleCategoryDetailsCreateRequest struct { + ArticleId int `json:"article_id" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req ArticleCategoryDetailsCreateRequest) ToEntity() *entity.ArticleCategoryDetails { + return &entity.ArticleCategoryDetails{ + ArticleId: req.ArticleId, + CategoryId: req.CategoryId, + IsActive: req.IsActive, + } +} + +type ArticleCategoryDetailsUpdateRequest struct { + ID uint `json:"id" validate:"required"` + ArticleId int `json:"article_id" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req ArticleCategoryDetailsUpdateRequest) ToEntity() *entity.ArticleCategoryDetails { + return &entity.ArticleCategoryDetails{ + ID: req.ID, + ArticleId: req.ArticleId, + CategoryId: req.CategoryId, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/article_category_details/response/article_category_details.response.go b/app/module/article_category_details/response/article_category_details.response.go new file mode 100644 index 0000000..dc2ff6b --- /dev/null +++ b/app/module/article_category_details/response/article_category_details.response.go @@ -0,0 +1,12 @@ +package response + +import "time" + +type ArticleCategoryDetailsResponse struct { + ID uint `json:"id"` + ArticleId int `json:"article_id"` + CategoryId int `json:"category_id"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/article_category_details/service/article_category_details.service.go b/app/module/article_category_details/service/article_category_details.service.go new file mode 100644 index 0000000..0ac2b80 --- /dev/null +++ b/app/module/article_category_details/service/article_category_details.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/article_category_details/mapper" + "go-humas-be/app/module/article_category_details/repository" + "go-humas-be/app/module/article_category_details/request" + "go-humas-be/app/module/article_category_details/response" + "go-humas-be/utils/paginator" +) + +// ArticleCategoryDetailsService +type articleCategoryDetailsService struct { + Repo repository.ArticleCategoryDetailsRepository + Log zerolog.Logger +} + +// ArticleCategoryDetailsService define interface of IArticleCategoryDetailsService +type ArticleCategoryDetailsService interface { + All(req request.ArticleCategoryDetailsQueryRequest) (articleCategoryDetails []*response.ArticleCategoryDetailsResponse, paging paginator.Pagination, err error) + Show(id uint) (articleCategoryDetails *response.ArticleCategoryDetailsResponse, err error) + Save(req request.ArticleCategoryDetailsCreateRequest) (err error) + Update(id uint, req request.ArticleCategoryDetailsUpdateRequest) (err error) + Delete(id uint) error +} + +// NewArticleCategoryDetailsService init ArticleCategoryDetailsService +func NewArticleCategoryDetailsService(repo repository.ArticleCategoryDetailsRepository, log zerolog.Logger) ArticleCategoryDetailsService { + + return &articleCategoryDetailsService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of ArticleCategoryDetailsService +func (_i *articleCategoryDetailsService) All(req request.ArticleCategoryDetailsQueryRequest) (articleCategoryDetailss []*response.ArticleCategoryDetailsResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + articleCategoryDetailss = append(articleCategoryDetailss, mapper.ArticleCategoryDetailsResponseMapper(result)) + } + + return +} + +func (_i *articleCategoryDetailsService) Show(id uint) (articleCategoryDetails *response.ArticleCategoryDetailsResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.ArticleCategoryDetailsResponseMapper(result), nil +} + +func (_i *articleCategoryDetailsService) Save(req request.ArticleCategoryDetailsCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *articleCategoryDetailsService) Update(id uint, req request.ArticleCategoryDetailsUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *articleCategoryDetailsService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/article_files/article_files.module.go b/app/module/article_files/article_files.module.go new file mode 100644 index 0000000..0635994 --- /dev/null +++ b/app/module/article_files/article_files.module.go @@ -0,0 +1,55 @@ +package article_files + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_files/controller" + "go-humas-be/app/module/article_files/repository" + "go-humas-be/app/module/article_files/service" + "go.uber.org/fx" +) + +// struct of ArticleFilesRouter +type ArticleFilesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of ArticleFiles module +var NewArticleFilesModule = fx.Options( + // register repository of ArticleFiles module + fx.Provide(repository.NewArticleFilesRepository), + + // register service of ArticleFiles module + fx.Provide(service.NewArticleFilesService), + + // register controller of ArticleFiles module + fx.Provide(controller.NewController), + + // register router of ArticleFiles module + fx.Provide(NewArticleFilesRouter), +) + +// init ArticleFilesRouter +func NewArticleFilesRouter(fiber *fiber.App, controller *controller.Controller) *ArticleFilesRouter { + return &ArticleFilesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of ArticleFiles module +func (_i *ArticleFilesRouter) RegisterArticleFilesRoutes() { + // define controllers + articleFilesController := _i.Controller.ArticleFiles + + // define routes + _i.App.Route("/article-files", func(router fiber.Router) { + router.Get("/", articleFilesController.All) + router.Get("/:id", articleFilesController.Show) + router.Post("/", articleFilesController.Save) + router.Put("/:id", articleFilesController.Update) + router.Delete("/:id", articleFilesController.Delete) + router.Post("/uploader", articleFilesController.Uploader) + router.Get("/viewer/:id", articleFilesController.Viewer) + }) +} diff --git a/app/module/article_files/controller/article_files.controller.go b/app/module/article_files/controller/article_files.controller.go new file mode 100644 index 0000000..5670cd7 --- /dev/null +++ b/app/module/article_files/controller/article_files.controller.go @@ -0,0 +1,221 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_files/request" + "go-humas-be/app/module/article_files/service" + "go-humas-be/utils/paginator" + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" + "strconv" +) + +type articleFilesController struct { + articleFilesService service.ArticleFilesService +} + +type ArticleFilesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error + Uploader(c *fiber.Ctx) error + Viewer(c *fiber.Ctx) error +} + +func NewArticleFilesController(articleFilesService service.ArticleFilesService) ArticleFilesController { + return &articleFilesController{ + articleFilesService: articleFilesService, + } +} + +// All get all ArticleFiles +// @Summary Get all ArticleFiles +// @Description API for getting all ArticleFiles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files [get] +func (_i *articleFilesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.ArticleFilesQueryRequest + req.Pagination = paginate + + articleFilesData, paging, err := _i.articleFilesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles list successfully retrieved"}, + Data: articleFilesData, + Meta: paging, + }) +} + +// Show get one ArticleFiles +// @Summary Get one ArticleFiles +// @Description API for getting one ArticleFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files/{id} [get] +func (_i *articleFilesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + articleFilesData, err := _i.articleFilesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles successfully retrieved"}, + Data: articleFilesData, + }) +} + +// Save create ArticleFiles +// @Summary Create ArticleFiles +// @Description API for create ArticleFiles +// @Tags Task +// @Security Bearer +// @Body request.ArticleFilesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files [post] +func (_i *articleFilesController) Save(c *fiber.Ctx) error { + req := new(request.ArticleFilesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.articleFilesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles successfully created"}, + }) +} + +// Update update ArticleFiles +// @Summary update ArticleFiles +// @Description API for update ArticleFiles +// @Tags Task +// @Security Bearer +// @Body request.ArticleFilesUpdateRequest +// @Param id path int true "ArticleFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files/{id} [put] +func (_i *articleFilesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.ArticleFilesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.articleFilesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles successfully updated"}, + }) +} + +// Delete delete ArticleFiles +// @Summary delete ArticleFiles +// @Description API for delete ArticleFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "ArticleFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files/{id} [delete] +func (_i *articleFilesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.articleFilesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles successfully deleted"}, + }) +} + +// Upload create ArticleFiles +// @Summary Create ArticleFiles +// @Description API for create ArticleFiles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files [post] +func (_i *articleFilesController) Uploader(c *fiber.Ctx) error { + + err := _i.articleFilesService.Uploader(c, 1) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"ArticleFiles successfully upload"}, + }) +} + +// Viewer viewer ArticleFiles +// @Summary Create ArticleFiles +// @Description API for create ArticleFiles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /article-files/viewer [get] +func (_i *articleFilesController) Viewer(c *fiber.Ctx) error { + + return _i.articleFilesService.Viewer(c, c.Params("id")) +} diff --git a/app/module/article_files/controller/controller.go b/app/module/article_files/controller/controller.go new file mode 100644 index 0000000..e0a1200 --- /dev/null +++ b/app/module/article_files/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/article_files/service" + +type Controller struct { + ArticleFiles ArticleFilesController +} + +func NewController(ArticleFilesService service.ArticleFilesService) *Controller { + return &Controller{ + ArticleFiles: NewArticleFilesController(ArticleFilesService), + } +} \ No newline at end of file diff --git a/app/module/article_files/mapper/article_files.mapper.go b/app/module/article_files/mapper/article_files.mapper.go new file mode 100644 index 0000000..f1a079b --- /dev/null +++ b/app/module/article_files/mapper/article_files.mapper.go @@ -0,0 +1,32 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/article_files/response" +) + +func ArticleFilesResponseMapper(articleFilesReq *entity.ArticleFiles) (articleFilesRes *res.ArticleFilesResponse) { + if articleFilesReq != nil { + articleFilesRes = &res.ArticleFilesResponse{ + ID: articleFilesReq.ID, + ArticleId: articleFilesReq.ArticleId, + FilePath: articleFilesReq.FilePath, + FileUrl: articleFilesReq.FileUrl, + FileName: articleFilesReq.FileName, + FileThumbnail: articleFilesReq.FileThumbnail, + FileAlt: articleFilesReq.FileAlt, + WidthPixel: articleFilesReq.WidthPixel, + HeightPixel: articleFilesReq.HeightPixel, + Size: articleFilesReq.Size, + DownloadCount: articleFilesReq.DownloadCount, + CreatedById: articleFilesReq.CreatedById, + StatusId: articleFilesReq.StatusId, + IsPublish: articleFilesReq.IsPublish, + PublishedAt: articleFilesReq.PublishedAt, + IsActive: articleFilesReq.IsActive, + CreatedAt: articleFilesReq.CreatedAt, + UpdatedAt: articleFilesReq.UpdatedAt, + } + } + return articleFilesRes +} \ No newline at end of file diff --git a/app/module/article_files/repository/article_files.repository.go b/app/module/article_files/repository/article_files.repository.go new file mode 100644 index 0000000..91d03b0 --- /dev/null +++ b/app/module/article_files/repository/article_files.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/article_files/request" + "go-humas-be/utils/paginator" +) + +type articleFilesRepository struct { + DB *database.Database +} + +// ArticleFilesRepository define interface of IArticleFilesRepository +type ArticleFilesRepository interface { + GetAll(req request.ArticleFilesQueryRequest) (articleFiless []*entity.ArticleFiles, paging paginator.Pagination, err error) + FindOne(id uint) (articleFiles *entity.ArticleFiles, err error) + Create(articleFiles *entity.ArticleFiles) (err error) + Update(id uint, articleFiles *entity.ArticleFiles) (err error) + Delete(id uint) (err error) +} + +func NewArticleFilesRepository(db *database.Database) ArticleFilesRepository { + return &articleFilesRepository{ + DB: db, + } +} + +// implement interface of IArticleFilesRepository +func (_i *articleFilesRepository) GetAll(req request.ArticleFilesQueryRequest) (articleFiless []*entity.ArticleFiles, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.ArticleFiles{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&articleFiless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *articleFilesRepository) FindOne(id uint) (articleFiles *entity.ArticleFiles, err error) { + if err := _i.DB.DB.First(&articleFiles, id).Error; err != nil { + return nil, err + } + + return articleFiles, nil +} + +func (_i *articleFilesRepository) Create(articleFiles *entity.ArticleFiles) (err error) { + return _i.DB.DB.Create(articleFiles).Error +} + +func (_i *articleFilesRepository) Update(id uint, articleFiles *entity.ArticleFiles) (err error) { + return _i.DB.DB.Model(&entity.ArticleFiles{}). + Where(&entity.ArticleFiles{ID: id}). + Updates(articleFiles).Error +} + +func (_i *articleFilesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.ArticleFiles{}, id).Error +} \ No newline at end of file diff --git a/app/module/article_files/request/article_files.request.go b/app/module/article_files/request/article_files.request.go new file mode 100644 index 0000000..17faef3 --- /dev/null +++ b/app/module/article_files/request/article_files.request.go @@ -0,0 +1,112 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type ArticleFilesGeneric interface { + ToEntity() +} + +type ArticleFilesQueryRequest struct { + ArticleId int `json:"article_id" validate:"required"` + FilePath string `json:"file_path" validate:"required"` + FileUrl string `json:"file_url" validate:"required"` + FileName string `json:"file_name" validate:"required"` + FileThumbnail string `json:"file_thumbnail" validate:"required"` + FileAlt string `json:"file_alt" validate:"required"` + WidthPixel string `json:"width_pixel" validate:"required"` + HeightPixel string `json:"height_pixel" validate:"required"` + Size string `json:"size" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type ArticleFilesCreateRequest struct { + ArticleId int `json:"article_id" validate:"required"` + FilePath string `json:"file_path" validate:"required"` + FileUrl string `json:"file_url" validate:"required"` + FileName string `json:"file_name" validate:"required"` + FileThumbnail string `json:"file_thumbnail" validate:"required"` + FileAlt string `json:"file_alt" validate:"required"` + WidthPixel string `json:"width_pixel" validate:"required"` + HeightPixel string `json:"height_pixel" validate:"required"` + Size string `json:"size" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req ArticleFilesCreateRequest) ToEntity() *entity.ArticleFiles { + return &entity.ArticleFiles{ + ArticleId: req.ArticleId, + FilePath: req.FilePath, + FileUrl: req.FileUrl, + FileName: req.FileName, + FileThumbnail: req.FileThumbnail, + FileAlt: req.FileAlt, + WidthPixel: req.WidthPixel, + HeightPixel: req.HeightPixel, + Size: req.Size, + DownloadCount: req.DownloadCount, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type ArticleFilesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + ArticleId int `json:"article_id" validate:"required"` + FilePath string `json:"file_path" validate:"required"` + FileUrl string `json:"file_url" validate:"required"` + FileName string `json:"file_name" validate:"required"` + FileThumbnail string `json:"file_thumbnail" validate:"required"` + FileAlt string `json:"file_alt" validate:"required"` + WidthPixel string `json:"width_pixel" validate:"required"` + HeightPixel string `json:"height_pixel" validate:"required"` + Size string `json:"size" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req ArticleFilesUpdateRequest) ToEntity() *entity.ArticleFiles { + return &entity.ArticleFiles{ + ID: req.ID, + ArticleId: req.ArticleId, + FilePath: req.FilePath, + FileUrl: req.FileUrl, + FileName: req.FileName, + FileThumbnail: req.FileThumbnail, + FileAlt: req.FileAlt, + WidthPixel: req.WidthPixel, + HeightPixel: req.HeightPixel, + Size: req.Size, + DownloadCount: req.DownloadCount, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/article_files/response/article_files.response.go b/app/module/article_files/response/article_files.response.go new file mode 100644 index 0000000..986a2b8 --- /dev/null +++ b/app/module/article_files/response/article_files.response.go @@ -0,0 +1,24 @@ +package response + +import "time" + +type ArticleFilesResponse struct { + ID uint `json:"id"` + ArticleId int `json:"article_id"` + FilePath string `json:"file_path"` + FileUrl string `json:"file_url"` + FileName string `json:"file_name"` + FileThumbnail string `json:"file_thumbnail"` + FileAlt string `json:"file_alt"` + WidthPixel string `json:"width_pixel"` + HeightPixel string `json:"height_pixel"` + Size string `json:"size"` + DownloadCount int `json:"download_count"` + CreatedById int `json:"created_by_id"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/article_files/service/article_files.service.go b/app/module/article_files/service/article_files.service.go new file mode 100644 index 0000000..04d75f0 --- /dev/null +++ b/app/module/article_files/service/article_files.service.go @@ -0,0 +1,182 @@ +package service + +import ( + "context" + "github.com/gofiber/fiber/v2" + "github.com/minio/minio-go/v7" + "github.com/rs/zerolog" + "go-humas-be/app/module/article_files/mapper" + "go-humas-be/app/module/article_files/repository" + "go-humas-be/app/module/article_files/request" + "go-humas-be/app/module/article_files/response" + minioUpload "go-humas-be/utils/minio" + "go-humas-be/utils/paginator" + "io" + "log" + "mime" + "strings" + "time" +) + +// ArticleFilesService +type articleFilesService struct { + Repo repository.ArticleFilesRepository + Log zerolog.Logger +} + +// ArticleFilesService define interface of IArticleFilesService +type ArticleFilesService interface { + All(req request.ArticleFilesQueryRequest) (articleFiles []*response.ArticleFilesResponse, paging paginator.Pagination, err error) + Show(id uint) (articleFiles *response.ArticleFilesResponse, err error) + Save(req request.ArticleFilesCreateRequest) (err error) + Update(id uint, req request.ArticleFilesUpdateRequest) (err error) + Delete(id uint) error + Uploader(c *fiber.Ctx, id uint) error + Viewer(c *fiber.Ctx, id string) error +} + +// NewArticleFilesService init ArticleFilesService +func NewArticleFilesService(repo repository.ArticleFilesRepository, log zerolog.Logger) ArticleFilesService { + + return &articleFilesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of ArticleFilesService +func (_i *articleFilesService) All(req request.ArticleFilesQueryRequest) (articleFiless []*response.ArticleFilesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + articleFiless = append(articleFiless, mapper.ArticleFilesResponseMapper(result)) + } + + return +} + +func (_i *articleFilesService) Show(id uint) (articleFiles *response.ArticleFilesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.ArticleFilesResponseMapper(result), nil +} + +func (_i *articleFilesService) Save(req request.ArticleFilesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *articleFilesService) Update(id uint, req request.ArticleFilesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *articleFilesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} + +func (_i *articleFilesService) Uploader(c *fiber.Ctx, id uint) (err error) { + bucketName := "humas" + + form, err := c.MultipartForm() + if err != nil { + return err + } + files := form.File["files"] + + // Create minio connection. + minioClient, err := minioUpload.MinioConnection() + if err != nil { + // Return status 500 and minio connection error. + return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ + "error": true, + "msg": err.Error(), + }) + } + + // Iterasi semua file yang diunggah + for _, file := range files { + + _i.Log.Info().Str("timestamp", time.Now(). + Format(time.RFC3339)).Str("Service:Resource", "Uploader:: loop1"). + Interface("data", file).Msg("") + + src, err := file.Open() + if err != nil { + return err + } + defer src.Close() + + // Upload file ke MinIO + _, err = minioClient.PutObject(context.Background(), bucketName, file.Filename, src, file.Size, minio.PutObjectOptions{}) + if err != nil { + return err + } + } + + _i.Log.Info().Str("timestamp", time.Now(). + Format(time.RFC3339)).Str("Service:Resource", "User:All"). + Interface("data", "Successfully uploaded").Msg("") + + return +} + +func (_i *articleFilesService) Viewer(c *fiber.Ctx, id string) (err error) { + ctx := context.Background() + objectName := id + bucketName := "humas" + + _i.Log.Info().Str("timestamp", time.Now(). + Format(time.RFC3339)).Str("Service:Resource", "Article:Uploads"). + Interface("data", objectName).Msg("") + + // Create minio connection. + minioClient, err := minioUpload.MinioConnection() + if err != nil { + // Return status 500 and minio connection error. + return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ + "error": true, + "msg": err.Error(), + }) + } + + fileContent, err := minioClient.GetObject(ctx, bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + log.Fatalln(err) + } + defer fileContent.Close() + + // Tentukan Content-Type berdasarkan ekstensi file + contentType := mime.TypeByExtension("." + getFileExtension(objectName)) + if contentType == "" { + contentType = "application/octet-stream" // fallback jika tidak ada tipe MIME yang cocok + } + + c.Set("Content-Type", contentType) + + if _, err := io.Copy(c.Response().BodyWriter(), fileContent); err != nil { + return err + } + + return +} + +func getFileExtension(filename string) string { + // split file name + parts := strings.Split(filename, ".") + + // jika tidak ada ekstensi, kembalikan string kosong + if len(parts) == 1 || (len(parts) == 2 && parts[0] == "") { + return "" + } + + // ambil ekstensi terakhir + return parts[len(parts)-1] +} diff --git a/app/module/articles/articles.module.go b/app/module/articles/articles.module.go new file mode 100644 index 0000000..a8af82d --- /dev/null +++ b/app/module/articles/articles.module.go @@ -0,0 +1,53 @@ +package articles + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/articles/controller" + "go-humas-be/app/module/articles/repository" + "go-humas-be/app/module/articles/service" + "go.uber.org/fx" +) + +// ArticlesRouter struct of ArticlesRouter +type ArticlesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// NewArticlesModule register bulky of Articles module +var NewArticlesModule = fx.Options( + // register repository of Articles module + fx.Provide(repository.NewArticlesRepository), + + // register service of Articles module + fx.Provide(service.NewArticlesService), + + // register controller of Articles module + fx.Provide(controller.NewController), + + // register router of Articles module + fx.Provide(NewArticlesRouter), +) + +// NewArticlesRouter init ArticlesRouter +func NewArticlesRouter(fiber *fiber.App, controller *controller.Controller) *ArticlesRouter { + return &ArticlesRouter{ + App: fiber, + Controller: controller, + } +} + +// RegisterArticlesRoutes register routes of Articles module +func (_i *ArticlesRouter) RegisterArticlesRoutes() { + // define controllers + articlesController := _i.Controller.Articles + + // define routes + _i.App.Route("/articles", func(router fiber.Router) { + router.Get("/", articlesController.All) + router.Get("/:id", articlesController.Show) + router.Post("/", articlesController.Save) + router.Put("/:id", articlesController.Update) + router.Delete("/:id", articlesController.Delete) + }) +} diff --git a/app/module/articles/controller/articles.controller.go b/app/module/articles/controller/articles.controller.go new file mode 100644 index 0000000..ea0d36c --- /dev/null +++ b/app/module/articles/controller/articles.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/articles/request" + "go-humas-be/app/module/articles/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type articlesController struct { + articlesService service.ArticlesService +} + +type ArticlesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewArticlesController(articlesService service.ArticlesService) ArticlesController { + return &articlesController{ + articlesService: articlesService, + } +} + +// All get all Articles +// @Summary Get all Articles +// @Description API for getting all Articles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /articles [get] +func (_i *articlesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.ArticlesQueryRequest + req.Pagination = paginate + + articlesData, paging, err := _i.articlesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Articles list successfully retrieved"}, + Data: articlesData, + Meta: paging, + }) +} + +// Show get one Articles +// @Summary Get one Articles +// @Description API for getting one Articles +// @Tags Task +// @Security Bearer +// @Param id path int true "Articles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /articles/{id} [get] +func (_i *articlesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + articlesData, err := _i.articlesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Articles successfully retrieved"}, + Data: articlesData, + }) +} + +// Save create Articles +// @Summary Create Articles +// @Description API for create Articles +// @Tags Task +// @Security Bearer +// @Body request.ArticlesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /articles [post] +func (_i *articlesController) Save(c *fiber.Ctx) error { + req := new(request.ArticlesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.articlesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Articles successfully created"}, + }) +} + +// Update update Articles +// @Summary update Articles +// @Description API for update Articles +// @Tags Task +// @Security Bearer +// @Body request.ArticlesUpdateRequest +// @Param id path int true "Articles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /articles/{id} [put] +func (_i *articlesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.ArticlesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.articlesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Articles successfully updated"}, + }) +} + +// Delete delete Articles +// @Summary delete Articles +// @Description API for delete Articles +// @Tags Task +// @Security Bearer +// @Param id path int true "Articles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /articles/{id} [delete] +func (_i *articlesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.articlesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Articles successfully deleted"}, + }) +} diff --git a/app/module/articles/controller/controller.go b/app/module/articles/controller/controller.go new file mode 100644 index 0000000..129662b --- /dev/null +++ b/app/module/articles/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/articles/service" + +type Controller struct { + Articles ArticlesController +} + +func NewController(ArticlesService service.ArticlesService) *Controller { + return &Controller{ + Articles: NewArticlesController(ArticlesService), + } +} \ No newline at end of file diff --git a/app/module/articles/mapper/articles.mapper.go b/app/module/articles/mapper/articles.mapper.go new file mode 100644 index 0000000..59bbb61 --- /dev/null +++ b/app/module/articles/mapper/articles.mapper.go @@ -0,0 +1,34 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/articles/response" +) + +func ArticlesResponseMapper(articlesReq *entity.Articles) (articlesRes *res.ArticlesResponse) { + if articlesReq != nil { + articlesRes = &res.ArticlesResponse{ + ID: articlesReq.ID, + Title: articlesReq.Title, + Slug: articlesReq.Slug, + Description: articlesReq.Description, + HtmlDescription: articlesReq.HtmlDescription, + TypeId: articlesReq.TypeId, + Tags: articlesReq.Tags, + ThumbnailPath: articlesReq.ThumbnailPath, + ThumbnailUrl: articlesReq.ThumbnailUrl, + PageUrl: articlesReq.PageUrl, + CreatedById: articlesReq.CreatedById, + ShareCount: articlesReq.ShareCount, + ViewCount: articlesReq.ViewCount, + DownloadCount: articlesReq.DownloadCount, + StatusId: articlesReq.StatusId, + IsPublish: articlesReq.IsPublish, + PublishedAt: articlesReq.PublishedAt, + IsActive: articlesReq.IsActive, + CreatedAt: articlesReq.CreatedAt, + UpdatedAt: articlesReq.UpdatedAt, + } + } + return articlesRes +} \ No newline at end of file diff --git a/app/module/articles/repository/articles.repository.go b/app/module/articles/repository/articles.repository.go new file mode 100644 index 0000000..c3ec31a --- /dev/null +++ b/app/module/articles/repository/articles.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/articles/request" + "go-humas-be/utils/paginator" +) + +type articlesRepository struct { + DB *database.Database +} + +// ArticlesRepository define interface of IArticlesRepository +type ArticlesRepository interface { + GetAll(req request.ArticlesQueryRequest) (articless []*entity.Articles, paging paginator.Pagination, err error) + FindOne(id uint) (articles *entity.Articles, err error) + Create(articles *entity.Articles) (err error) + Update(id uint, articles *entity.Articles) (err error) + Delete(id uint) (err error) +} + +func NewArticlesRepository(db *database.Database) ArticlesRepository { + return &articlesRepository{ + DB: db, + } +} + +// implement interface of IArticlesRepository +func (_i *articlesRepository) GetAll(req request.ArticlesQueryRequest) (articless []*entity.Articles, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Articles{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&articless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *articlesRepository) FindOne(id uint) (articles *entity.Articles, err error) { + if err := _i.DB.DB.First(&articles, id).Error; err != nil { + return nil, err + } + + return articles, nil +} + +func (_i *articlesRepository) Create(articles *entity.Articles) (err error) { + return _i.DB.DB.Create(articles).Error +} + +func (_i *articlesRepository) Update(id uint, articles *entity.Articles) (err error) { + return _i.DB.DB.Model(&entity.Articles{}). + Where(&entity.Articles{ID: id}). + Updates(articles).Error +} + +func (_i *articlesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Articles{}, id).Error +} \ No newline at end of file diff --git a/app/module/articles/request/articles.request.go b/app/module/articles/request/articles.request.go new file mode 100644 index 0000000..50a671a --- /dev/null +++ b/app/module/articles/request/articles.request.go @@ -0,0 +1,122 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type ArticlesGeneric interface { + ToEntity() +} + +type ArticlesQueryRequest struct { + Title string `json:"title" validate:"required"` + Slug string `json:"slug" validate:"required"` + Description string `json:"description" validate:"required"` + HtmlDescription string `json:"html_description" validate:"required"` + TypeId int `json:"type_id" validate:"required"` + Tags string `json:"tags" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ShareCount int `json:"share_count" validate:"required"` + ViewCount int `json:"view_count" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type ArticlesCreateRequest struct { + Title string `json:"title" validate:"required"` + Slug string `json:"slug" validate:"required"` + Description string `json:"description" validate:"required"` + HtmlDescription string `json:"html_description" validate:"required"` + TypeId int `json:"type_id" validate:"required"` + Tags string `json:"tags" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ShareCount int `json:"share_count" validate:"required"` + ViewCount int `json:"view_count" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req ArticlesCreateRequest) ToEntity() *entity.Articles { + return &entity.Articles{ + Title: req.Title, + Slug: req.Slug, + Description: req.Description, + HtmlDescription: req.HtmlDescription, + TypeId: req.TypeId, + Tags: req.Tags, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + PageUrl: req.PageUrl, + CreatedById: req.CreatedById, + ShareCount: req.ShareCount, + ViewCount: req.ViewCount, + DownloadCount: req.DownloadCount, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type ArticlesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Slug string `json:"slug" validate:"required"` + Description string `json:"description" validate:"required"` + HtmlDescription string `json:"html_description" validate:"required"` + TypeId int `json:"type_id" validate:"required"` + Tags string `json:"tags" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ShareCount int `json:"share_count" validate:"required"` + ViewCount int `json:"view_count" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req ArticlesUpdateRequest) ToEntity() *entity.Articles { + return &entity.Articles{ + ID: req.ID, + Title: req.Title, + Slug: req.Slug, + Description: req.Description, + HtmlDescription: req.HtmlDescription, + TypeId: req.TypeId, + Tags: req.Tags, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + PageUrl: req.PageUrl, + CreatedById: req.CreatedById, + ShareCount: req.ShareCount, + ViewCount: req.ViewCount, + DownloadCount: req.DownloadCount, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/articles/response/articles.response.go b/app/module/articles/response/articles.response.go new file mode 100644 index 0000000..1bf09bb --- /dev/null +++ b/app/module/articles/response/articles.response.go @@ -0,0 +1,26 @@ +package response + +import "time" + +type ArticlesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Slug string `json:"slug"` + Description string `json:"description"` + HtmlDescription string `json:"html_description"` + TypeId int `json:"type_id"` + Tags string `json:"tags"` + ThumbnailPath string `json:"thumbnail_path"` + ThumbnailUrl string `json:"thumbnail_url"` + PageUrl string `json:"page_url"` + CreatedById int `json:"created_by_id"` + ShareCount int `json:"share_count"` + ViewCount int `json:"view_count"` + DownloadCount int `json:"download_count"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/articles/service/articles.service.go b/app/module/articles/service/articles.service.go new file mode 100644 index 0000000..5010fc7 --- /dev/null +++ b/app/module/articles/service/articles.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/articles/mapper" + "go-humas-be/app/module/articles/repository" + "go-humas-be/app/module/articles/request" + "go-humas-be/app/module/articles/response" + "go-humas-be/utils/paginator" +) + +// ArticlesService +type articlesService struct { + Repo repository.ArticlesRepository + Log zerolog.Logger +} + +// ArticlesService define interface of IArticlesService +type ArticlesService interface { + All(req request.ArticlesQueryRequest) (articles []*response.ArticlesResponse, paging paginator.Pagination, err error) + Show(id uint) (articles *response.ArticlesResponse, err error) + Save(req request.ArticlesCreateRequest) (err error) + Update(id uint, req request.ArticlesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewArticlesService init ArticlesService +func NewArticlesService(repo repository.ArticlesRepository, log zerolog.Logger) ArticlesService { + + return &articlesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of ArticlesService +func (_i *articlesService) All(req request.ArticlesQueryRequest) (articless []*response.ArticlesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + articless = append(articless, mapper.ArticlesResponseMapper(result)) + } + + return +} + +func (_i *articlesService) Show(id uint) (articles *response.ArticlesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.ArticlesResponseMapper(result), nil +} + +func (_i *articlesService) Save(req request.ArticlesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *articlesService) Update(id uint, req request.ArticlesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *articlesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/cities/cities.module.go b/app/module/cities/cities.module.go new file mode 100644 index 0000000..08960e4 --- /dev/null +++ b/app/module/cities/cities.module.go @@ -0,0 +1,53 @@ +package cities + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/cities/controller" + "go-humas-be/app/module/cities/repository" + "go-humas-be/app/module/cities/service" + "go.uber.org/fx" +) + +// struct of CitiesRouter +type CitiesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of Cities module +var NewCitiesModule = fx.Options( + // register repository of Cities module + fx.Provide(repository.NewCitiesRepository), + + // register service of Cities module + fx.Provide(service.NewCitiesService), + + // register controller of Cities module + fx.Provide(controller.NewController), + + // register router of Cities module + fx.Provide(NewCitiesRouter), +) + +// init CitiesRouter +func NewCitiesRouter(fiber *fiber.App, controller *controller.Controller) *CitiesRouter { + return &CitiesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of Cities module +func (_i *CitiesRouter) RegisterCitiesRoutes() { + // define controllers + citiesController := _i.Controller.Cities + + // define routes + _i.App.Route("/cities", func(router fiber.Router) { + router.Get("/", citiesController.All) + router.Get("/:id", citiesController.Show) + router.Post("/", citiesController.Save) + router.Put("/:id", citiesController.Update) + router.Delete("/:id", citiesController.Delete) + }) +} diff --git a/app/module/cities/controller/cities.controller.go b/app/module/cities/controller/cities.controller.go new file mode 100644 index 0000000..b85fd00 --- /dev/null +++ b/app/module/cities/controller/cities.controller.go @@ -0,0 +1,184 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/cities/request" + "go-humas-be/app/module/cities/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type citiesController struct { + citiesService service.CitiesService +} + +type CitiesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewCitiesController(citiesService service.CitiesService) CitiesController { + return &citiesController{ + citiesService: citiesService, + } +} + +// All get all Cities +// @Summary Get all Cities +// @Description API for getting all Cities +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /cities [get] +func (_i *citiesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.CitiesQueryRequest + req.Pagination = paginate + + citiesData, paging, err := _i.citiesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Cities list successfully retrieved"}, + Data: citiesData, + Meta: paging, + }) +} + +// Show get one Cities +// @Summary Get one Cities +// @Description API for getting one Cities +// @Tags Task +// @Security Bearer +// @Param id path int true "Cities ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /cities/{id} [get] +func (_i *citiesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + citiesData, err := _i.citiesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Cities successfully retrieved"}, + Data: citiesData, + }) +} + +// Save create Cities +// @Summary Create Cities +// @Description API for create Cities +// @Tags Task +// @Security Bearer +// @Param payload body request.CitiesCreateRequest true "Required payload" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /cities [post] +func (_i *citiesController) Save(c *fiber.Ctx) error { + req := new(request.CitiesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.citiesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Cities successfully created"}, + }) +} + +// Update Cities +// @Summary update Cities +// @Description API for update Cities +// @Tags Task +// @Security Bearer +// @Body request.CitiesUpdateRequest +// @Param id path int true "Cities ID" +// @Param payload body request.CitiesUpdateRequest true "Required payload" +// @Accept json +// @Produce json +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /cities/{id} [put] +func (_i *citiesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.CitiesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.citiesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Cities successfully updated"}, + }) +} + +// Delete delete Cities +// @Summary delete Cities +// @Description API for delete Cities +// @Tags Task +// @Security Bearer +// @Param id path int true "Cities ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /cities/{id} [delete] +func (_i *citiesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.citiesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Cities successfully deleted"}, + }) +} diff --git a/app/module/cities/controller/controller.go b/app/module/cities/controller/controller.go new file mode 100644 index 0000000..1ffd5a3 --- /dev/null +++ b/app/module/cities/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/cities/service" + +type Controller struct { + Cities CitiesController +} + +func NewController(CitiesService service.CitiesService) *Controller { + return &Controller{ + Cities: NewCitiesController(CitiesService), + } +} \ No newline at end of file diff --git a/app/module/cities/mapper/cities.mapper.go b/app/module/cities/mapper/cities.mapper.go new file mode 100644 index 0000000..bccd3e4 --- /dev/null +++ b/app/module/cities/mapper/cities.mapper.go @@ -0,0 +1,17 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/cities/response" +) + +func CitiesResponseMapper(citiesReq *entity.Cities) (citiesRes *res.CitiesResponse) { + if citiesReq != nil { + citiesRes = &res.CitiesResponse{ + ID: citiesReq.ID, + CityName: citiesReq.CityName, + ProvId: citiesReq.ProvId, + } + } + return citiesRes +} \ No newline at end of file diff --git a/app/module/cities/repository/cities.repository.go b/app/module/cities/repository/cities.repository.go new file mode 100644 index 0000000..529783d --- /dev/null +++ b/app/module/cities/repository/cities.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/cities/request" + "go-humas-be/utils/paginator" +) + +type citiesRepository struct { + DB *database.Database +} + +// CitiesRepository define interface of ICitiesRepository +type CitiesRepository interface { + GetAll(req request.CitiesQueryRequest) (citiess []*entity.Cities, paging paginator.Pagination, err error) + FindOne(id uint) (cities *entity.Cities, err error) + Create(cities *entity.Cities) (err error) + Update(id uint, cities *entity.Cities) (err error) + Delete(id uint) (err error) +} + +func NewCitiesRepository(db *database.Database) CitiesRepository { + return &citiesRepository{ + DB: db, + } +} + +// implement interface of ICitiesRepository +func (_i *citiesRepository) GetAll(req request.CitiesQueryRequest) (citiess []*entity.Cities, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Cities{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&citiess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *citiesRepository) FindOne(id uint) (cities *entity.Cities, err error) { + if err := _i.DB.DB.First(&cities, id).Error; err != nil { + return nil, err + } + + return cities, nil +} + +func (_i *citiesRepository) Create(cities *entity.Cities) (err error) { + return _i.DB.DB.Create(cities).Error +} + +func (_i *citiesRepository) Update(id uint, cities *entity.Cities) (err error) { + return _i.DB.DB.Model(&entity.Cities{}). + Where(&entity.Cities{ID: id}). + Updates(cities).Error +} + +func (_i *citiesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Cities{}, id).Error +} \ No newline at end of file diff --git a/app/module/cities/request/cities.request.go b/app/module/cities/request/cities.request.go new file mode 100644 index 0000000..48149ab --- /dev/null +++ b/app/module/cities/request/cities.request.go @@ -0,0 +1,43 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" +) + +type CitiesGeneric interface { + ToEntity() +} + +type CitiesQueryRequest struct { + CityName string `json:"city_name" validate:"required"` + ProvId int `json:"prov_id" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type CitiesCreateRequest struct { + CityName string `json:"city_name" validate:"required"` + ProvId int `json:"prov_id" validate:"required"` +} + +func (req CitiesCreateRequest) ToEntity() *entity.Cities { + return &entity.Cities{ + CityName: req.CityName, + ProvId: req.ProvId, + } +} + +type CitiesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + CityName string `json:"city_name" validate:"required"` + ProvId int `json:"prov_id" validate:"required"` +} + +func (req CitiesUpdateRequest) ToEntity() *entity.Cities { + return &entity.Cities{ + ID: req.ID, + CityName: req.CityName, + ProvId: req.ProvId, + } +} \ No newline at end of file diff --git a/app/module/cities/response/cities.response.go b/app/module/cities/response/cities.response.go new file mode 100644 index 0000000..8941551 --- /dev/null +++ b/app/module/cities/response/cities.response.go @@ -0,0 +1,7 @@ +package response + +type CitiesResponse struct { + ID uint `json:"id"` + CityName string `json:"city_name"` + ProvId int `json:"prov_id"` +} diff --git a/app/module/cities/service/cities.service.go b/app/module/cities/service/cities.service.go new file mode 100644 index 0000000..46b363f --- /dev/null +++ b/app/module/cities/service/cities.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/cities/mapper" + "go-humas-be/app/module/cities/repository" + "go-humas-be/app/module/cities/request" + "go-humas-be/app/module/cities/response" + "go-humas-be/utils/paginator" +) + +// CitiesService +type citiesService struct { + Repo repository.CitiesRepository + Log zerolog.Logger +} + +// CitiesService define interface of ICitiesService +type CitiesService interface { + All(req request.CitiesQueryRequest) (cities []*response.CitiesResponse, paging paginator.Pagination, err error) + Show(id uint) (cities *response.CitiesResponse, err error) + Save(req request.CitiesCreateRequest) (err error) + Update(id uint, req request.CitiesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewCitiesService init CitiesService +func NewCitiesService(repo repository.CitiesRepository, log zerolog.Logger) CitiesService { + + return &citiesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of CitiesService +func (_i *citiesService) All(req request.CitiesQueryRequest) (citiess []*response.CitiesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + citiess = append(citiess, mapper.CitiesResponseMapper(result)) + } + + return +} + +func (_i *citiesService) Show(id uint) (cities *response.CitiesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.CitiesResponseMapper(result), nil +} + +func (_i *citiesService) Save(req request.CitiesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *citiesService) Update(id uint, req request.CitiesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *citiesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/districts/controller/controller.go b/app/module/districts/controller/controller.go new file mode 100644 index 0000000..96be5df --- /dev/null +++ b/app/module/districts/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/districts/service" + +type Controller struct { + Districts DistrictsController +} + +func NewController(DistrictsService service.DistrictsService) *Controller { + return &Controller{ + Districts: NewDistrictsController(DistrictsService), + } +} \ No newline at end of file diff --git a/app/module/districts/controller/districts.controller.go b/app/module/districts/controller/districts.controller.go new file mode 100644 index 0000000..ad28663 --- /dev/null +++ b/app/module/districts/controller/districts.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/districts/request" + "go-humas-be/app/module/districts/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type districtsController struct { + districtsService service.DistrictsService +} + +type DistrictsController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewDistrictsController(districtsService service.DistrictsService) DistrictsController { + return &districtsController{ + districtsService: districtsService, + } +} + +// All get all Districts +// @Summary Get all Districts +// @Description API for getting all Districts +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /districts [get] +func (_i *districtsController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.DistrictsQueryRequest + req.Pagination = paginate + + districtsData, paging, err := _i.districtsService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Districts list successfully retrieved"}, + Data: districtsData, + Meta: paging, + }) +} + +// Show get one Districts +// @Summary Get one Districts +// @Description API for getting one Districts +// @Tags Task +// @Security Bearer +// @Param id path int true "Districts ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /districts/{id} [get] +func (_i *districtsController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + districtsData, err := _i.districtsService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Districts successfully retrieved"}, + Data: districtsData, + }) +} + +// Save create Districts +// @Summary Create Districts +// @Description API for create Districts +// @Tags Task +// @Security Bearer +// @Body request.DistrictsCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /districts [post] +func (_i *districtsController) Save(c *fiber.Ctx) error { + req := new(request.DistrictsCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.districtsService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Districts successfully created"}, + }) +} + +// Update update Districts +// @Summary update Districts +// @Description API for update Districts +// @Tags Task +// @Security Bearer +// @Body request.DistrictsUpdateRequest +// @Param id path int true "Districts ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /districts/{id} [put] +func (_i *districtsController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.DistrictsUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.districtsService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Districts successfully updated"}, + }) +} + +// Delete delete Districts +// @Summary delete Districts +// @Description API for delete Districts +// @Tags Task +// @Security Bearer +// @Param id path int true "Districts ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /districts/{id} [delete] +func (_i *districtsController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.districtsService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Districts successfully deleted"}, + }) +} diff --git a/app/module/districts/districts.module.go b/app/module/districts/districts.module.go new file mode 100644 index 0000000..775162e --- /dev/null +++ b/app/module/districts/districts.module.go @@ -0,0 +1,53 @@ +package districts + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/districts/controller" + "go-humas-be/app/module/districts/repository" + "go-humas-be/app/module/districts/service" + "go.uber.org/fx" +) + +// DistrictsRouter struct of DistrictsRouter +type DistrictsRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// NewDistrictsModule register bulky of Districts module +var NewDistrictsModule = fx.Options( + // register repository of Districts module + fx.Provide(repository.NewDistrictsRepository), + + // register service of Districts module + fx.Provide(service.NewDistrictsService), + + // register controller of Districts module + fx.Provide(controller.NewController), + + // register router of Districts module + fx.Provide(NewDistrictsRouter), +) + +// NewDistrictsRouter init DistrictsRouter +func NewDistrictsRouter(fiber *fiber.App, controller *controller.Controller) *DistrictsRouter { + return &DistrictsRouter{ + App: fiber, + Controller: controller, + } +} + +// RegisterDistrictsRoutes register routes of Districts module +func (_i *DistrictsRouter) RegisterDistrictsRoutes() { + // define controllers + districtsController := _i.Controller.Districts + + // define routes + _i.App.Route("/districts", func(router fiber.Router) { + router.Get("/", districtsController.All) + router.Get("/:id", districtsController.Show) + router.Post("/", districtsController.Save) + router.Put("/:id", districtsController.Update) + router.Delete("/:id", districtsController.Delete) + }) +} diff --git a/app/module/districts/mapper/districts.mapper.go b/app/module/districts/mapper/districts.mapper.go new file mode 100644 index 0000000..baa21b8 --- /dev/null +++ b/app/module/districts/mapper/districts.mapper.go @@ -0,0 +1,17 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/districts/response" +) + +func DistrictsResponseMapper(districtsReq *entity.Districts) (districtsRes *res.DistrictsResponse) { + if districtsReq != nil { + districtsRes = &res.DistrictsResponse{ + ID: districtsReq.ID, + DisNam: districtsReq.DisNam, + CityId: districtsReq.CityId, + } + } + return districtsRes +} \ No newline at end of file diff --git a/app/module/districts/repository/districts.repository.go b/app/module/districts/repository/districts.repository.go new file mode 100644 index 0000000..259eff7 --- /dev/null +++ b/app/module/districts/repository/districts.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/districts/request" + "go-humas-be/utils/paginator" +) + +type districtsRepository struct { + DB *database.Database +} + +// DistrictsRepository define interface of IDistrictsRepository +type DistrictsRepository interface { + GetAll(req request.DistrictsQueryRequest) (districtss []*entity.Districts, paging paginator.Pagination, err error) + FindOne(id uint) (districts *entity.Districts, err error) + Create(districts *entity.Districts) (err error) + Update(id uint, districts *entity.Districts) (err error) + Delete(id uint) (err error) +} + +func NewDistrictsRepository(db *database.Database) DistrictsRepository { + return &districtsRepository{ + DB: db, + } +} + +// implement interface of IDistrictsRepository +func (_i *districtsRepository) GetAll(req request.DistrictsQueryRequest) (districtss []*entity.Districts, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Districts{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&districtss).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *districtsRepository) FindOne(id uint) (districts *entity.Districts, err error) { + if err := _i.DB.DB.First(&districts, id).Error; err != nil { + return nil, err + } + + return districts, nil +} + +func (_i *districtsRepository) Create(districts *entity.Districts) (err error) { + return _i.DB.DB.Create(districts).Error +} + +func (_i *districtsRepository) Update(id uint, districts *entity.Districts) (err error) { + return _i.DB.DB.Model(&entity.Districts{}). + Where(&entity.Districts{ID: id}). + Updates(districts).Error +} + +func (_i *districtsRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Districts{}, id).Error +} \ No newline at end of file diff --git a/app/module/districts/request/districts.request.go b/app/module/districts/request/districts.request.go new file mode 100644 index 0000000..d9652f3 --- /dev/null +++ b/app/module/districts/request/districts.request.go @@ -0,0 +1,43 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" +) + +type DistrictsGeneric interface { + ToEntity() +} + +type DistrictsQueryRequest struct { + DisNam string `json:"dis_nam" validate:"required"` + CityId int `json:"city_id" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type DistrictsCreateRequest struct { + DisNam string `json:"dis_nam" validate:"required"` + CityId int `json:"city_id" validate:"required"` +} + +func (req DistrictsCreateRequest) ToEntity() *entity.Districts { + return &entity.Districts{ + DisNam: req.DisNam, + CityId: req.CityId, + } +} + +type DistrictsUpdateRequest struct { + ID uint `json:"id" validate:"required"` + DisNam string `json:"dis_nam" validate:"required"` + CityId int `json:"city_id" validate:"required"` +} + +func (req DistrictsUpdateRequest) ToEntity() *entity.Districts { + return &entity.Districts{ + ID: req.ID, + DisNam: req.DisNam, + CityId: req.CityId, + } +} \ No newline at end of file diff --git a/app/module/districts/response/districts.response.go b/app/module/districts/response/districts.response.go new file mode 100644 index 0000000..1efe096 --- /dev/null +++ b/app/module/districts/response/districts.response.go @@ -0,0 +1,7 @@ +package response + +type DistrictsResponse struct { + ID uint `json:"id"` + DisNam string `json:"dis_nam"` + CityId int `json:"city_id"` +} diff --git a/app/module/districts/service/districts.service.go b/app/module/districts/service/districts.service.go new file mode 100644 index 0000000..7c50ab3 --- /dev/null +++ b/app/module/districts/service/districts.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/districts/mapper" + "go-humas-be/app/module/districts/repository" + "go-humas-be/app/module/districts/request" + "go-humas-be/app/module/districts/response" + "go-humas-be/utils/paginator" +) + +// DistrictsService +type districtsService struct { + Repo repository.DistrictsRepository + Log zerolog.Logger +} + +// DistrictsService define interface of IDistrictsService +type DistrictsService interface { + All(req request.DistrictsQueryRequest) (districts []*response.DistrictsResponse, paging paginator.Pagination, err error) + Show(id uint) (districts *response.DistrictsResponse, err error) + Save(req request.DistrictsCreateRequest) (err error) + Update(id uint, req request.DistrictsUpdateRequest) (err error) + Delete(id uint) error +} + +// NewDistrictsService init DistrictsService +func NewDistrictsService(repo repository.DistrictsRepository, log zerolog.Logger) DistrictsService { + + return &districtsService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of DistrictsService +func (_i *districtsService) All(req request.DistrictsQueryRequest) (districtss []*response.DistrictsResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + districtss = append(districtss, mapper.DistrictsResponseMapper(result)) + } + + return +} + +func (_i *districtsService) Show(id uint) (districts *response.DistrictsResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.DistrictsResponseMapper(result), nil +} + +func (_i *districtsService) Save(req request.DistrictsCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *districtsService) Update(id uint, req request.DistrictsUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *districtsService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/magazine_files/controller/controller.go b/app/module/magazine_files/controller/controller.go new file mode 100644 index 0000000..592d393 --- /dev/null +++ b/app/module/magazine_files/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/magazine_files/service" + +type Controller struct { + MagazineFiles MagazineFilesController +} + +func NewController(MagazineFilesService service.MagazineFilesService) *Controller { + return &Controller{ + MagazineFiles: NewMagazineFilesController(MagazineFilesService), + } +} \ No newline at end of file diff --git a/app/module/magazine_files/controller/magazine_files.controller.go b/app/module/magazine_files/controller/magazine_files.controller.go new file mode 100644 index 0000000..d7cb12e --- /dev/null +++ b/app/module/magazine_files/controller/magazine_files.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/magazine_files/request" + "go-humas-be/app/module/magazine_files/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type magazineFilesController struct { + magazineFilesService service.MagazineFilesService +} + +type MagazineFilesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewMagazineFilesController(magazineFilesService service.MagazineFilesService) MagazineFilesController { + return &magazineFilesController{ + magazineFilesService: magazineFilesService, + } +} + +// All get all MagazineFiles +// @Summary Get all MagazineFiles +// @Description API for getting all MagazineFiles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazine-files [get] +func (_i *magazineFilesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.MagazineFilesQueryRequest + req.Pagination = paginate + + magazineFilesData, paging, err := _i.magazineFilesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MagazineFiles list successfully retrieved"}, + Data: magazineFilesData, + Meta: paging, + }) +} + +// Show get one MagazineFiles +// @Summary Get one MagazineFiles +// @Description API for getting one MagazineFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "MagazineFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazine-files/{id} [get] +func (_i *magazineFilesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + magazineFilesData, err := _i.magazineFilesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MagazineFiles successfully retrieved"}, + Data: magazineFilesData, + }) +} + +// Save create MagazineFiles +// @Summary Create MagazineFiles +// @Description API for create MagazineFiles +// @Tags Task +// @Security Bearer +// @Body request.MagazineFilesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazine-files [post] +func (_i *magazineFilesController) Save(c *fiber.Ctx) error { + req := new(request.MagazineFilesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.magazineFilesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MagazineFiles successfully created"}, + }) +} + +// Update update MagazineFiles +// @Summary update MagazineFiles +// @Description API for update MagazineFiles +// @Tags Task +// @Security Bearer +// @Body request.MagazineFilesUpdateRequest +// @Param id path int true "MagazineFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazine-files/{id} [put] +func (_i *magazineFilesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.MagazineFilesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.magazineFilesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MagazineFiles successfully updated"}, + }) +} + +// Delete delete MagazineFiles +// @Summary delete MagazineFiles +// @Description API for delete MagazineFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "MagazineFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazine-files/{id} [delete] +func (_i *magazineFilesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.magazineFilesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MagazineFiles successfully deleted"}, + }) +} diff --git a/app/module/magazine_files/magazine_files.module.go b/app/module/magazine_files/magazine_files.module.go new file mode 100644 index 0000000..b709284 --- /dev/null +++ b/app/module/magazine_files/magazine_files.module.go @@ -0,0 +1,53 @@ +package magazine_files + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/magazine_files/controller" + "go-humas-be/app/module/magazine_files/repository" + "go-humas-be/app/module/magazine_files/service" + "go.uber.org/fx" +) + +// struct of MagazineFilesRouter +type MagazineFilesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of MagazineFiles module +var NewMagazineFilesModule = fx.Options( + // register repository of MagazineFiles module + fx.Provide(repository.NewMagazineFilesRepository), + + // register service of MagazineFiles module + fx.Provide(service.NewMagazineFilesService), + + // register controller of MagazineFiles module + fx.Provide(controller.NewController), + + // register router of MagazineFiles module + fx.Provide(NewMagazineFilesRouter), +) + +// init MagazineFilesRouter +func NewMagazineFilesRouter(fiber *fiber.App, controller *controller.Controller) *MagazineFilesRouter { + return &MagazineFilesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of MagazineFiles module +func (_i *MagazineFilesRouter) RegisterMagazineFilesRoutes() { + // define controllers + magazineFilesController := _i.Controller.MagazineFiles + + // define routes + _i.App.Route("/magazine-files", func(router fiber.Router) { + router.Get("/", magazineFilesController.All) + router.Get("/:id", magazineFilesController.Show) + router.Post("/", magazineFilesController.Save) + router.Put("/:id", magazineFilesController.Update) + router.Delete("/:id", magazineFilesController.Delete) + }) +} diff --git a/app/module/magazine_files/mapper/magazine_files.mapper.go b/app/module/magazine_files/mapper/magazine_files.mapper.go new file mode 100644 index 0000000..37a5ef8 --- /dev/null +++ b/app/module/magazine_files/mapper/magazine_files.mapper.go @@ -0,0 +1,25 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/magazine_files/response" +) + +func MagazineFilesResponseMapper(magazineFilesReq *entity.MagazineFiles) (magazineFilesRes *res.MagazineFilesResponse) { + if magazineFilesReq != nil { + magazineFilesRes = &res.MagazineFilesResponse{ + ID: magazineFilesReq.ID, + Title: magazineFilesReq.Title, + Description: magazineFilesReq.Description, + MagazineId: magazineFilesReq.MagazineId, + DownloadCount: magazineFilesReq.DownloadCount, + StatusId: magazineFilesReq.StatusId, + IsPublish: magazineFilesReq.IsPublish, + PublishedAt: magazineFilesReq.PublishedAt, + IsActive: magazineFilesReq.IsActive, + CreatedAt: magazineFilesReq.CreatedAt, + UpdatedAt: magazineFilesReq.UpdatedAt, + } + } + return magazineFilesRes +} \ No newline at end of file diff --git a/app/module/magazine_files/repository/magazine_files.repository.go b/app/module/magazine_files/repository/magazine_files.repository.go new file mode 100644 index 0000000..c323076 --- /dev/null +++ b/app/module/magazine_files/repository/magazine_files.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/magazine_files/request" + "go-humas-be/utils/paginator" +) + +type magazineFilesRepository struct { + DB *database.Database +} + +// MagazineFilesRepository define interface of IMagazineFilesRepository +type MagazineFilesRepository interface { + GetAll(req request.MagazineFilesQueryRequest) (magazineFiless []*entity.MagazineFiles, paging paginator.Pagination, err error) + FindOne(id uint) (magazineFiles *entity.MagazineFiles, err error) + Create(magazineFiles *entity.MagazineFiles) (err error) + Update(id uint, magazineFiles *entity.MagazineFiles) (err error) + Delete(id uint) (err error) +} + +func NewMagazineFilesRepository(db *database.Database) MagazineFilesRepository { + return &magazineFilesRepository{ + DB: db, + } +} + +// implement interface of IMagazineFilesRepository +func (_i *magazineFilesRepository) GetAll(req request.MagazineFilesQueryRequest) (magazineFiless []*entity.MagazineFiles, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.MagazineFiles{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&magazineFiless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *magazineFilesRepository) FindOne(id uint) (magazineFiles *entity.MagazineFiles, err error) { + if err := _i.DB.DB.First(&magazineFiles, id).Error; err != nil { + return nil, err + } + + return magazineFiles, nil +} + +func (_i *magazineFilesRepository) Create(magazineFiles *entity.MagazineFiles) (err error) { + return _i.DB.DB.Create(magazineFiles).Error +} + +func (_i *magazineFilesRepository) Update(id uint, magazineFiles *entity.MagazineFiles) (err error) { + return _i.DB.DB.Model(&entity.MagazineFiles{}). + Where(&entity.MagazineFiles{ID: id}). + Updates(magazineFiles).Error +} + +func (_i *magazineFilesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.MagazineFiles{}, id).Error +} \ No newline at end of file diff --git a/app/module/magazine_files/request/magazine_files.request.go b/app/module/magazine_files/request/magazine_files.request.go new file mode 100644 index 0000000..6eaed1e --- /dev/null +++ b/app/module/magazine_files/request/magazine_files.request.go @@ -0,0 +1,77 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type MagazineFilesGeneric interface { + ToEntity() +} + +type MagazineFilesQueryRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + MagazineId int `json:"magazine_id" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type MagazineFilesCreateRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + MagazineId int `json:"magazine_id" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MagazineFilesCreateRequest) ToEntity() *entity.MagazineFiles { + return &entity.MagazineFiles{ + Title: req.Title, + Description: req.Description, + MagazineId: req.MagazineId, + DownloadCount: req.DownloadCount, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type MagazineFilesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + MagazineId int `json:"magazine_id" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req MagazineFilesUpdateRequest) ToEntity() *entity.MagazineFiles { + return &entity.MagazineFiles{ + ID: req.ID, + Title: req.Title, + Description: req.Description, + MagazineId: req.MagazineId, + DownloadCount: req.DownloadCount, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/magazine_files/response/magazine_files.response.go b/app/module/magazine_files/response/magazine_files.response.go new file mode 100644 index 0000000..aae986e --- /dev/null +++ b/app/module/magazine_files/response/magazine_files.response.go @@ -0,0 +1,17 @@ +package response + +import "time" + +type MagazineFilesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + MagazineId int `json:"magazine_id"` + DownloadCount int `json:"download_count"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/magazine_files/service/magazine_files.service.go b/app/module/magazine_files/service/magazine_files.service.go new file mode 100644 index 0000000..4a34b61 --- /dev/null +++ b/app/module/magazine_files/service/magazine_files.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/magazine_files/mapper" + "go-humas-be/app/module/magazine_files/repository" + "go-humas-be/app/module/magazine_files/request" + "go-humas-be/app/module/magazine_files/response" + "go-humas-be/utils/paginator" +) + +// MagazineFilesService +type magazineFilesService struct { + Repo repository.MagazineFilesRepository + Log zerolog.Logger +} + +// MagazineFilesService define interface of IMagazineFilesService +type MagazineFilesService interface { + All(req request.MagazineFilesQueryRequest) (magazineFiles []*response.MagazineFilesResponse, paging paginator.Pagination, err error) + Show(id uint) (magazineFiles *response.MagazineFilesResponse, err error) + Save(req request.MagazineFilesCreateRequest) (err error) + Update(id uint, req request.MagazineFilesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewMagazineFilesService init MagazineFilesService +func NewMagazineFilesService(repo repository.MagazineFilesRepository, log zerolog.Logger) MagazineFilesService { + + return &magazineFilesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of MagazineFilesService +func (_i *magazineFilesService) All(req request.MagazineFilesQueryRequest) (magazineFiless []*response.MagazineFilesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + magazineFiless = append(magazineFiless, mapper.MagazineFilesResponseMapper(result)) + } + + return +} + +func (_i *magazineFilesService) Show(id uint) (magazineFiles *response.MagazineFilesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.MagazineFilesResponseMapper(result), nil +} + +func (_i *magazineFilesService) Save(req request.MagazineFilesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *magazineFilesService) Update(id uint, req request.MagazineFilesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *magazineFilesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/magazines/controller/controller.go b/app/module/magazines/controller/controller.go new file mode 100644 index 0000000..1346c96 --- /dev/null +++ b/app/module/magazines/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/magazines/service" + +type Controller struct { + Magazines MagazinesController +} + +func NewController(MagazinesService service.MagazinesService) *Controller { + return &Controller{ + Magazines: NewMagazinesController(MagazinesService), + } +} \ No newline at end of file diff --git a/app/module/magazines/controller/magazines.controller.go b/app/module/magazines/controller/magazines.controller.go new file mode 100644 index 0000000..a84b530 --- /dev/null +++ b/app/module/magazines/controller/magazines.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/magazines/request" + "go-humas-be/app/module/magazines/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type magazinesController struct { + magazinesService service.MagazinesService +} + +type MagazinesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewMagazinesController(magazinesService service.MagazinesService) MagazinesController { + return &magazinesController{ + magazinesService: magazinesService, + } +} + +// All get all Magazines +// @Summary Get all Magazines +// @Description API for getting all Magazines +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazines [get] +func (_i *magazinesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.MagazinesQueryRequest + req.Pagination = paginate + + magazinesData, paging, err := _i.magazinesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Magazines list successfully retrieved"}, + Data: magazinesData, + Meta: paging, + }) +} + +// Show get one Magazines +// @Summary Get one Magazines +// @Description API for getting one Magazines +// @Tags Task +// @Security Bearer +// @Param id path int true "Magazines ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazines/{id} [get] +func (_i *magazinesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + magazinesData, err := _i.magazinesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Magazines successfully retrieved"}, + Data: magazinesData, + }) +} + +// Save create Magazines +// @Summary Create Magazines +// @Description API for create Magazines +// @Tags Task +// @Security Bearer +// @Body request.MagazinesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazines [post] +func (_i *magazinesController) Save(c *fiber.Ctx) error { + req := new(request.MagazinesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.magazinesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Magazines successfully created"}, + }) +} + +// Update update Magazines +// @Summary update Magazines +// @Description API for update Magazines +// @Tags Task +// @Security Bearer +// @Body request.MagazinesUpdateRequest +// @Param id path int true "Magazines ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazines/{id} [put] +func (_i *magazinesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.MagazinesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.magazinesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Magazines successfully updated"}, + }) +} + +// Delete delete Magazines +// @Summary delete Magazines +// @Description API for delete Magazines +// @Tags Task +// @Security Bearer +// @Param id path int true "Magazines ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /magazines/{id} [delete] +func (_i *magazinesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.magazinesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Magazines successfully deleted"}, + }) +} diff --git a/app/module/magazines/magazines.module.go b/app/module/magazines/magazines.module.go new file mode 100644 index 0000000..03f9548 --- /dev/null +++ b/app/module/magazines/magazines.module.go @@ -0,0 +1,53 @@ +package magazines + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/magazines/controller" + "go-humas-be/app/module/magazines/repository" + "go-humas-be/app/module/magazines/service" + "go.uber.org/fx" +) + +// struct of MagazinesRouter +type MagazinesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of Magazines module +var NewMagazinesModule = fx.Options( + // register repository of Magazines module + fx.Provide(repository.NewMagazinesRepository), + + // register service of Magazines module + fx.Provide(service.NewMagazinesService), + + // register controller of Magazines module + fx.Provide(controller.NewController), + + // register router of Magazines module + fx.Provide(NewMagazinesRouter), +) + +// init MagazinesRouter +func NewMagazinesRouter(fiber *fiber.App, controller *controller.Controller) *MagazinesRouter { + return &MagazinesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of Magazines module +func (_i *MagazinesRouter) RegisterMagazinesRoutes() { + // define controllers + magazinesController := _i.Controller.Magazines + + // define routes + _i.App.Route("/magazines", func(router fiber.Router) { + router.Get("/", magazinesController.All) + router.Get("/:id", magazinesController.Show) + router.Post("/", magazinesController.Save) + router.Put("/:id", magazinesController.Update) + router.Delete("/:id", magazinesController.Delete) + }) +} diff --git a/app/module/magazines/mapper/magazines.mapper.go b/app/module/magazines/mapper/magazines.mapper.go new file mode 100644 index 0000000..8bff86e --- /dev/null +++ b/app/module/magazines/mapper/magazines.mapper.go @@ -0,0 +1,27 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/magazines/response" +) + +func MagazinesResponseMapper(magazinesReq *entity.Magazines) (magazinesRes *res.MagazinesResponse) { + if magazinesReq != nil { + magazinesRes = &res.MagazinesResponse{ + ID: magazinesReq.ID, + Title: magazinesReq.Title, + Description: magazinesReq.Description, + ThumbnailPath: magazinesReq.ThumbnailPath, + ThumbnailUrl: magazinesReq.ThumbnailUrl, + PageUrl: magazinesReq.PageUrl, + CreatedById: magazinesReq.CreatedById, + StatusId: magazinesReq.StatusId, + IsPublish: magazinesReq.IsPublish, + PublishedAt: magazinesReq.PublishedAt, + IsActive: magazinesReq.IsActive, + CreatedAt: magazinesReq.CreatedAt, + UpdatedAt: magazinesReq.UpdatedAt, + } + } + return magazinesRes +} \ No newline at end of file diff --git a/app/module/magazines/repository/magazines.repository.go b/app/module/magazines/repository/magazines.repository.go new file mode 100644 index 0000000..ddbec12 --- /dev/null +++ b/app/module/magazines/repository/magazines.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/magazines/request" + "go-humas-be/utils/paginator" +) + +type magazinesRepository struct { + DB *database.Database +} + +// MagazinesRepository define interface of IMagazinesRepository +type MagazinesRepository interface { + GetAll(req request.MagazinesQueryRequest) (magaziness []*entity.Magazines, paging paginator.Pagination, err error) + FindOne(id uint) (magazines *entity.Magazines, err error) + Create(magazines *entity.Magazines) (err error) + Update(id uint, magazines *entity.Magazines) (err error) + Delete(id uint) (err error) +} + +func NewMagazinesRepository(db *database.Database) MagazinesRepository { + return &magazinesRepository{ + DB: db, + } +} + +// implement interface of IMagazinesRepository +func (_i *magazinesRepository) GetAll(req request.MagazinesQueryRequest) (magaziness []*entity.Magazines, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Magazines{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&magaziness).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *magazinesRepository) FindOne(id uint) (magazines *entity.Magazines, err error) { + if err := _i.DB.DB.First(&magazines, id).Error; err != nil { + return nil, err + } + + return magazines, nil +} + +func (_i *magazinesRepository) Create(magazines *entity.Magazines) (err error) { + return _i.DB.DB.Create(magazines).Error +} + +func (_i *magazinesRepository) Update(id uint, magazines *entity.Magazines) (err error) { + return _i.DB.DB.Model(&entity.Magazines{}). + Where(&entity.Magazines{ID: id}). + Updates(magazines).Error +} + +func (_i *magazinesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Magazines{}, id).Error +} \ No newline at end of file diff --git a/app/module/magazines/request/magazines.request.go b/app/module/magazines/request/magazines.request.go new file mode 100644 index 0000000..2721836 --- /dev/null +++ b/app/module/magazines/request/magazines.request.go @@ -0,0 +1,87 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type MagazinesGeneric interface { + ToEntity() +} + +type MagazinesQueryRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type MagazinesCreateRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MagazinesCreateRequest) ToEntity() *entity.Magazines { + return &entity.Magazines{ + Title: req.Title, + Description: req.Description, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + PageUrl: req.PageUrl, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type MagazinesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ThumbnailPath string `json:"thumbnail_path" validate:"required"` + ThumbnailUrl string `json:"thumbnail_url" validate:"required"` + PageUrl string `json:"page_url" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req MagazinesUpdateRequest) ToEntity() *entity.Magazines { + return &entity.Magazines{ + ID: req.ID, + Title: req.Title, + Description: req.Description, + ThumbnailPath: req.ThumbnailPath, + ThumbnailUrl: req.ThumbnailUrl, + PageUrl: req.PageUrl, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/magazines/response/magazines.response.go b/app/module/magazines/response/magazines.response.go new file mode 100644 index 0000000..a6bd271 --- /dev/null +++ b/app/module/magazines/response/magazines.response.go @@ -0,0 +1,19 @@ +package response + +import "time" + +type MagazinesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + ThumbnailPath string `json:"thumbnail_path"` + ThumbnailUrl string `json:"thumbnail_url"` + PageUrl string `json:"page_url"` + CreatedById int `json:"created_by_id"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/magazines/service/magazines.service.go b/app/module/magazines/service/magazines.service.go new file mode 100644 index 0000000..c48b3f1 --- /dev/null +++ b/app/module/magazines/service/magazines.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/magazines/mapper" + "go-humas-be/app/module/magazines/repository" + "go-humas-be/app/module/magazines/request" + "go-humas-be/app/module/magazines/response" + "go-humas-be/utils/paginator" +) + +// MagazinesService +type magazinesService struct { + Repo repository.MagazinesRepository + Log zerolog.Logger +} + +// MagazinesService define interface of IMagazinesService +type MagazinesService interface { + All(req request.MagazinesQueryRequest) (magazines []*response.MagazinesResponse, paging paginator.Pagination, err error) + Show(id uint) (magazines *response.MagazinesResponse, err error) + Save(req request.MagazinesCreateRequest) (err error) + Update(id uint, req request.MagazinesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewMagazinesService init MagazinesService +func NewMagazinesService(repo repository.MagazinesRepository, log zerolog.Logger) MagazinesService { + + return &magazinesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of MagazinesService +func (_i *magazinesService) All(req request.MagazinesQueryRequest) (magaziness []*response.MagazinesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + magaziness = append(magaziness, mapper.MagazinesResponseMapper(result)) + } + + return +} + +func (_i *magazinesService) Show(id uint) (magazines *response.MagazinesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.MagazinesResponseMapper(result), nil +} + +func (_i *magazinesService) Save(req request.MagazinesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *magazinesService) Update(id uint, req request.MagazinesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *magazinesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/master_menus/controller/controller.go b/app/module/master_menus/controller/controller.go new file mode 100644 index 0000000..bc8c925 --- /dev/null +++ b/app/module/master_menus/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/master_menus/service" + +type Controller struct { + MasterMenus MasterMenusController +} + +func NewController(MasterMenusService service.MasterMenusService) *Controller { + return &Controller{ + MasterMenus: NewMasterMenusController(MasterMenusService), + } +} \ No newline at end of file diff --git a/app/module/master_menus/controller/master_menus.controller.go b/app/module/master_menus/controller/master_menus.controller.go new file mode 100644 index 0000000..533acb0 --- /dev/null +++ b/app/module/master_menus/controller/master_menus.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_menus/request" + "go-humas-be/app/module/master_menus/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type masterMenusController struct { + masterMenusService service.MasterMenusService +} + +type MasterMenusController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewMasterMenusController(masterMenusService service.MasterMenusService) MasterMenusController { + return &masterMenusController{ + masterMenusService: masterMenusService, + } +} + +// All get all MasterMenus +// @Summary Get all MasterMenus +// @Description API for getting all MasterMenus +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-menus [get] +func (_i *masterMenusController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.MasterMenusQueryRequest + req.Pagination = paginate + + masterMenusData, paging, err := _i.masterMenusService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterMenus list successfully retrieved"}, + Data: masterMenusData, + Meta: paging, + }) +} + +// Show get one MasterMenus +// @Summary Get one MasterMenus +// @Description API for getting one MasterMenus +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterMenus ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-menus/{id} [get] +func (_i *masterMenusController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + masterMenusData, err := _i.masterMenusService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterMenus successfully retrieved"}, + Data: masterMenusData, + }) +} + +// Save create MasterMenus +// @Summary Create MasterMenus +// @Description API for create MasterMenus +// @Tags Task +// @Security Bearer +// @Body request.MasterMenusCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-menus [post] +func (_i *masterMenusController) Save(c *fiber.Ctx) error { + req := new(request.MasterMenusCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.masterMenusService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterMenus successfully created"}, + }) +} + +// Update update MasterMenus +// @Summary update MasterMenus +// @Description API for update MasterMenus +// @Tags Task +// @Security Bearer +// @Body request.MasterMenusUpdateRequest +// @Param id path int true "MasterMenus ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-menus/{id} [put] +func (_i *masterMenusController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.MasterMenusUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.masterMenusService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterMenus successfully updated"}, + }) +} + +// Delete delete MasterMenus +// @Summary delete MasterMenus +// @Description API for delete MasterMenus +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterMenus ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-menus/{id} [delete] +func (_i *masterMenusController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.masterMenusService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterMenus successfully deleted"}, + }) +} diff --git a/app/module/master_menus/mapper/master_menus.mapper.go b/app/module/master_menus/mapper/master_menus.mapper.go new file mode 100644 index 0000000..c59be34 --- /dev/null +++ b/app/module/master_menus/mapper/master_menus.mapper.go @@ -0,0 +1,25 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/master_menus/response" +) + +func MasterMenusResponseMapper(masterMenusReq *entity.MasterMenus) (masterMenusRes *res.MasterMenusResponse) { + if masterMenusReq != nil { + masterMenusRes = &res.MasterMenusResponse{ + ID: masterMenusReq.ID, + Name: masterMenusReq.Name, + Description: masterMenusReq.Description, + ModuleId: masterMenusReq.ModuleId, + ParentMenuId: masterMenusReq.ParentMenuId, + Icon: masterMenusReq.Icon, + Position: masterMenusReq.Position, + StatusId: masterMenusReq.StatusId, + IsActive: masterMenusReq.IsActive, + CreatedAt: masterMenusReq.CreatedAt, + UpdatedAt: masterMenusReq.UpdatedAt, + } + } + return masterMenusRes +} \ No newline at end of file diff --git a/app/module/master_menus/master_menus.module.go b/app/module/master_menus/master_menus.module.go new file mode 100644 index 0000000..ea3be0e --- /dev/null +++ b/app/module/master_menus/master_menus.module.go @@ -0,0 +1,53 @@ +package master_menus + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_menus/controller" + "go-humas-be/app/module/master_menus/repository" + "go-humas-be/app/module/master_menus/service" + "go.uber.org/fx" +) + +// struct of MasterMenusRouter +type MasterMenusRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of MasterMenus module +var NewMasterMenusModule = fx.Options( + // register repository of MasterMenus module + fx.Provide(repository.NewMasterMenusRepository), + + // register service of MasterMenus module + fx.Provide(service.NewMasterMenusService), + + // register controller of MasterMenus module + fx.Provide(controller.NewController), + + // register router of MasterMenus module + fx.Provide(NewMasterMenusRouter), +) + +// init MasterMenusRouter +func NewMasterMenusRouter(fiber *fiber.App, controller *controller.Controller) *MasterMenusRouter { + return &MasterMenusRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of MasterMenus module +func (_i *MasterMenusRouter) RegisterMasterMenusRoutes() { + // define controllers + masterMenusController := _i.Controller.MasterMenus + + // define routes + _i.App.Route("/master-menus", func(router fiber.Router) { + router.Get("/", masterMenusController.All) + router.Get("/:id", masterMenusController.Show) + router.Post("/", masterMenusController.Save) + router.Put("/:id", masterMenusController.Update) + router.Delete("/:id", masterMenusController.Delete) + }) +} \ No newline at end of file diff --git a/app/module/master_menus/repository/master_menus.repository.go b/app/module/master_menus/repository/master_menus.repository.go new file mode 100644 index 0000000..c221113 --- /dev/null +++ b/app/module/master_menus/repository/master_menus.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/master_menus/request" + "go-humas-be/utils/paginator" +) + +type masterMenusRepository struct { + DB *database.Database +} + +// MasterMenusRepository define interface of IMasterMenusRepository +type MasterMenusRepository interface { + GetAll(req request.MasterMenusQueryRequest) (masterMenuss []*entity.MasterMenus, paging paginator.Pagination, err error) + FindOne(id uint) (masterMenus *entity.MasterMenus, err error) + Create(masterMenus *entity.MasterMenus) (err error) + Update(id uint, masterMenus *entity.MasterMenus) (err error) + Delete(id uint) (err error) +} + +func NewMasterMenusRepository(db *database.Database) MasterMenusRepository { + return &masterMenusRepository{ + DB: db, + } +} + +// implement interface of IMasterMenusRepository +func (_i *masterMenusRepository) GetAll(req request.MasterMenusQueryRequest) (masterMenuss []*entity.MasterMenus, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.MasterMenus{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&masterMenuss).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *masterMenusRepository) FindOne(id uint) (masterMenus *entity.MasterMenus, err error) { + if err := _i.DB.DB.First(&masterMenus, id).Error; err != nil { + return nil, err + } + + return masterMenus, nil +} + +func (_i *masterMenusRepository) Create(masterMenus *entity.MasterMenus) (err error) { + return _i.DB.DB.Create(masterMenus).Error +} + +func (_i *masterMenusRepository) Update(id uint, masterMenus *entity.MasterMenus) (err error) { + return _i.DB.DB.Model(&entity.MasterMenus{}). + Where(&entity.MasterMenus{ID: id}). + Updates(masterMenus).Error +} + +func (_i *masterMenusRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.MasterMenus{}, id).Error +} \ No newline at end of file diff --git a/app/module/master_menus/request/master_menus.request.go b/app/module/master_menus/request/master_menus.request.go new file mode 100644 index 0000000..8efa10a --- /dev/null +++ b/app/module/master_menus/request/master_menus.request.go @@ -0,0 +1,78 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type MasterMenusGeneric interface { + ToEntity() +} + +type MasterMenusQueryRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + ModuleId int `json:"module_id" validate:"required"` + ParentMenuId int `json:"parent_menu_id" validate:"required"` + Icon string `json:"icon" validate:"required"` + Position int `json:"position" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type MasterMenusCreateRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + ModuleId int `json:"module_id" validate:"required"` + ParentMenuId int `json:"parent_menu_id" validate:"required"` + Icon string `json:"icon" validate:"required"` + Position int `json:"position" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MasterMenusCreateRequest) ToEntity() *entity.MasterMenus { + return &entity.MasterMenus{ + Name: req.Name, + Description: req.Description, + ModuleId: req.ModuleId, + ParentMenuId: req.ParentMenuId, + Icon: req.Icon, + Position: req.Position, + StatusId: req.StatusId, + IsActive: req.IsActive, + } +} + +type MasterMenusUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + ModuleId int `json:"module_id" validate:"required"` + ParentMenuId int `json:"parent_menu_id" validate:"required"` + Icon string `json:"icon" validate:"required"` + Position int `json:"position" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req MasterMenusUpdateRequest) ToEntity() *entity.MasterMenus { + return &entity.MasterMenus{ + ID: req.ID, + Name: req.Name, + Description: req.Description, + ModuleId: req.ModuleId, + ParentMenuId: req.ParentMenuId, + Icon: req.Icon, + Position: req.Position, + StatusId: req.StatusId, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} \ No newline at end of file diff --git a/app/module/master_menus/response/master_menus.response.go b/app/module/master_menus/response/master_menus.response.go new file mode 100644 index 0000000..e1d632f --- /dev/null +++ b/app/module/master_menus/response/master_menus.response.go @@ -0,0 +1,17 @@ +package response + +import "time" + +type MasterMenusResponse struct { + ID uint `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + ModuleId int `json:"module_id"` + ParentMenuId int `json:"parent_menu_id"` + Icon string `json:"icon"` + Position int `json:"position"` + StatusId int `json:"status_id"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/master_menus/service/master_menus.service.go b/app/module/master_menus/service/master_menus.service.go new file mode 100644 index 0000000..05b21b4 --- /dev/null +++ b/app/module/master_menus/service/master_menus.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/master_menus/mapper" + "go-humas-be/app/module/master_menus/repository" + "go-humas-be/app/module/master_menus/request" + "go-humas-be/app/module/master_menus/response" + "go-humas-be/utils/paginator" +) + +// MasterMenusService +type masterMenusService struct { + Repo repository.MasterMenusRepository + Log zerolog.Logger +} + +// MasterMenusService define interface of IMasterMenusService +type MasterMenusService interface { + All(req request.MasterMenusQueryRequest) (masterMenus []*response.MasterMenusResponse, paging paginator.Pagination, err error) + Show(id uint) (masterMenus *response.MasterMenusResponse, err error) + Save(req request.MasterMenusCreateRequest) (err error) + Update(id uint, req request.MasterMenusUpdateRequest) (err error) + Delete(id uint) error +} + +// NewMasterMenusService init MasterMenusService +func NewMasterMenusService(repo repository.MasterMenusRepository, log zerolog.Logger) MasterMenusService { + + return &masterMenusService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of MasterMenusService +func (_i *masterMenusService) All(req request.MasterMenusQueryRequest) (masterMenuss []*response.MasterMenusResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + masterMenuss = append(masterMenuss, mapper.MasterMenusResponseMapper(result)) + } + + return +} + +func (_i *masterMenusService) Show(id uint) (masterMenus *response.MasterMenusResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.MasterMenusResponseMapper(result), nil +} + +func (_i *masterMenusService) Save(req request.MasterMenusCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *masterMenusService) Update(id uint, req request.MasterMenusUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *masterMenusService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/master_modules/controller/controller.go b/app/module/master_modules/controller/controller.go new file mode 100644 index 0000000..ec3d538 --- /dev/null +++ b/app/module/master_modules/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/master_modules/service" + +type Controller struct { + MasterModules MasterModulesController +} + +func NewController(MasterModulesService service.MasterModulesService) *Controller { + return &Controller{ + MasterModules: NewMasterModulesController(MasterModulesService), + } +} \ No newline at end of file diff --git a/app/module/master_modules/controller/master_modules.controller.go b/app/module/master_modules/controller/master_modules.controller.go new file mode 100644 index 0000000..e13a2a5 --- /dev/null +++ b/app/module/master_modules/controller/master_modules.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_modules/request" + "go-humas-be/app/module/master_modules/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type masterModulesController struct { + masterModulesService service.MasterModulesService +} + +type MasterModulesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewMasterModulesController(masterModulesService service.MasterModulesService) MasterModulesController { + return &masterModulesController{ + masterModulesService: masterModulesService, + } +} + +// All get all MasterModules +// @Summary Get all MasterModules +// @Description API for getting all MasterModules +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-modules [get] +func (_i *masterModulesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.MasterModulesQueryRequest + req.Pagination = paginate + + masterModulesData, paging, err := _i.masterModulesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterModules list successfully retrieved"}, + Data: masterModulesData, + Meta: paging, + }) +} + +// Show get one MasterModules +// @Summary Get one MasterModules +// @Description API for getting one MasterModules +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterModules ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-modules/{id} [get] +func (_i *masterModulesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + masterModulesData, err := _i.masterModulesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterModules successfully retrieved"}, + Data: masterModulesData, + }) +} + +// Save create MasterModules +// @Summary Create MasterModules +// @Description API for create MasterModules +// @Tags Task +// @Security Bearer +// @Body request.MasterModulesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-modules [post] +func (_i *masterModulesController) Save(c *fiber.Ctx) error { + req := new(request.MasterModulesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.masterModulesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterModules successfully created"}, + }) +} + +// Update update MasterModules +// @Summary update MasterModules +// @Description API for update MasterModules +// @Tags Task +// @Security Bearer +// @Body request.MasterModulesUpdateRequest +// @Param id path int true "MasterModules ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-modules/{id} [put] +func (_i *masterModulesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.MasterModulesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.masterModulesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterModules successfully updated"}, + }) +} + +// Delete delete MasterModules +// @Summary delete MasterModules +// @Description API for delete MasterModules +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterModules ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-modules/{id} [delete] +func (_i *masterModulesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.masterModulesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterModules successfully deleted"}, + }) +} diff --git a/app/module/master_modules/entity/master_modules.entity.go b/app/module/master_modules/entity/master_modules.entity.go new file mode 100644 index 0000000..0b7d409 --- /dev/null +++ b/app/module/master_modules/entity/master_modules.entity.go @@ -0,0 +1,14 @@ +package entity + +import "time" + +type MasterModules struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + Description string `json:"description" gorm:"type:varchar"` + PathUrl string `json:"path_url" gorm:"type:varchar"` + StatusId int `json:"status_id" gorm:"type:int4"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/module/master_modules/mapper/master_modules.mapper.go b/app/module/master_modules/mapper/master_modules.mapper.go new file mode 100644 index 0000000..95105c2 --- /dev/null +++ b/app/module/master_modules/mapper/master_modules.mapper.go @@ -0,0 +1,22 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/master_modules/response" +) + +func MasterModulesResponseMapper(masterModulesReq *entity.MasterModules) (masterModulesRes *res.MasterModulesResponse) { + if masterModulesReq != nil { + masterModulesRes = &res.MasterModulesResponse{ + ID: masterModulesReq.ID, + Name: masterModulesReq.Name, + Description: masterModulesReq.Description, + PathUrl: masterModulesReq.PathUrl, + StatusId: masterModulesReq.StatusId, + IsActive: masterModulesReq.IsActive, + CreatedAt: masterModulesReq.CreatedAt, + UpdatedAt: masterModulesReq.UpdatedAt, + } + } + return masterModulesRes +} \ No newline at end of file diff --git a/app/module/master_modules/master_modules.module.go b/app/module/master_modules/master_modules.module.go new file mode 100644 index 0000000..de9e961 --- /dev/null +++ b/app/module/master_modules/master_modules.module.go @@ -0,0 +1,53 @@ +package master_modules + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_modules/controller" + "go-humas-be/app/module/master_modules/repository" + "go-humas-be/app/module/master_modules/service" + "go.uber.org/fx" +) + +// struct of MasterModulesRouter +type MasterModulesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of MasterModules module +var NewMasterModulesModule = fx.Options( + // register repository of MasterModules module + fx.Provide(repository.NewMasterModulesRepository), + + // register service of MasterModules module + fx.Provide(service.NewMasterModulesService), + + // register controller of MasterModules module + fx.Provide(controller.NewController), + + // register router of MasterModules module + fx.Provide(NewMasterModulesRouter), +) + +// init MasterModulesRouter +func NewMasterModulesRouter(fiber *fiber.App, controller *controller.Controller) *MasterModulesRouter { + return &MasterModulesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of MasterModules module +func (_i *MasterModulesRouter) RegisterMasterModulesRoutes() { + // define controllers + masterModulesController := _i.Controller.MasterModules + + // define routes + _i.App.Route("/master-modules", func(router fiber.Router) { + router.Get("/", masterModulesController.All) + router.Get("/:id", masterModulesController.Show) + router.Post("/", masterModulesController.Save) + router.Put("/:id", masterModulesController.Update) + router.Delete("/:id", masterModulesController.Delete) + }) +} \ No newline at end of file diff --git a/app/module/master_modules/repository/master_modules.repository.go b/app/module/master_modules/repository/master_modules.repository.go new file mode 100644 index 0000000..0cfa7fe --- /dev/null +++ b/app/module/master_modules/repository/master_modules.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/master_modules/request" + "go-humas-be/utils/paginator" +) + +type masterModulesRepository struct { + DB *database.Database +} + +// MasterModulesRepository define interface of IMasterModulesRepository +type MasterModulesRepository interface { + GetAll(req request.MasterModulesQueryRequest) (masterModuless []*entity.MasterModules, paging paginator.Pagination, err error) + FindOne(id uint) (masterModules *entity.MasterModules, err error) + Create(masterModules *entity.MasterModules) (err error) + Update(id uint, masterModules *entity.MasterModules) (err error) + Delete(id uint) (err error) +} + +func NewMasterModulesRepository(db *database.Database) MasterModulesRepository { + return &masterModulesRepository{ + DB: db, + } +} + +// implement interface of IMasterModulesRepository +func (_i *masterModulesRepository) GetAll(req request.MasterModulesQueryRequest) (masterModuless []*entity.MasterModules, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.MasterModules{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&masterModuless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *masterModulesRepository) FindOne(id uint) (masterModules *entity.MasterModules, err error) { + if err := _i.DB.DB.First(&masterModules, id).Error; err != nil { + return nil, err + } + + return masterModules, nil +} + +func (_i *masterModulesRepository) Create(masterModules *entity.MasterModules) (err error) { + return _i.DB.DB.Create(masterModules).Error +} + +func (_i *masterModulesRepository) Update(id uint, masterModules *entity.MasterModules) (err error) { + return _i.DB.DB.Model(&entity.MasterModules{}). + Where(&entity.MasterModules{ID: id}). + Updates(masterModules).Error +} + +func (_i *masterModulesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.MasterModules{}, id).Error +} \ No newline at end of file diff --git a/app/module/master_modules/request/master_modules.request.go b/app/module/master_modules/request/master_modules.request.go new file mode 100644 index 0000000..1bf2aec --- /dev/null +++ b/app/module/master_modules/request/master_modules.request.go @@ -0,0 +1,63 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type MasterModulesGeneric interface { + ToEntity() +} + +type MasterModulesQueryRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + PathUrl string `json:"path_url" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type MasterModulesCreateRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + PathUrl string `json:"path_url" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MasterModulesCreateRequest) ToEntity() *entity.MasterModules { + return &entity.MasterModules{ + Name: req.Name, + Description: req.Description, + PathUrl: req.PathUrl, + StatusId: req.StatusId, + IsActive: req.IsActive, + } +} + +type MasterModulesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + PathUrl string `json:"path_url" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req MasterModulesUpdateRequest) ToEntity() *entity.MasterModules { + return &entity.MasterModules{ + ID: req.ID, + Name: req.Name, + Description: req.Description, + PathUrl: req.PathUrl, + StatusId: req.StatusId, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} \ No newline at end of file diff --git a/app/module/master_modules/response/master_modules.response.go b/app/module/master_modules/response/master_modules.response.go new file mode 100644 index 0000000..b0a1b6e --- /dev/null +++ b/app/module/master_modules/response/master_modules.response.go @@ -0,0 +1,14 @@ +package response + +import "time" + +type MasterModulesResponse struct { + ID uint `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + PathUrl string `json:"path_url"` + StatusId int `json:"status_id"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/master_modules/service/master_modules.service.go b/app/module/master_modules/service/master_modules.service.go new file mode 100644 index 0000000..1e2c00c --- /dev/null +++ b/app/module/master_modules/service/master_modules.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/master_modules/mapper" + "go-humas-be/app/module/master_modules/repository" + "go-humas-be/app/module/master_modules/request" + "go-humas-be/app/module/master_modules/response" + "go-humas-be/utils/paginator" +) + +// MasterModulesService +type masterModulesService struct { + Repo repository.MasterModulesRepository + Log zerolog.Logger +} + +// MasterModulesService define interface of IMasterModulesService +type MasterModulesService interface { + All(req request.MasterModulesQueryRequest) (masterModules []*response.MasterModulesResponse, paging paginator.Pagination, err error) + Show(id uint) (masterModules *response.MasterModulesResponse, err error) + Save(req request.MasterModulesCreateRequest) (err error) + Update(id uint, req request.MasterModulesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewMasterModulesService init MasterModulesService +func NewMasterModulesService(repo repository.MasterModulesRepository, log zerolog.Logger) MasterModulesService { + + return &masterModulesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of MasterModulesService +func (_i *masterModulesService) All(req request.MasterModulesQueryRequest) (masterModuless []*response.MasterModulesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + masterModuless = append(masterModuless, mapper.MasterModulesResponseMapper(result)) + } + + return +} + +func (_i *masterModulesService) Show(id uint) (masterModules *response.MasterModulesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.MasterModulesResponseMapper(result), nil +} + +func (_i *masterModulesService) Save(req request.MasterModulesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *masterModulesService) Update(id uint, req request.MasterModulesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *masterModulesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/master_statuses/controller/controller.go b/app/module/master_statuses/controller/controller.go new file mode 100644 index 0000000..87e1e4f --- /dev/null +++ b/app/module/master_statuses/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/master_statuses/service" + +type Controller struct { + MasterStatuses MasterStatusesController +} + +func NewController(MasterStatusesService service.MasterStatusesService) *Controller { + return &Controller{ + MasterStatuses: NewMasterStatusesController(MasterStatusesService), + } +} \ No newline at end of file diff --git a/app/module/master_statuses/controller/master_statuses.controller.go b/app/module/master_statuses/controller/master_statuses.controller.go new file mode 100644 index 0000000..5effaf1 --- /dev/null +++ b/app/module/master_statuses/controller/master_statuses.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_statuses/request" + "go-humas-be/app/module/master_statuses/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type masterStatusesController struct { + masterStatusesService service.MasterStatusesService +} + +type MasterStatusesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewMasterStatusesController(masterStatusesService service.MasterStatusesService) MasterStatusesController { + return &masterStatusesController{ + masterStatusesService: masterStatusesService, + } +} + +// All get all MasterStatuses +// @Summary Get all MasterStatuses +// @Description API for getting all MasterStatuses +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-statuses [get] +func (_i *masterStatusesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.MasterStatusesQueryRequest + req.Pagination = paginate + + masterStatusesData, paging, err := _i.masterStatusesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterStatuses list successfully retrieved"}, + Data: masterStatusesData, + Meta: paging, + }) +} + +// Show get one MasterStatuses +// @Summary Get one MasterStatuses +// @Description API for getting one MasterStatuses +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterStatuses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-statuses/{id} [get] +func (_i *masterStatusesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + masterStatusesData, err := _i.masterStatusesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterStatuses successfully retrieved"}, + Data: masterStatusesData, + }) +} + +// Save create MasterStatuses +// @Summary Create MasterStatuses +// @Description API for create MasterStatuses +// @Tags Task +// @Security Bearer +// @Body request.MasterStatusesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-statuses [post] +func (_i *masterStatusesController) Save(c *fiber.Ctx) error { + req := new(request.MasterStatusesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.masterStatusesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterStatuses successfully created"}, + }) +} + +// Update update MasterStatuses +// @Summary update MasterStatuses +// @Description API for update MasterStatuses +// @Tags Task +// @Security Bearer +// @Body request.MasterStatusesUpdateRequest +// @Param id path int true "MasterStatuses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-statuses/{id} [put] +func (_i *masterStatusesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.MasterStatusesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.masterStatusesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterStatuses successfully updated"}, + }) +} + +// Delete delete MasterStatuses +// @Summary delete MasterStatuses +// @Description API for delete MasterStatuses +// @Tags Task +// @Security Bearer +// @Param id path int true "MasterStatuses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /master-statuses/{id} [delete] +func (_i *masterStatusesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.masterStatusesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"MasterStatuses successfully deleted"}, + }) +} diff --git a/app/module/master_statuses/entity/master_statuses.entity.go b/app/module/master_statuses/entity/master_statuses.entity.go new file mode 100644 index 0000000..d3813a4 --- /dev/null +++ b/app/module/master_statuses/entity/master_statuses.entity.go @@ -0,0 +1,9 @@ +package entity + +import "time" + +type MasterStatuses struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + Name string `json:"name" gorm:"type:varchar"` + IsActive bool `json:"is_active" gorm:"type:bool"` +} \ No newline at end of file diff --git a/app/module/master_statuses/mapper/master_statuses.mapper.go b/app/module/master_statuses/mapper/master_statuses.mapper.go new file mode 100644 index 0000000..1ed31c5 --- /dev/null +++ b/app/module/master_statuses/mapper/master_statuses.mapper.go @@ -0,0 +1,17 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/master_statuses/response" +) + +func MasterStatusesResponseMapper(masterStatusesReq *entity.MasterStatuses) (masterStatusesRes *res.MasterStatusesResponse) { + if masterStatusesReq != nil { + masterStatusesRes = &res.MasterStatusesResponse{ + ID: masterStatusesReq.ID, + Name: masterStatusesReq.Name, + IsActive: masterStatusesReq.IsActive, + } + } + return masterStatusesRes +} \ No newline at end of file diff --git a/app/module/master_statuses/master_statuses.module.go b/app/module/master_statuses/master_statuses.module.go new file mode 100644 index 0000000..1a3e4d7 --- /dev/null +++ b/app/module/master_statuses/master_statuses.module.go @@ -0,0 +1,53 @@ +package master_statuses + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/master_statuses/controller" + "go-humas-be/app/module/master_statuses/repository" + "go-humas-be/app/module/master_statuses/service" + "go.uber.org/fx" +) + +// struct of MasterStatusesRouter +type MasterStatusesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of MasterStatuses module +var NewMasterStatusesModule = fx.Options( + // register repository of MasterStatuses module + fx.Provide(repository.NewMasterStatusesRepository), + + // register service of MasterStatuses module + fx.Provide(service.NewMasterStatusesService), + + // register controller of MasterStatuses module + fx.Provide(controller.NewController), + + // register router of MasterStatuses module + fx.Provide(NewMasterStatusesRouter), +) + +// init MasterStatusesRouter +func NewMasterStatusesRouter(fiber *fiber.App, controller *controller.Controller) *MasterStatusesRouter { + return &MasterStatusesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of MasterStatuses module +func (_i *MasterStatusesRouter) RegisterMasterStatusesRoutes() { + // define controllers + masterStatusesController := _i.Controller.MasterStatuses + + // define routes + _i.App.Route("/master-statuses", func(router fiber.Router) { + router.Get("/", masterStatusesController.All) + router.Get("/:id", masterStatusesController.Show) + router.Post("/", masterStatusesController.Save) + router.Put("/:id", masterStatusesController.Update) + router.Delete("/:id", masterStatusesController.Delete) + }) +} \ No newline at end of file diff --git a/app/module/master_statuses/repository/master_statuses.repository.go b/app/module/master_statuses/repository/master_statuses.repository.go new file mode 100644 index 0000000..5ef8595 --- /dev/null +++ b/app/module/master_statuses/repository/master_statuses.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/master_statuses/request" + "go-humas-be/utils/paginator" +) + +type masterStatusesRepository struct { + DB *database.Database +} + +// MasterStatusesRepository define interface of IMasterStatusesRepository +type MasterStatusesRepository interface { + GetAll(req request.MasterStatusesQueryRequest) (masterStatusess []*entity.MasterStatuses, paging paginator.Pagination, err error) + FindOne(id uint) (masterStatuses *entity.MasterStatuses, err error) + Create(masterStatuses *entity.MasterStatuses) (err error) + Update(id uint, masterStatuses *entity.MasterStatuses) (err error) + Delete(id uint) (err error) +} + +func NewMasterStatusesRepository(db *database.Database) MasterStatusesRepository { + return &masterStatusesRepository{ + DB: db, + } +} + +// implement interface of IMasterStatusesRepository +func (_i *masterStatusesRepository) GetAll(req request.MasterStatusesQueryRequest) (masterStatusess []*entity.MasterStatuses, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.MasterStatuses{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&masterStatusess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *masterStatusesRepository) FindOne(id uint) (masterStatuses *entity.MasterStatuses, err error) { + if err := _i.DB.DB.First(&masterStatuses, id).Error; err != nil { + return nil, err + } + + return masterStatuses, nil +} + +func (_i *masterStatusesRepository) Create(masterStatuses *entity.MasterStatuses) (err error) { + return _i.DB.DB.Create(masterStatuses).Error +} + +func (_i *masterStatusesRepository) Update(id uint, masterStatuses *entity.MasterStatuses) (err error) { + return _i.DB.DB.Model(&entity.MasterStatuses{}). + Where(&entity.MasterStatuses{ID: id}). + Updates(masterStatuses).Error +} + +func (_i *masterStatusesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.MasterStatuses{}, id).Error +} \ No newline at end of file diff --git a/app/module/master_statuses/request/master_statuses.request.go b/app/module/master_statuses/request/master_statuses.request.go new file mode 100644 index 0000000..5b19b0d --- /dev/null +++ b/app/module/master_statuses/request/master_statuses.request.go @@ -0,0 +1,44 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type MasterStatusesGeneric interface { + ToEntity() +} + +type MasterStatusesQueryRequest struct { + Name string `json:"name" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type MasterStatusesCreateRequest struct { + Name string `json:"name" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MasterStatusesCreateRequest) ToEntity() *entity.MasterStatuses { + return &entity.MasterStatuses{ + Name: req.Name, + IsActive: req.IsActive, + } +} + +type MasterStatusesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Name string `json:"name" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req MasterStatusesUpdateRequest) ToEntity() *entity.MasterStatuses { + return &entity.MasterStatuses{ + ID: req.ID, + Name: req.Name, + IsActive: req.IsActive, + } +} \ No newline at end of file diff --git a/app/module/master_statuses/response/master_statuses.response.go b/app/module/master_statuses/response/master_statuses.response.go new file mode 100644 index 0000000..35d8f80 --- /dev/null +++ b/app/module/master_statuses/response/master_statuses.response.go @@ -0,0 +1,9 @@ +package response + +import "time" + +type MasterStatusesResponse struct { + ID uint `json:"id"` + Name string `json:"name"` + IsActive bool `json:"is_active"` +} \ No newline at end of file diff --git a/app/module/master_statuses/service/master_statuses.service.go b/app/module/master_statuses/service/master_statuses.service.go new file mode 100644 index 0000000..391fe2f --- /dev/null +++ b/app/module/master_statuses/service/master_statuses.service.go @@ -0,0 +1,73 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/master_statuses/mapper" + "go-humas-be/app/module/master_statuses/repository" + "go-humas-be/app/module/master_statuses/request" + "go-humas-be/app/module/master_statuses/response" + "go-humas-be/utils/paginator" + "time" +) + +// MasterStatusesService +type masterStatusesService struct { + Repo repository.MasterStatusesRepository + Log zerolog.Logger +} + +// MasterStatusesService define interface of IMasterStatusesService +type MasterStatusesService interface { + All(req request.MasterStatusesQueryRequest) (masterStatuses []*response.MasterStatusesResponse, paging paginator.Pagination, err error) + Show(id uint) (masterStatuses *response.MasterStatusesResponse, err error) + Save(req request.MasterStatusesCreateRequest) (err error) + Update(id uint, req request.MasterStatusesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewMasterStatusesService init MasterStatusesService +func NewMasterStatusesService(repo repository.MasterStatusesRepository, log zerolog.Logger) MasterStatusesService { + + return &masterStatusesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of MasterStatusesService +func (_i *masterStatusesService) All(req request.MasterStatusesQueryRequest) (masterStatusess []*response.MasterStatusesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + masterStatusess = append(masterStatusess, mapper.MasterStatusesResponseMapper(result)) + } + + return +} + +func (_i *masterStatusesService) Show(id uint) (masterStatuses *response.MasterStatusesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.MasterStatusesResponseMapper(result), nil +} + +func (_i *masterStatusesService) Save(req request.MasterStatusesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *masterStatusesService) Update(id uint, req request.MasterStatusesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *masterStatusesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} \ No newline at end of file diff --git a/app/module/ppid_data_categories/controller/controller.go b/app/module/ppid_data_categories/controller/controller.go new file mode 100644 index 0000000..9504fff --- /dev/null +++ b/app/module/ppid_data_categories/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/ppid_data_categories/service" + +type Controller struct { + PpidDataCategories PpidDataCategoriesController +} + +func NewController(PpidDataCategoriesService service.PpidDataCategoriesService) *Controller { + return &Controller{ + PpidDataCategories: NewPpidDataCategoriesController(PpidDataCategoriesService), + } +} \ No newline at end of file diff --git a/app/module/ppid_data_categories/controller/ppid_data_categories.controller.go b/app/module/ppid_data_categories/controller/ppid_data_categories.controller.go new file mode 100644 index 0000000..1e5fefa --- /dev/null +++ b/app/module/ppid_data_categories/controller/ppid_data_categories.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_data_categories/request" + "go-humas-be/app/module/ppid_data_categories/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type ppidDataCategoriesController struct { + ppidDataCategoriesService service.PpidDataCategoriesService +} + +type PpidDataCategoriesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewPpidDataCategoriesController(ppidDataCategoriesService service.PpidDataCategoriesService) PpidDataCategoriesController { + return &ppidDataCategoriesController{ + ppidDataCategoriesService: ppidDataCategoriesService, + } +} + +// All get all PpidDataCategories +// @Summary Get all PpidDataCategories +// @Description API for getting all PpidDataCategories +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-categories [get] +func (_i *ppidDataCategoriesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.PpidDataCategoriesQueryRequest + req.Pagination = paginate + + ppidDataCategoriesData, paging, err := _i.ppidDataCategoriesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataCategories list successfully retrieved"}, + Data: ppidDataCategoriesData, + Meta: paging, + }) +} + +// Show get one PpidDataCategories +// @Summary Get one PpidDataCategories +// @Description API for getting one PpidDataCategories +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDataCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-categories/{id} [get] +func (_i *ppidDataCategoriesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + ppidDataCategoriesData, err := _i.ppidDataCategoriesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataCategories successfully retrieved"}, + Data: ppidDataCategoriesData, + }) +} + +// Save create PpidDataCategories +// @Summary Create PpidDataCategories +// @Description API for create PpidDataCategories +// @Tags Task +// @Security Bearer +// @Body request.PpidDataCategoriesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-categories [post] +func (_i *ppidDataCategoriesController) Save(c *fiber.Ctx) error { + req := new(request.PpidDataCategoriesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.ppidDataCategoriesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataCategories successfully created"}, + }) +} + +// Update update PpidDataCategories +// @Summary update PpidDataCategories +// @Description API for update PpidDataCategories +// @Tags Task +// @Security Bearer +// @Body request.PpidDataCategoriesUpdateRequest +// @Param id path int true "PpidDataCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-categories/{id} [put] +func (_i *ppidDataCategoriesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.PpidDataCategoriesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.ppidDataCategoriesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataCategories successfully updated"}, + }) +} + +// Delete delete PpidDataCategories +// @Summary delete PpidDataCategories +// @Description API for delete PpidDataCategories +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDataCategories ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-categories/{id} [delete] +func (_i *ppidDataCategoriesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.ppidDataCategoriesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataCategories successfully deleted"}, + }) +} diff --git a/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go b/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go new file mode 100644 index 0000000..23a44c9 --- /dev/null +++ b/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go @@ -0,0 +1,21 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/ppid_data_categories/response" +) + +func PpidDataCategoriesResponseMapper(ppidDataCategoriesReq *entity.PpidDataCategories) (ppidDataCategoriesRes *res.PpidDataCategoriesResponse) { + if ppidDataCategoriesReq != nil { + ppidDataCategoriesRes = &res.PpidDataCategoriesResponse{ + ID: ppidDataCategoriesReq.ID, + Title: ppidDataCategoriesReq.Title, + Description: ppidDataCategoriesReq.Description, + Slug: ppidDataCategoriesReq.Slug, + IsActive: ppidDataCategoriesReq.IsActive, + CreatedAt: ppidDataCategoriesReq.CreatedAt, + UpdatedAt: ppidDataCategoriesReq.UpdatedAt, + } + } + return ppidDataCategoriesRes +} \ No newline at end of file diff --git a/app/module/ppid_data_categories/ppid_data_categories.module.go b/app/module/ppid_data_categories/ppid_data_categories.module.go new file mode 100644 index 0000000..5fb9b7f --- /dev/null +++ b/app/module/ppid_data_categories/ppid_data_categories.module.go @@ -0,0 +1,53 @@ +package ppid_data_categories + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_data_categories/controller" + "go-humas-be/app/module/ppid_data_categories/repository" + "go-humas-be/app/module/ppid_data_categories/service" + "go.uber.org/fx" +) + +// struct of PpidDataCategoriesRouter +type PpidDataCategoriesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of PpidDataCategories module +var NewPpidDataCategoriesModule = fx.Options( + // register repository of PpidDataCategories module + fx.Provide(repository.NewPpidDataCategoriesRepository), + + // register service of PpidDataCategories module + fx.Provide(service.NewPpidDataCategoriesService), + + // register controller of PpidDataCategories module + fx.Provide(controller.NewController), + + // register router of PpidDataCategories module + fx.Provide(NewPpidDataCategoriesRouter), +) + +// init PpidDataCategoriesRouter +func NewPpidDataCategoriesRouter(fiber *fiber.App, controller *controller.Controller) *PpidDataCategoriesRouter { + return &PpidDataCategoriesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of PpidDataCategories module +func (_i *PpidDataCategoriesRouter) RegisterPpidDataCategoriesRoutes() { + // define controllers + ppidDataCategoriesController := _i.Controller.PpidDataCategories + + // define routes + _i.App.Route("/ppid-data-categories", func(router fiber.Router) { + router.Get("/", ppidDataCategoriesController.All) + router.Get("/:id", ppidDataCategoriesController.Show) + router.Post("/", ppidDataCategoriesController.Save) + router.Put("/:id", ppidDataCategoriesController.Update) + router.Delete("/:id", ppidDataCategoriesController.Delete) + }) +} diff --git a/app/module/ppid_data_categories/repository/ppid_data_categories.repository.go b/app/module/ppid_data_categories/repository/ppid_data_categories.repository.go new file mode 100644 index 0000000..da10a69 --- /dev/null +++ b/app/module/ppid_data_categories/repository/ppid_data_categories.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/ppid_data_categories/request" + "go-humas-be/utils/paginator" +) + +type ppidDataCategoriesRepository struct { + DB *database.Database +} + +// PpidDataCategoriesRepository define interface of IPpidDataCategoriesRepository +type PpidDataCategoriesRepository interface { + GetAll(req request.PpidDataCategoriesQueryRequest) (ppidDataCategoriess []*entity.PpidDataCategories, paging paginator.Pagination, err error) + FindOne(id uint) (ppidDataCategories *entity.PpidDataCategories, err error) + Create(ppidDataCategories *entity.PpidDataCategories) (err error) + Update(id uint, ppidDataCategories *entity.PpidDataCategories) (err error) + Delete(id uint) (err error) +} + +func NewPpidDataCategoriesRepository(db *database.Database) PpidDataCategoriesRepository { + return &ppidDataCategoriesRepository{ + DB: db, + } +} + +// implement interface of IPpidDataCategoriesRepository +func (_i *ppidDataCategoriesRepository) GetAll(req request.PpidDataCategoriesQueryRequest) (ppidDataCategoriess []*entity.PpidDataCategories, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.PpidDataCategories{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&ppidDataCategoriess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *ppidDataCategoriesRepository) FindOne(id uint) (ppidDataCategories *entity.PpidDataCategories, err error) { + if err := _i.DB.DB.First(&ppidDataCategories, id).Error; err != nil { + return nil, err + } + + return ppidDataCategories, nil +} + +func (_i *ppidDataCategoriesRepository) Create(ppidDataCategories *entity.PpidDataCategories) (err error) { + return _i.DB.DB.Create(ppidDataCategories).Error +} + +func (_i *ppidDataCategoriesRepository) Update(id uint, ppidDataCategories *entity.PpidDataCategories) (err error) { + return _i.DB.DB.Model(&entity.PpidDataCategories{}). + Where(&entity.PpidDataCategories{ID: id}). + Updates(ppidDataCategories).Error +} + +func (_i *ppidDataCategoriesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.PpidDataCategories{}, id).Error +} \ No newline at end of file diff --git a/app/module/ppid_data_categories/request/ppid_data_categories.request.go b/app/module/ppid_data_categories/request/ppid_data_categories.request.go new file mode 100644 index 0000000..54f4db0 --- /dev/null +++ b/app/module/ppid_data_categories/request/ppid_data_categories.request.go @@ -0,0 +1,57 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type PpidDataCategoriesGeneric interface { + ToEntity() +} + +type PpidDataCategoriesQueryRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + Slug string `json:"slug" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type PpidDataCategoriesCreateRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + Slug string `json:"slug" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req PpidDataCategoriesCreateRequest) ToEntity() *entity.PpidDataCategories { + return &entity.PpidDataCategories{ + Title: req.Title, + Description: req.Description, + Slug: req.Slug, + IsActive: req.IsActive, + } +} + +type PpidDataCategoriesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + Slug string `json:"slug" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req PpidDataCategoriesUpdateRequest) ToEntity() *entity.PpidDataCategories { + return &entity.PpidDataCategories{ + ID: req.ID, + Title: req.Title, + Description: req.Description, + Slug: req.Slug, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/ppid_data_categories/response/ppid_data_categories.response.go b/app/module/ppid_data_categories/response/ppid_data_categories.response.go new file mode 100644 index 0000000..490557d --- /dev/null +++ b/app/module/ppid_data_categories/response/ppid_data_categories.response.go @@ -0,0 +1,13 @@ +package response + +import "time" + +type PpidDataCategoriesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + Slug string `json:"slug"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/ppid_data_categories/service/ppid_data_categories.service.go b/app/module/ppid_data_categories/service/ppid_data_categories.service.go new file mode 100644 index 0000000..eca172d --- /dev/null +++ b/app/module/ppid_data_categories/service/ppid_data_categories.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/ppid_data_categories/mapper" + "go-humas-be/app/module/ppid_data_categories/repository" + "go-humas-be/app/module/ppid_data_categories/request" + "go-humas-be/app/module/ppid_data_categories/response" + "go-humas-be/utils/paginator" +) + +// PpidDataCategoriesService +type ppidDataCategoriesService struct { + Repo repository.PpidDataCategoriesRepository + Log zerolog.Logger +} + +// PpidDataCategoriesService define interface of IPpidDataCategoriesService +type PpidDataCategoriesService interface { + All(req request.PpidDataCategoriesQueryRequest) (ppidDataCategories []*response.PpidDataCategoriesResponse, paging paginator.Pagination, err error) + Show(id uint) (ppidDataCategories *response.PpidDataCategoriesResponse, err error) + Save(req request.PpidDataCategoriesCreateRequest) (err error) + Update(id uint, req request.PpidDataCategoriesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewPpidDataCategoriesService init PpidDataCategoriesService +func NewPpidDataCategoriesService(repo repository.PpidDataCategoriesRepository, log zerolog.Logger) PpidDataCategoriesService { + + return &ppidDataCategoriesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of PpidDataCategoriesService +func (_i *ppidDataCategoriesService) All(req request.PpidDataCategoriesQueryRequest) (ppidDataCategoriess []*response.PpidDataCategoriesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + ppidDataCategoriess = append(ppidDataCategoriess, mapper.PpidDataCategoriesResponseMapper(result)) + } + + return +} + +func (_i *ppidDataCategoriesService) Show(id uint) (ppidDataCategories *response.PpidDataCategoriesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.PpidDataCategoriesResponseMapper(result), nil +} + +func (_i *ppidDataCategoriesService) Save(req request.PpidDataCategoriesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *ppidDataCategoriesService) Update(id uint, req request.PpidDataCategoriesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *ppidDataCategoriesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/ppid_data_files/controller/controller.go b/app/module/ppid_data_files/controller/controller.go new file mode 100644 index 0000000..c36eac8 --- /dev/null +++ b/app/module/ppid_data_files/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/ppid_data_files/service" + +type Controller struct { + PpidDataFiles PpidDataFilesController +} + +func NewController(PpidDataFilesService service.PpidDataFilesService) *Controller { + return &Controller{ + PpidDataFiles: NewPpidDataFilesController(PpidDataFilesService), + } +} \ No newline at end of file diff --git a/app/module/ppid_data_files/controller/ppid_data_files.controller.go b/app/module/ppid_data_files/controller/ppid_data_files.controller.go new file mode 100644 index 0000000..befe52c --- /dev/null +++ b/app/module/ppid_data_files/controller/ppid_data_files.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_data_files/request" + "go-humas-be/app/module/ppid_data_files/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type ppidDataFilesController struct { + ppidDataFilesService service.PpidDataFilesService +} + +type PpidDataFilesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewPpidDataFilesController(ppidDataFilesService service.PpidDataFilesService) PpidDataFilesController { + return &ppidDataFilesController{ + ppidDataFilesService: ppidDataFilesService, + } +} + +// All get all PpidDataFiles +// @Summary Get all PpidDataFiles +// @Description API for getting all PpidDataFiles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-files [get] +func (_i *ppidDataFilesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.PpidDataFilesQueryRequest + req.Pagination = paginate + + ppidDataFilesData, paging, err := _i.ppidDataFilesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataFiles list successfully retrieved"}, + Data: ppidDataFilesData, + Meta: paging, + }) +} + +// Show get one PpidDataFiles +// @Summary Get one PpidDataFiles +// @Description API for getting one PpidDataFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDataFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-files/{id} [get] +func (_i *ppidDataFilesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + ppidDataFilesData, err := _i.ppidDataFilesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataFiles successfully retrieved"}, + Data: ppidDataFilesData, + }) +} + +// Save create PpidDataFiles +// @Summary Create PpidDataFiles +// @Description API for create PpidDataFiles +// @Tags Task +// @Security Bearer +// @Body request.PpidDataFilesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-files [post] +func (_i *ppidDataFilesController) Save(c *fiber.Ctx) error { + req := new(request.PpidDataFilesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.ppidDataFilesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataFiles successfully created"}, + }) +} + +// Update update PpidDataFiles +// @Summary update PpidDataFiles +// @Description API for update PpidDataFiles +// @Tags Task +// @Security Bearer +// @Body request.PpidDataFilesUpdateRequest +// @Param id path int true "PpidDataFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-files/{id} [put] +func (_i *ppidDataFilesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.PpidDataFilesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.ppidDataFilesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataFiles successfully updated"}, + }) +} + +// Delete delete PpidDataFiles +// @Summary delete PpidDataFiles +// @Description API for delete PpidDataFiles +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDataFiles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-data-files/{id} [delete] +func (_i *ppidDataFilesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.ppidDataFilesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDataFiles successfully deleted"}, + }) +} diff --git a/app/module/ppid_data_files/mapper/ppid_data_files.mapper.go b/app/module/ppid_data_files/mapper/ppid_data_files.mapper.go new file mode 100644 index 0000000..8cd1db0 --- /dev/null +++ b/app/module/ppid_data_files/mapper/ppid_data_files.mapper.go @@ -0,0 +1,28 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/ppid_data_files/response" +) + +func PpidDataFilesResponseMapper(ppidDataFilesReq *entity.PpidDataFiles) (ppidDataFilesRes *res.PpidDataFilesResponse) { + if ppidDataFilesReq != nil { + ppidDataFilesRes = &res.PpidDataFilesResponse{ + ID: ppidDataFilesReq.ID, + Title: ppidDataFilesReq.Title, + PpidDataId: ppidDataFilesReq.PpidDataId, + Description: ppidDataFilesReq.Description, + Unit: ppidDataFilesReq.Unit, + FileType: ppidDataFilesReq.FileType, + DownloadCount: ppidDataFilesReq.DownloadCount, + CreatedById: ppidDataFilesReq.CreatedById, + StatusId: ppidDataFilesReq.StatusId, + IsPublish: ppidDataFilesReq.IsPublish, + PublishedAt: ppidDataFilesReq.PublishedAt, + IsActive: ppidDataFilesReq.IsActive, + CreatedAt: ppidDataFilesReq.CreatedAt, + UpdatedAt: ppidDataFilesReq.UpdatedAt, + } + } + return ppidDataFilesRes +} \ No newline at end of file diff --git a/app/module/ppid_data_files/ppid_data_files.module.go b/app/module/ppid_data_files/ppid_data_files.module.go new file mode 100644 index 0000000..95c3f11 --- /dev/null +++ b/app/module/ppid_data_files/ppid_data_files.module.go @@ -0,0 +1,53 @@ +package ppid_data_files + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_data_files/controller" + "go-humas-be/app/module/ppid_data_files/repository" + "go-humas-be/app/module/ppid_data_files/service" + "go.uber.org/fx" +) + +// struct of PpidDataFilesRouter +type PpidDataFilesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of PpidDataFiles module +var NewPpidDataFilesModule = fx.Options( + // register repository of PpidDataFiles module + fx.Provide(repository.NewPpidDataFilesRepository), + + // register service of PpidDataFiles module + fx.Provide(service.NewPpidDataFilesService), + + // register controller of PpidDataFiles module + fx.Provide(controller.NewController), + + // register router of PpidDataFiles module + fx.Provide(NewPpidDataFilesRouter), +) + +// init PpidDataFilesRouter +func NewPpidDataFilesRouter(fiber *fiber.App, controller *controller.Controller) *PpidDataFilesRouter { + return &PpidDataFilesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of PpidDataFiles module +func (_i *PpidDataFilesRouter) RegisterPpidDataFilesRoutes() { + // define controllers + ppidDataFilesController := _i.Controller.PpidDataFiles + + // define routes + _i.App.Route("/ppid-data-files", func(router fiber.Router) { + router.Get("/", ppidDataFilesController.All) + router.Get("/:id", ppidDataFilesController.Show) + router.Post("/", ppidDataFilesController.Save) + router.Put("/:id", ppidDataFilesController.Update) + router.Delete("/:id", ppidDataFilesController.Delete) + }) +} diff --git a/app/module/ppid_data_files/repository/ppid_data_files.repository.go b/app/module/ppid_data_files/repository/ppid_data_files.repository.go new file mode 100644 index 0000000..a7241b1 --- /dev/null +++ b/app/module/ppid_data_files/repository/ppid_data_files.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/ppid_data_files/request" + "go-humas-be/utils/paginator" +) + +type ppidDataFilesRepository struct { + DB *database.Database +} + +// PpidDataFilesRepository define interface of IPpidDataFilesRepository +type PpidDataFilesRepository interface { + GetAll(req request.PpidDataFilesQueryRequest) (ppidDataFiless []*entity.PpidDataFiles, paging paginator.Pagination, err error) + FindOne(id uint) (ppidDataFiles *entity.PpidDataFiles, err error) + Create(ppidDataFiles *entity.PpidDataFiles) (err error) + Update(id uint, ppidDataFiles *entity.PpidDataFiles) (err error) + Delete(id uint) (err error) +} + +func NewPpidDataFilesRepository(db *database.Database) PpidDataFilesRepository { + return &ppidDataFilesRepository{ + DB: db, + } +} + +// implement interface of IPpidDataFilesRepository +func (_i *ppidDataFilesRepository) GetAll(req request.PpidDataFilesQueryRequest) (ppidDataFiless []*entity.PpidDataFiles, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.PpidDataFiles{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&ppidDataFiless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *ppidDataFilesRepository) FindOne(id uint) (ppidDataFiles *entity.PpidDataFiles, err error) { + if err := _i.DB.DB.First(&ppidDataFiles, id).Error; err != nil { + return nil, err + } + + return ppidDataFiles, nil +} + +func (_i *ppidDataFilesRepository) Create(ppidDataFiles *entity.PpidDataFiles) (err error) { + return _i.DB.DB.Create(ppidDataFiles).Error +} + +func (_i *ppidDataFilesRepository) Update(id uint, ppidDataFiles *entity.PpidDataFiles) (err error) { + return _i.DB.DB.Model(&entity.PpidDataFiles{}). + Where(&entity.PpidDataFiles{ID: id}). + Updates(ppidDataFiles).Error +} + +func (_i *ppidDataFilesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.PpidDataFiles{}, id).Error +} \ No newline at end of file diff --git a/app/module/ppid_data_files/request/ppid_data_files.request.go b/app/module/ppid_data_files/request/ppid_data_files.request.go new file mode 100644 index 0000000..506bfb7 --- /dev/null +++ b/app/module/ppid_data_files/request/ppid_data_files.request.go @@ -0,0 +1,92 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type PpidDataFilesGeneric interface { + ToEntity() +} + +type PpidDataFilesQueryRequest struct { + Title string `json:"title" validate:"required"` + PpidDataId int `json:"ppid_data_id" validate:"required"` + Description string `json:"description" validate:"required"` + Unit string `json:"unit" validate:"required"` + FileType string `json:"file_type" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type PpidDataFilesCreateRequest struct { + Title string `json:"title" validate:"required"` + PpidDataId int `json:"ppid_data_id" validate:"required"` + Description string `json:"description" validate:"required"` + Unit string `json:"unit" validate:"required"` + FileType string `json:"file_type" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req PpidDataFilesCreateRequest) ToEntity() *entity.PpidDataFiles { + return &entity.PpidDataFiles{ + Title: req.Title, + PpidDataId: req.PpidDataId, + Description: req.Description, + Unit: req.Unit, + FileType: req.FileType, + DownloadCount: req.DownloadCount, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type PpidDataFilesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + PpidDataId int `json:"ppid_data_id" validate:"required"` + Description string `json:"description" validate:"required"` + Unit string `json:"unit" validate:"required"` + FileType string `json:"file_type" validate:"required"` + DownloadCount int `json:"download_count" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req PpidDataFilesUpdateRequest) ToEntity() *entity.PpidDataFiles { + return &entity.PpidDataFiles{ + ID: req.ID, + Title: req.Title, + PpidDataId: req.PpidDataId, + Description: req.Description, + Unit: req.Unit, + FileType: req.FileType, + DownloadCount: req.DownloadCount, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/ppid_data_files/response/ppid_data_files.response.go b/app/module/ppid_data_files/response/ppid_data_files.response.go new file mode 100644 index 0000000..8ce456c --- /dev/null +++ b/app/module/ppid_data_files/response/ppid_data_files.response.go @@ -0,0 +1,20 @@ +package response + +import "time" + +type PpidDataFilesResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + PpidDataId int `json:"ppid_data_id"` + Description string `json:"description"` + Unit string `json:"unit"` + FileType string `json:"file_type"` + DownloadCount int `json:"download_count"` + CreatedById int `json:"created_by_id"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/ppid_data_files/service/ppid_data_files.service.go b/app/module/ppid_data_files/service/ppid_data_files.service.go new file mode 100644 index 0000000..84b0621 --- /dev/null +++ b/app/module/ppid_data_files/service/ppid_data_files.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/ppid_data_files/mapper" + "go-humas-be/app/module/ppid_data_files/repository" + "go-humas-be/app/module/ppid_data_files/request" + "go-humas-be/app/module/ppid_data_files/response" + "go-humas-be/utils/paginator" +) + +// PpidDataFilesService +type ppidDataFilesService struct { + Repo repository.PpidDataFilesRepository + Log zerolog.Logger +} + +// PpidDataFilesService define interface of IPpidDataFilesService +type PpidDataFilesService interface { + All(req request.PpidDataFilesQueryRequest) (ppidDataFiles []*response.PpidDataFilesResponse, paging paginator.Pagination, err error) + Show(id uint) (ppidDataFiles *response.PpidDataFilesResponse, err error) + Save(req request.PpidDataFilesCreateRequest) (err error) + Update(id uint, req request.PpidDataFilesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewPpidDataFilesService init PpidDataFilesService +func NewPpidDataFilesService(repo repository.PpidDataFilesRepository, log zerolog.Logger) PpidDataFilesService { + + return &ppidDataFilesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of PpidDataFilesService +func (_i *ppidDataFilesService) All(req request.PpidDataFilesQueryRequest) (ppidDataFiless []*response.PpidDataFilesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + ppidDataFiless = append(ppidDataFiless, mapper.PpidDataFilesResponseMapper(result)) + } + + return +} + +func (_i *ppidDataFilesService) Show(id uint) (ppidDataFiles *response.PpidDataFilesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.PpidDataFilesResponseMapper(result), nil +} + +func (_i *ppidDataFilesService) Save(req request.PpidDataFilesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *ppidDataFilesService) Update(id uint, req request.PpidDataFilesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *ppidDataFilesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/ppid_datas/controller/controller.go b/app/module/ppid_datas/controller/controller.go new file mode 100644 index 0000000..4479ed2 --- /dev/null +++ b/app/module/ppid_datas/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/ppid_datas/service" + +type Controller struct { + PpidDatas PpidDatasController +} + +func NewController(PpidDatasService service.PpidDatasService) *Controller { + return &Controller{ + PpidDatas: NewPpidDatasController(PpidDatasService), + } +} \ No newline at end of file diff --git a/app/module/ppid_datas/controller/ppid_datas.controller.go b/app/module/ppid_datas/controller/ppid_datas.controller.go new file mode 100644 index 0000000..49cb509 --- /dev/null +++ b/app/module/ppid_datas/controller/ppid_datas.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_datas/request" + "go-humas-be/app/module/ppid_datas/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type ppidDatasController struct { + ppidDatasService service.PpidDatasService +} + +type PpidDatasController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewPpidDatasController(ppidDatasService service.PpidDatasService) PpidDatasController { + return &ppidDatasController{ + ppidDatasService: ppidDatasService, + } +} + +// All get all PpidDatas +// @Summary Get all PpidDatas +// @Description API for getting all PpidDatas +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-datas [get] +func (_i *ppidDatasController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.PpidDatasQueryRequest + req.Pagination = paginate + + ppidDatasData, paging, err := _i.ppidDatasService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDatas list successfully retrieved"}, + Data: ppidDatasData, + Meta: paging, + }) +} + +// Show get one PpidDatas +// @Summary Get one PpidDatas +// @Description API for getting one PpidDatas +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDatas ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-datas/{id} [get] +func (_i *ppidDatasController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + ppidDatasData, err := _i.ppidDatasService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDatas successfully retrieved"}, + Data: ppidDatasData, + }) +} + +// Save create PpidDatas +// @Summary Create PpidDatas +// @Description API for create PpidDatas +// @Tags Task +// @Security Bearer +// @Body request.PpidDatasCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-datas [post] +func (_i *ppidDatasController) Save(c *fiber.Ctx) error { + req := new(request.PpidDatasCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.ppidDatasService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDatas successfully created"}, + }) +} + +// Update update PpidDatas +// @Summary update PpidDatas +// @Description API for update PpidDatas +// @Tags Task +// @Security Bearer +// @Body request.PpidDatasUpdateRequest +// @Param id path int true "PpidDatas ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-datas/{id} [put] +func (_i *ppidDatasController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.PpidDatasUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.ppidDatasService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDatas successfully updated"}, + }) +} + +// Delete delete PpidDatas +// @Summary delete PpidDatas +// @Description API for delete PpidDatas +// @Tags Task +// @Security Bearer +// @Param id path int true "PpidDatas ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /ppid-datas/{id} [delete] +func (_i *ppidDatasController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.ppidDatasService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"PpidDatas successfully deleted"}, + }) +} diff --git a/app/module/ppid_datas/mapper/ppid_datas.mapper.go b/app/module/ppid_datas/mapper/ppid_datas.mapper.go new file mode 100644 index 0000000..b7f398d --- /dev/null +++ b/app/module/ppid_datas/mapper/ppid_datas.mapper.go @@ -0,0 +1,25 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/ppid_datas/response" +) + +func PpidDatasResponseMapper(ppidDatasReq *entity.PpidDatas) (ppidDatasRes *res.PpidDatasResponse) { + if ppidDatasReq != nil { + ppidDatasRes = &res.PpidDatasResponse{ + ID: ppidDatasReq.ID, + Title: ppidDatasReq.Title, + Description: ppidDatasReq.Description, + CategoryId: ppidDatasReq.CategoryId, + CreatedById: ppidDatasReq.CreatedById, + StatusId: ppidDatasReq.StatusId, + IsPublish: ppidDatasReq.IsPublish, + PublishedAt: ppidDatasReq.PublishedAt, + IsActive: ppidDatasReq.IsActive, + CreatedAt: ppidDatasReq.CreatedAt, + UpdatedAt: ppidDatasReq.UpdatedAt, + } + } + return ppidDatasRes +} \ No newline at end of file diff --git a/app/module/ppid_datas/ppid_datas.module.go b/app/module/ppid_datas/ppid_datas.module.go new file mode 100644 index 0000000..ebe3046 --- /dev/null +++ b/app/module/ppid_datas/ppid_datas.module.go @@ -0,0 +1,53 @@ +package ppid_datas + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/ppid_datas/controller" + "go-humas-be/app/module/ppid_datas/repository" + "go-humas-be/app/module/ppid_datas/service" + "go.uber.org/fx" +) + +// struct of PpidDatasRouter +type PpidDatasRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of PpidDatas module +var NewPpidDatasModule = fx.Options( + // register repository of PpidDatas module + fx.Provide(repository.NewPpidDatasRepository), + + // register service of PpidDatas module + fx.Provide(service.NewPpidDatasService), + + // register controller of PpidDatas module + fx.Provide(controller.NewController), + + // register router of PpidDatas module + fx.Provide(NewPpidDatasRouter), +) + +// init PpidDatasRouter +func NewPpidDatasRouter(fiber *fiber.App, controller *controller.Controller) *PpidDatasRouter { + return &PpidDatasRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of PpidDatas module +func (_i *PpidDatasRouter) RegisterPpidDatasRoutes() { + // define controllers + ppidDatasController := _i.Controller.PpidDatas + + // define routes + _i.App.Route("/ppid-datas", func(router fiber.Router) { + router.Get("/", ppidDatasController.All) + router.Get("/:id", ppidDatasController.Show) + router.Post("/", ppidDatasController.Save) + router.Put("/:id", ppidDatasController.Update) + router.Delete("/:id", ppidDatasController.Delete) + }) +} diff --git a/app/module/ppid_datas/repository/ppid_datas.repository.go b/app/module/ppid_datas/repository/ppid_datas.repository.go new file mode 100644 index 0000000..35ac92b --- /dev/null +++ b/app/module/ppid_datas/repository/ppid_datas.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/ppid_datas/request" + "go-humas-be/utils/paginator" +) + +type ppidDatasRepository struct { + DB *database.Database +} + +// PpidDatasRepository define interface of IPpidDatasRepository +type PpidDatasRepository interface { + GetAll(req request.PpidDatasQueryRequest) (ppidDatass []*entity.PpidDatas, paging paginator.Pagination, err error) + FindOne(id uint) (ppidDatas *entity.PpidDatas, err error) + Create(ppidDatas *entity.PpidDatas) (err error) + Update(id uint, ppidDatas *entity.PpidDatas) (err error) + Delete(id uint) (err error) +} + +func NewPpidDatasRepository(db *database.Database) PpidDatasRepository { + return &ppidDatasRepository{ + DB: db, + } +} + +// implement interface of IPpidDatasRepository +func (_i *ppidDatasRepository) GetAll(req request.PpidDatasQueryRequest) (ppidDatass []*entity.PpidDatas, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.PpidDatas{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&ppidDatass).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *ppidDatasRepository) FindOne(id uint) (ppidDatas *entity.PpidDatas, err error) { + if err := _i.DB.DB.First(&ppidDatas, id).Error; err != nil { + return nil, err + } + + return ppidDatas, nil +} + +func (_i *ppidDatasRepository) Create(ppidDatas *entity.PpidDatas) (err error) { + return _i.DB.DB.Create(ppidDatas).Error +} + +func (_i *ppidDatasRepository) Update(id uint, ppidDatas *entity.PpidDatas) (err error) { + return _i.DB.DB.Model(&entity.PpidDatas{}). + Where(&entity.PpidDatas{ID: id}). + Updates(ppidDatas).Error +} + +func (_i *ppidDatasRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.PpidDatas{}, id).Error +} \ No newline at end of file diff --git a/app/module/ppid_datas/request/ppid_datas.request.go b/app/module/ppid_datas/request/ppid_datas.request.go new file mode 100644 index 0000000..180a70c --- /dev/null +++ b/app/module/ppid_datas/request/ppid_datas.request.go @@ -0,0 +1,77 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type PpidDatasGeneric interface { + ToEntity() +} + +type PpidDatasQueryRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type PpidDatasCreateRequest struct { + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req PpidDatasCreateRequest) ToEntity() *entity.PpidDatas { + return &entity.PpidDatas{ + Title: req.Title, + Description: req.Description, + CategoryId: req.CategoryId, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + } +} + +type PpidDatasUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + CategoryId int `json:"category_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + IsPublish bool `json:"is_publish" validate:"required"` + PublishedAt time.Time `json:"published_at" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req PpidDatasUpdateRequest) ToEntity() *entity.PpidDatas { + return &entity.PpidDatas{ + ID: req.ID, + Title: req.Title, + Description: req.Description, + CategoryId: req.CategoryId, + CreatedById: req.CreatedById, + StatusId: req.StatusId, + IsPublish: req.IsPublish, + PublishedAt: req.PublishedAt, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/ppid_datas/response/ppid_datas.response.go b/app/module/ppid_datas/response/ppid_datas.response.go new file mode 100644 index 0000000..0abb484 --- /dev/null +++ b/app/module/ppid_datas/response/ppid_datas.response.go @@ -0,0 +1,17 @@ +package response + +import "time" + +type PpidDatasResponse struct { + ID uint `json:"id"` + Title string `json:"title"` + Description string `json:"description"` + CategoryId int `json:"category_id"` + CreatedById int `json:"created_by_id"` + StatusId int `json:"status_id"` + IsPublish bool `json:"is_publish"` + PublishedAt time.Time `json:"published_at"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/ppid_datas/service/ppid_datas.service.go b/app/module/ppid_datas/service/ppid_datas.service.go new file mode 100644 index 0000000..914e081 --- /dev/null +++ b/app/module/ppid_datas/service/ppid_datas.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/ppid_datas/mapper" + "go-humas-be/app/module/ppid_datas/repository" + "go-humas-be/app/module/ppid_datas/request" + "go-humas-be/app/module/ppid_datas/response" + "go-humas-be/utils/paginator" +) + +// PpidDatasService +type ppidDatasService struct { + Repo repository.PpidDatasRepository + Log zerolog.Logger +} + +// PpidDatasService define interface of IPpidDatasService +type PpidDatasService interface { + All(req request.PpidDatasQueryRequest) (ppidDatas []*response.PpidDatasResponse, paging paginator.Pagination, err error) + Show(id uint) (ppidDatas *response.PpidDatasResponse, err error) + Save(req request.PpidDatasCreateRequest) (err error) + Update(id uint, req request.PpidDatasUpdateRequest) (err error) + Delete(id uint) error +} + +// NewPpidDatasService init PpidDatasService +func NewPpidDatasService(repo repository.PpidDatasRepository, log zerolog.Logger) PpidDatasService { + + return &ppidDatasService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of PpidDatasService +func (_i *ppidDatasService) All(req request.PpidDatasQueryRequest) (ppidDatass []*response.PpidDatasResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + ppidDatass = append(ppidDatass, mapper.PpidDatasResponseMapper(result)) + } + + return +} + +func (_i *ppidDatasService) Show(id uint) (ppidDatas *response.PpidDatasResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.PpidDatasResponseMapper(result), nil +} + +func (_i *ppidDatasService) Save(req request.PpidDatasCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *ppidDatasService) Update(id uint, req request.PpidDatasUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *ppidDatasService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/provinces/controller/controller.go b/app/module/provinces/controller/controller.go new file mode 100644 index 0000000..8882051 --- /dev/null +++ b/app/module/provinces/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/provinces/service" + +type Controller struct { + Provinces ProvincesController +} + +func NewController(ProvincesService service.ProvincesService) *Controller { + return &Controller{ + Provinces: NewProvincesController(ProvincesService), + } +} \ No newline at end of file diff --git a/app/module/provinces/controller/provinces.controller.go b/app/module/provinces/controller/provinces.controller.go new file mode 100644 index 0000000..86a4404 --- /dev/null +++ b/app/module/provinces/controller/provinces.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/provinces/request" + "go-humas-be/app/module/provinces/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type provincesController struct { + provincesService service.ProvincesService +} + +type ProvincesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewProvincesController(provincesService service.ProvincesService) ProvincesController { + return &provincesController{ + provincesService: provincesService, + } +} + +// All get all Provinces +// @Summary Get all Provinces +// @Description API for getting all Provinces +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /provinces [get] +func (_i *provincesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.ProvincesQueryRequest + req.Pagination = paginate + + provincesData, paging, err := _i.provincesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Provinces list successfully retrieved"}, + Data: provincesData, + Meta: paging, + }) +} + +// Show get one Provinces +// @Summary Get one Provinces +// @Description API for getting one Provinces +// @Tags Task +// @Security Bearer +// @Param id path int true "Provinces ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /provinces/{id} [get] +func (_i *provincesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + provincesData, err := _i.provincesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Provinces successfully retrieved"}, + Data: provincesData, + }) +} + +// Save create Provinces +// @Summary Create Provinces +// @Description API for create Provinces +// @Tags Task +// @Security Bearer +// @Body request.ProvincesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /provinces [post] +func (_i *provincesController) Save(c *fiber.Ctx) error { + req := new(request.ProvincesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.provincesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Provinces successfully created"}, + }) +} + +// Update update Provinces +// @Summary update Provinces +// @Description API for update Provinces +// @Tags Task +// @Security Bearer +// @Body request.ProvincesUpdateRequest +// @Param id path int true "Provinces ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /provinces/{id} [put] +func (_i *provincesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.ProvincesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.provincesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Provinces successfully updated"}, + }) +} + +// Delete delete Provinces +// @Summary delete Provinces +// @Description API for delete Provinces +// @Tags Task +// @Security Bearer +// @Param id path int true "Provinces ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /provinces/{id} [delete] +func (_i *provincesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.provincesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Provinces successfully deleted"}, + }) +} diff --git a/app/module/provinces/mapper/provinces.mapper.go b/app/module/provinces/mapper/provinces.mapper.go new file mode 100644 index 0000000..c2eab1a --- /dev/null +++ b/app/module/provinces/mapper/provinces.mapper.go @@ -0,0 +1,19 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/provinces/response" +) + +func ProvincesResponseMapper(provincesReq *entity.Provinces) (provincesRes *res.ProvincesResponse) { + if provincesReq != nil { + provincesRes = &res.ProvincesResponse{ + ID: provincesReq.ID, + ProvName: provincesReq.ProvName, + LocationId: provincesReq.LocationId, + Status: provincesReq.Status, + Timezone: provincesReq.Timezone, + } + } + return provincesRes +} \ No newline at end of file diff --git a/app/module/provinces/provinces.module.go b/app/module/provinces/provinces.module.go new file mode 100644 index 0000000..8c2bd8b --- /dev/null +++ b/app/module/provinces/provinces.module.go @@ -0,0 +1,53 @@ +package provinces + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/provinces/controller" + "go-humas-be/app/module/provinces/repository" + "go-humas-be/app/module/provinces/service" + "go.uber.org/fx" +) + +// struct of ProvincesRouter +type ProvincesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of Provinces module +var NewProvincesModule = fx.Options( + // register repository of Provinces module + fx.Provide(repository.NewProvincesRepository), + + // register service of Provinces module + fx.Provide(service.NewProvincesService), + + // register controller of Provinces module + fx.Provide(controller.NewController), + + // register router of Provinces module + fx.Provide(NewProvincesRouter), +) + +// init ProvincesRouter +func NewProvincesRouter(fiber *fiber.App, controller *controller.Controller) *ProvincesRouter { + return &ProvincesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of Provinces module +func (_i *ProvincesRouter) RegisterProvincesRoutes() { + // define controllers + provincesController := _i.Controller.Provinces + + // define routes + _i.App.Route("/provinces", func(router fiber.Router) { + router.Get("/", provincesController.All) + router.Get("/:id", provincesController.Show) + router.Post("/", provincesController.Save) + router.Put("/:id", provincesController.Update) + router.Delete("/:id", provincesController.Delete) + }) +} diff --git a/app/module/provinces/repository/provinces.repository.go b/app/module/provinces/repository/provinces.repository.go new file mode 100644 index 0000000..69a02a9 --- /dev/null +++ b/app/module/provinces/repository/provinces.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/provinces/request" + "go-humas-be/utils/paginator" +) + +type provincesRepository struct { + DB *database.Database +} + +// ProvincesRepository define interface of IProvincesRepository +type ProvincesRepository interface { + GetAll(req request.ProvincesQueryRequest) (provincess []*entity.Provinces, paging paginator.Pagination, err error) + FindOne(id uint) (provinces *entity.Provinces, err error) + Create(provinces *entity.Provinces) (err error) + Update(id uint, provinces *entity.Provinces) (err error) + Delete(id uint) (err error) +} + +func NewProvincesRepository(db *database.Database) ProvincesRepository { + return &provincesRepository{ + DB: db, + } +} + +// implement interface of IProvincesRepository +func (_i *provincesRepository) GetAll(req request.ProvincesQueryRequest) (provincess []*entity.Provinces, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Provinces{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&provincess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *provincesRepository) FindOne(id uint) (provinces *entity.Provinces, err error) { + if err := _i.DB.DB.First(&provinces, id).Error; err != nil { + return nil, err + } + + return provinces, nil +} + +func (_i *provincesRepository) Create(provinces *entity.Provinces) (err error) { + return _i.DB.DB.Create(provinces).Error +} + +func (_i *provincesRepository) Update(id uint, provinces *entity.Provinces) (err error) { + return _i.DB.DB.Model(&entity.Provinces{}). + Where(&entity.Provinces{ID: id}). + Updates(provinces).Error +} + +func (_i *provincesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Provinces{}, id).Error +} \ No newline at end of file diff --git a/app/module/provinces/request/provinces.request.go b/app/module/provinces/request/provinces.request.go new file mode 100644 index 0000000..25f3648 --- /dev/null +++ b/app/module/provinces/request/provinces.request.go @@ -0,0 +1,53 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" +) + +type ProvincesGeneric interface { + ToEntity() +} + +type ProvincesQueryRequest struct { + ProvName string `json:"prov_name" validate:"required"` + LocationId int `json:"location_id" validate:"required"` + Status int `json:"status" validate:"required"` + Timezone string `json:"timezone" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type ProvincesCreateRequest struct { + ProvName string `json:"prov_name" validate:"required"` + LocationId int `json:"location_id" validate:"required"` + Status int `json:"status" validate:"required"` + Timezone string `json:"timezone" validate:"required"` +} + +func (req ProvincesCreateRequest) ToEntity() *entity.Provinces { + return &entity.Provinces{ + ProvName: req.ProvName, + LocationId: req.LocationId, + Status: req.Status, + Timezone: req.Timezone, + } +} + +type ProvincesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + ProvName string `json:"prov_name" validate:"required"` + LocationId int `json:"location_id" validate:"required"` + Status int `json:"status" validate:"required"` + Timezone string `json:"timezone" validate:"required"` +} + +func (req ProvincesUpdateRequest) ToEntity() *entity.Provinces { + return &entity.Provinces{ + ID: req.ID, + ProvName: req.ProvName, + LocationId: req.LocationId, + Status: req.Status, + Timezone: req.Timezone, + } +} \ No newline at end of file diff --git a/app/module/provinces/response/provinces.response.go b/app/module/provinces/response/provinces.response.go new file mode 100644 index 0000000..0bfb39a --- /dev/null +++ b/app/module/provinces/response/provinces.response.go @@ -0,0 +1,9 @@ +package response + +type ProvincesResponse struct { + ID uint `json:"id"` + ProvName string `json:"prov_name"` + LocationId int `json:"location_id"` + Status int `json:"status"` + Timezone string `json:"timezone"` +} diff --git a/app/module/provinces/service/provinces.service.go b/app/module/provinces/service/provinces.service.go new file mode 100644 index 0000000..8231ed4 --- /dev/null +++ b/app/module/provinces/service/provinces.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/provinces/mapper" + "go-humas-be/app/module/provinces/repository" + "go-humas-be/app/module/provinces/request" + "go-humas-be/app/module/provinces/response" + "go-humas-be/utils/paginator" +) + +// ProvincesService +type provincesService struct { + Repo repository.ProvincesRepository + Log zerolog.Logger +} + +// ProvincesService define interface of IProvincesService +type ProvincesService interface { + All(req request.ProvincesQueryRequest) (provinces []*response.ProvincesResponse, paging paginator.Pagination, err error) + Show(id uint) (provinces *response.ProvincesResponse, err error) + Save(req request.ProvincesCreateRequest) (err error) + Update(id uint, req request.ProvincesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewProvincesService init ProvincesService +func NewProvincesService(repo repository.ProvincesRepository, log zerolog.Logger) ProvincesService { + + return &provincesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of ProvincesService +func (_i *provincesService) All(req request.ProvincesQueryRequest) (provincess []*response.ProvincesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + provincess = append(provincess, mapper.ProvincesResponseMapper(result)) + } + + return +} + +func (_i *provincesService) Show(id uint) (provinces *response.ProvincesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.ProvincesResponseMapper(result), nil +} + +func (_i *provincesService) Save(req request.ProvincesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *provincesService) Update(id uint, req request.ProvincesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *provincesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/user_levels/controller/controller.go b/app/module/user_levels/controller/controller.go new file mode 100644 index 0000000..d435da8 --- /dev/null +++ b/app/module/user_levels/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/user_levels/service" + +type Controller struct { + UserLevels UserLevelsController +} + +func NewController(UserLevelsService service.UserLevelsService) *Controller { + return &Controller{ + UserLevels: NewUserLevelsController(UserLevelsService), + } +} \ No newline at end of file diff --git a/app/module/user_levels/controller/user_levels.controller.go b/app/module/user_levels/controller/user_levels.controller.go new file mode 100644 index 0000000..5d29eb6 --- /dev/null +++ b/app/module/user_levels/controller/user_levels.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_levels/request" + "go-humas-be/app/module/user_levels/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type userLevelsController struct { + userLevelsService service.UserLevelsService +} + +type UserLevelsController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewUserLevelsController(userLevelsService service.UserLevelsService) UserLevelsController { + return &userLevelsController{ + userLevelsService: userLevelsService, + } +} + +// All get all UserLevels +// @Summary Get all UserLevels +// @Description API for getting all UserLevels +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-levels [get] +func (_i *userLevelsController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.UserLevelsQueryRequest + req.Pagination = paginate + + userLevelsData, paging, err := _i.userLevelsService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserLevels list successfully retrieved"}, + Data: userLevelsData, + Meta: paging, + }) +} + +// Show get one UserLevels +// @Summary Get one UserLevels +// @Description API for getting one UserLevels +// @Tags Task +// @Security Bearer +// @Param id path int true "UserLevels ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-levels/{id} [get] +func (_i *userLevelsController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + userLevelsData, err := _i.userLevelsService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserLevels successfully retrieved"}, + Data: userLevelsData, + }) +} + +// Save create UserLevels +// @Summary Create UserLevels +// @Description API for create UserLevels +// @Tags Task +// @Security Bearer +// @Body request.UserLevelsCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-levels [post] +func (_i *userLevelsController) Save(c *fiber.Ctx) error { + req := new(request.UserLevelsCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.userLevelsService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserLevels successfully created"}, + }) +} + +// Update update UserLevels +// @Summary update UserLevels +// @Description API for update UserLevels +// @Tags Task +// @Security Bearer +// @Body request.UserLevelsUpdateRequest +// @Param id path int true "UserLevels ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-levels/{id} [put] +func (_i *userLevelsController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.UserLevelsUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.userLevelsService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserLevels successfully updated"}, + }) +} + +// Delete delete UserLevels +// @Summary delete UserLevels +// @Description API for delete UserLevels +// @Tags Task +// @Security Bearer +// @Param id path int true "UserLevels ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-levels/{id} [delete] +func (_i *userLevelsController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.userLevelsService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserLevels successfully deleted"}, + }) +} diff --git a/app/module/user_levels/mapper/user_levels.mapper.go b/app/module/user_levels/mapper/user_levels.mapper.go new file mode 100644 index 0000000..00a325d --- /dev/null +++ b/app/module/user_levels/mapper/user_levels.mapper.go @@ -0,0 +1,23 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/user_levels/response" +) + +func UserLevelsResponseMapper(userLevelsReq *entity.UserLevels) (userLevelsRes *res.UserLevelsResponse) { + if userLevelsReq != nil { + userLevelsRes = &res.UserLevelsResponse{ + ID: userLevelsReq.ID, + Name: userLevelsReq.Name, + AliasName: userLevelsReq.AliasName, + LevelNumber: userLevelsReq.LevelNumber, + ParentLevelId: userLevelsReq.ParentLevelId, + ProvinceId: userLevelsReq.ProvinceId, + IsActive: userLevelsReq.IsActive, + CreatedAt: userLevelsReq.CreatedAt, + UpdatedAt: userLevelsReq.UpdatedAt, + } + } + return userLevelsRes +} \ No newline at end of file diff --git a/app/module/user_levels/repository/user_levels.repository.go b/app/module/user_levels/repository/user_levels.repository.go new file mode 100644 index 0000000..660d8b8 --- /dev/null +++ b/app/module/user_levels/repository/user_levels.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/user_levels/request" + "go-humas-be/utils/paginator" +) + +type userLevelsRepository struct { + DB *database.Database +} + +// UserLevelsRepository define interface of IUserLevelsRepository +type UserLevelsRepository interface { + GetAll(req request.UserLevelsQueryRequest) (userLevelss []*entity.UserLevels, paging paginator.Pagination, err error) + FindOne(id uint) (userLevels *entity.UserLevels, err error) + Create(userLevels *entity.UserLevels) (err error) + Update(id uint, userLevels *entity.UserLevels) (err error) + Delete(id uint) (err error) +} + +func NewUserLevelsRepository(db *database.Database) UserLevelsRepository { + return &userLevelsRepository{ + DB: db, + } +} + +// implement interface of IUserLevelsRepository +func (_i *userLevelsRepository) GetAll(req request.UserLevelsQueryRequest) (userLevelss []*entity.UserLevels, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.UserLevels{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&userLevelss).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *userLevelsRepository) FindOne(id uint) (userLevels *entity.UserLevels, err error) { + if err := _i.DB.DB.First(&userLevels, id).Error; err != nil { + return nil, err + } + + return userLevels, nil +} + +func (_i *userLevelsRepository) Create(userLevels *entity.UserLevels) (err error) { + return _i.DB.DB.Create(userLevels).Error +} + +func (_i *userLevelsRepository) Update(id uint, userLevels *entity.UserLevels) (err error) { + return _i.DB.DB.Model(&entity.UserLevels{}). + Where(&entity.UserLevels{ID: id}). + Updates(userLevels).Error +} + +func (_i *userLevelsRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.UserLevels{}, id).Error +} \ No newline at end of file diff --git a/app/module/user_levels/request/user_levels.request.go b/app/module/user_levels/request/user_levels.request.go new file mode 100644 index 0000000..aaa88b0 --- /dev/null +++ b/app/module/user_levels/request/user_levels.request.go @@ -0,0 +1,67 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type UserLevelsGeneric interface { + ToEntity() +} + +type UserLevelsQueryRequest struct { + Name string `json:"name" validate:"required"` + AliasName string `json:"alias_name" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + ParentLevelId int `json:"parent_level_id" validate:"required"` + ProvinceId int `json:"province_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type UserLevelsCreateRequest struct { + Name string `json:"name" validate:"required"` + AliasName string `json:"alias_name" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + ParentLevelId int `json:"parent_level_id" validate:"required"` + ProvinceId int `json:"province_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req UserLevelsCreateRequest) ToEntity() *entity.UserLevels { + return &entity.UserLevels{ + Name: req.Name, + AliasName: req.AliasName, + LevelNumber: req.LevelNumber, + ParentLevelId: req.ParentLevelId, + ProvinceId: req.ProvinceId, + IsActive: req.IsActive, + } +} + +type UserLevelsUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Name string `json:"name" validate:"required"` + AliasName string `json:"alias_name" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + ParentLevelId int `json:"parent_level_id" validate:"required"` + ProvinceId int `json:"province_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req UserLevelsUpdateRequest) ToEntity() *entity.UserLevels { + return &entity.UserLevels{ + ID: req.ID, + Name: req.Name, + AliasName: req.AliasName, + LevelNumber: req.LevelNumber, + ParentLevelId: req.ParentLevelId, + ProvinceId: req.ProvinceId, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/user_levels/response/user_levels.response.go b/app/module/user_levels/response/user_levels.response.go new file mode 100644 index 0000000..62f1250 --- /dev/null +++ b/app/module/user_levels/response/user_levels.response.go @@ -0,0 +1,15 @@ +package response + +import "time" + +type UserLevelsResponse struct { + ID uint `json:"id"` + Name string `json:"name"` + AliasName string `json:"alias_name"` + LevelNumber int `json:"level_number"` + ParentLevelId int `json:"parent_level_id"` + ProvinceId int `json:"province_id"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/user_levels/service/user_levels.service.go b/app/module/user_levels/service/user_levels.service.go new file mode 100644 index 0000000..4a9b615 --- /dev/null +++ b/app/module/user_levels/service/user_levels.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/user_levels/mapper" + "go-humas-be/app/module/user_levels/repository" + "go-humas-be/app/module/user_levels/request" + "go-humas-be/app/module/user_levels/response" + "go-humas-be/utils/paginator" +) + +// UserLevelsService +type userLevelsService struct { + Repo repository.UserLevelsRepository + Log zerolog.Logger +} + +// UserLevelsService define interface of IUserLevelsService +type UserLevelsService interface { + All(req request.UserLevelsQueryRequest) (userLevels []*response.UserLevelsResponse, paging paginator.Pagination, err error) + Show(id uint) (userLevels *response.UserLevelsResponse, err error) + Save(req request.UserLevelsCreateRequest) (err error) + Update(id uint, req request.UserLevelsUpdateRequest) (err error) + Delete(id uint) error +} + +// NewUserLevelsService init UserLevelsService +func NewUserLevelsService(repo repository.UserLevelsRepository, log zerolog.Logger) UserLevelsService { + + return &userLevelsService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of UserLevelsService +func (_i *userLevelsService) All(req request.UserLevelsQueryRequest) (userLevelss []*response.UserLevelsResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + userLevelss = append(userLevelss, mapper.UserLevelsResponseMapper(result)) + } + + return +} + +func (_i *userLevelsService) Show(id uint) (userLevels *response.UserLevelsResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.UserLevelsResponseMapper(result), nil +} + +func (_i *userLevelsService) Save(req request.UserLevelsCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *userLevelsService) Update(id uint, req request.UserLevelsUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *userLevelsService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/user_levels/user_levels.module.go b/app/module/user_levels/user_levels.module.go new file mode 100644 index 0000000..001f4df --- /dev/null +++ b/app/module/user_levels/user_levels.module.go @@ -0,0 +1,53 @@ +package user_levels + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_levels/controller" + "go-humas-be/app/module/user_levels/repository" + "go-humas-be/app/module/user_levels/service" + "go.uber.org/fx" +) + +// struct of UserLevelsRouter +type UserLevelsRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of UserLevels module +var NewUserLevelsModule = fx.Options( + // register repository of UserLevels module + fx.Provide(repository.NewUserLevelsRepository), + + // register service of UserLevels module + fx.Provide(service.NewUserLevelsService), + + // register controller of UserLevels module + fx.Provide(controller.NewController), + + // register router of UserLevels module + fx.Provide(NewUserLevelsRouter), +) + +// init UserLevelsRouter +func NewUserLevelsRouter(fiber *fiber.App, controller *controller.Controller) *UserLevelsRouter { + return &UserLevelsRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of UserLevels module +func (_i *UserLevelsRouter) RegisterUserLevelsRoutes() { + // define controllers + userLevelsController := _i.Controller.UserLevels + + // define routes + _i.App.Route("/user-levels", func(router fiber.Router) { + router.Get("/", userLevelsController.All) + router.Get("/:id", userLevelsController.Show) + router.Post("/", userLevelsController.Save) + router.Put("/:id", userLevelsController.Update) + router.Delete("/:id", userLevelsController.Delete) + }) +} diff --git a/app/module/user_role_accesses/controller/controller.go b/app/module/user_role_accesses/controller/controller.go new file mode 100644 index 0000000..24e5f6b --- /dev/null +++ b/app/module/user_role_accesses/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/user_role_accesses/service" + +type Controller struct { + UserRoleAccesses UserRoleAccessesController +} + +func NewController(UserRoleAccessesService service.UserRoleAccessesService) *Controller { + return &Controller{ + UserRoleAccesses: NewUserRoleAccessesController(UserRoleAccessesService), + } +} \ No newline at end of file diff --git a/app/module/user_role_accesses/controller/user_role_accesses.controller.go b/app/module/user_role_accesses/controller/user_role_accesses.controller.go new file mode 100644 index 0000000..50eb59b --- /dev/null +++ b/app/module/user_role_accesses/controller/user_role_accesses.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_role_accesses/request" + "go-humas-be/app/module/user_role_accesses/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type userRoleAccessesController struct { + userRoleAccessesService service.UserRoleAccessesService +} + +type UserRoleAccessesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewUserRoleAccessesController(userRoleAccessesService service.UserRoleAccessesService) UserRoleAccessesController { + return &userRoleAccessesController{ + userRoleAccessesService: userRoleAccessesService, + } +} + +// All get all UserRoleAccesses +// @Summary Get all UserRoleAccesses +// @Description API for getting all UserRoleAccesses +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-role-accesses [get] +func (_i *userRoleAccessesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.UserRoleAccessesQueryRequest + req.Pagination = paginate + + userRoleAccessesData, paging, err := _i.userRoleAccessesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoleAccesses list successfully retrieved"}, + Data: userRoleAccessesData, + Meta: paging, + }) +} + +// Show get one UserRoleAccesses +// @Summary Get one UserRoleAccesses +// @Description API for getting one UserRoleAccesses +// @Tags Task +// @Security Bearer +// @Param id path int true "UserRoleAccesses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-role-accesses/{id} [get] +func (_i *userRoleAccessesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + userRoleAccessesData, err := _i.userRoleAccessesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoleAccesses successfully retrieved"}, + Data: userRoleAccessesData, + }) +} + +// Save create UserRoleAccesses +// @Summary Create UserRoleAccesses +// @Description API for create UserRoleAccesses +// @Tags Task +// @Security Bearer +// @Body request.UserRoleAccessesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-role-accesses [post] +func (_i *userRoleAccessesController) Save(c *fiber.Ctx) error { + req := new(request.UserRoleAccessesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.userRoleAccessesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoleAccesses successfully created"}, + }) +} + +// Update update UserRoleAccesses +// @Summary update UserRoleAccesses +// @Description API for update UserRoleAccesses +// @Tags Task +// @Security Bearer +// @Body request.UserRoleAccessesUpdateRequest +// @Param id path int true "UserRoleAccesses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-role-accesses/{id} [put] +func (_i *userRoleAccessesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.UserRoleAccessesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.userRoleAccessesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoleAccesses successfully updated"}, + }) +} + +// Delete delete UserRoleAccesses +// @Summary delete UserRoleAccesses +// @Description API for delete UserRoleAccesses +// @Tags Task +// @Security Bearer +// @Param id path int true "UserRoleAccesses ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-role-accesses/{id} [delete] +func (_i *userRoleAccessesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.userRoleAccessesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoleAccesses successfully deleted"}, + }) +} diff --git a/app/module/user_role_accesses/entity/user_role_accesses.entity.go b/app/module/user_role_accesses/entity/user_role_accesses.entity.go new file mode 100644 index 0000000..3d1c58d --- /dev/null +++ b/app/module/user_role_accesses/entity/user_role_accesses.entity.go @@ -0,0 +1,18 @@ +package entity + +import "time" + +type UserRoleAccesses struct { + ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` + UserRoleId int `json:"user_role_id" gorm:"type:int4"` + MenuId int `json:"menu_id" gorm:"type:int4"` + IsViewEnabled bool `json:"is_view_enabled" gorm:"type:bool"` + IsInsertEnabled bool `json:"is_insert_enabled" gorm:"type:bool"` + IsUpdateEnabled bool `json:"is_update_enabled" gorm:"type:bool"` + IsDeleteEnabled bool `json:"is_delete_enabled" gorm:"type:bool"` + IsApprovalEnabled bool `json:"is_approval_enabled" gorm:"type:bool"` + IsAdminEnabled bool `json:"is_admin_enabled" gorm:"type:bool"` + IsActive bool `json:"is_active" gorm:"type:bool"` + CreatedAt time.Time `json:"created_at" gorm:"default:now()"` + UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` +} \ No newline at end of file diff --git a/app/module/user_role_accesses/mapper/user_role_accesses.mapper.go b/app/module/user_role_accesses/mapper/user_role_accesses.mapper.go new file mode 100644 index 0000000..2e829ae --- /dev/null +++ b/app/module/user_role_accesses/mapper/user_role_accesses.mapper.go @@ -0,0 +1,26 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/user_role_accesses/response" +) + +func UserRoleAccessesResponseMapper(userRoleAccessesReq *entity.UserRoleAccesses) (userRoleAccessesRes *res.UserRoleAccessesResponse) { + if userRoleAccessesReq != nil { + userRoleAccessesRes = &res.UserRoleAccessesResponse{ + ID: userRoleAccessesReq.ID, + UserRoleId: userRoleAccessesReq.UserRoleId, + MenuId: userRoleAccessesReq.MenuId, + IsViewEnabled: userRoleAccessesReq.IsViewEnabled, + IsInsertEnabled: userRoleAccessesReq.IsInsertEnabled, + IsUpdateEnabled: userRoleAccessesReq.IsUpdateEnabled, + IsDeleteEnabled: userRoleAccessesReq.IsDeleteEnabled, + IsApprovalEnabled: userRoleAccessesReq.IsApprovalEnabled, + IsAdminEnabled: userRoleAccessesReq.IsAdminEnabled, + IsActive: userRoleAccessesReq.IsActive, + CreatedAt: userRoleAccessesReq.CreatedAt, + UpdatedAt: userRoleAccessesReq.UpdatedAt, + } + } + return userRoleAccessesRes +} \ No newline at end of file diff --git a/app/module/user_role_accesses/repository/user_role_accesses.repository.go b/app/module/user_role_accesses/repository/user_role_accesses.repository.go new file mode 100644 index 0000000..e6e768b --- /dev/null +++ b/app/module/user_role_accesses/repository/user_role_accesses.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/user_role_accesses/request" + "go-humas-be/utils/paginator" +) + +type userRoleAccessesRepository struct { + DB *database.Database +} + +// UserRoleAccessesRepository define interface of IUserRoleAccessesRepository +type UserRoleAccessesRepository interface { + GetAll(req request.UserRoleAccessesQueryRequest) (userRoleAccessess []*entity.UserRoleAccesses, paging paginator.Pagination, err error) + FindOne(id uint) (userRoleAccesses *entity.UserRoleAccesses, err error) + Create(userRoleAccesses *entity.UserRoleAccesses) (err error) + Update(id uint, userRoleAccesses *entity.UserRoleAccesses) (err error) + Delete(id uint) (err error) +} + +func NewUserRoleAccessesRepository(db *database.Database) UserRoleAccessesRepository { + return &userRoleAccessesRepository{ + DB: db, + } +} + +// implement interface of IUserRoleAccessesRepository +func (_i *userRoleAccessesRepository) GetAll(req request.UserRoleAccessesQueryRequest) (userRoleAccessess []*entity.UserRoleAccesses, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.UserRoleAccesses{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&userRoleAccessess).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *userRoleAccessesRepository) FindOne(id uint) (userRoleAccesses *entity.UserRoleAccesses, err error) { + if err := _i.DB.DB.First(&userRoleAccesses, id).Error; err != nil { + return nil, err + } + + return userRoleAccesses, nil +} + +func (_i *userRoleAccessesRepository) Create(userRoleAccesses *entity.UserRoleAccesses) (err error) { + return _i.DB.DB.Create(userRoleAccesses).Error +} + +func (_i *userRoleAccessesRepository) Update(id uint, userRoleAccesses *entity.UserRoleAccesses) (err error) { + return _i.DB.DB.Model(&entity.UserRoleAccesses{}). + Where(&entity.UserRoleAccesses{ID: id}). + Updates(userRoleAccesses).Error +} + +func (_i *userRoleAccessesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.UserRoleAccesses{}, id).Error +} \ No newline at end of file diff --git a/app/module/user_role_accesses/request/user_role_accesses.request.go b/app/module/user_role_accesses/request/user_role_accesses.request.go new file mode 100644 index 0000000..20fa2f1 --- /dev/null +++ b/app/module/user_role_accesses/request/user_role_accesses.request.go @@ -0,0 +1,83 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type UserRoleAccessesGeneric interface { + ToEntity() +} + +type UserRoleAccessesQueryRequest struct { + UserRoleId int `json:"user_role_id" validate:"required"` + MenuId int `json:"menu_id" validate:"required"` + IsViewEnabled bool `json:"is_view_enabled" validate:"required"` + IsInsertEnabled bool `json:"is_insert_enabled" validate:"required"` + IsUpdateEnabled bool `json:"is_update_enabled" validate:"required"` + IsDeleteEnabled bool `json:"is_delete_enabled" validate:"required"` + IsApprovalEnabled bool `json:"is_approval_enabled" validate:"required"` + IsAdminEnabled bool `json:"is_admin_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + + +type UserRoleAccessesCreateRequest struct { + UserRoleId int `json:"user_role_id" validate:"required"` + MenuId int `json:"menu_id" validate:"required"` + IsViewEnabled bool `json:"is_view_enabled" validate:"required"` + IsInsertEnabled bool `json:"is_insert_enabled" validate:"required"` + IsUpdateEnabled bool `json:"is_update_enabled" validate:"required"` + IsDeleteEnabled bool `json:"is_delete_enabled" validate:"required"` + IsApprovalEnabled bool `json:"is_approval_enabled" validate:"required"` + IsAdminEnabled bool `json:"is_admin_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req UserRoleAccessesCreateRequest) ToEntity() *entity.UserRoleAccesses { + return &entity.UserRoleAccesses{ + UserRoleId: req.UserRoleId, + MenuId: req.MenuId, + IsViewEnabled: req.IsViewEnabled, + IsInsertEnabled: req.IsInsertEnabled, + IsUpdateEnabled: req.IsUpdateEnabled, + IsDeleteEnabled: req.IsDeleteEnabled, + IsApprovalEnabled: req.IsApprovalEnabled, + IsAdminEnabled: req.IsAdminEnabled, + IsActive: req.IsActive, + } +} + +type UserRoleAccessesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + UserRoleId int `json:"user_role_id" validate:"required"` + MenuId int `json:"menu_id" validate:"required"` + IsViewEnabled bool `json:"is_view_enabled" validate:"required"` + IsInsertEnabled bool `json:"is_insert_enabled" validate:"required"` + IsUpdateEnabled bool `json:"is_update_enabled" validate:"required"` + IsDeleteEnabled bool `json:"is_delete_enabled" validate:"required"` + IsApprovalEnabled bool `json:"is_approval_enabled" validate:"required"` + IsAdminEnabled bool `json:"is_admin_enabled" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req UserRoleAccessesUpdateRequest) ToEntity() *entity.UserRoleAccesses { + return &entity.UserRoleAccesses{ + ID: req.ID, + UserRoleId: req.UserRoleId, + MenuId: req.MenuId, + IsViewEnabled: req.IsViewEnabled, + IsInsertEnabled: req.IsInsertEnabled, + IsUpdateEnabled: req.IsUpdateEnabled, + IsDeleteEnabled: req.IsDeleteEnabled, + IsApprovalEnabled: req.IsApprovalEnabled, + IsAdminEnabled: req.IsAdminEnabled, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} \ No newline at end of file diff --git a/app/module/user_role_accesses/response/user_role_accesses.response.go b/app/module/user_role_accesses/response/user_role_accesses.response.go new file mode 100644 index 0000000..bb333d4 --- /dev/null +++ b/app/module/user_role_accesses/response/user_role_accesses.response.go @@ -0,0 +1,18 @@ +package response + +import "time" + +type UserRoleAccessesResponse struct { + ID uint `json:"id"` + UserRoleId int `json:"user_role_id"` + MenuId int `json:"menu_id"` + IsViewEnabled bool `json:"is_view_enabled"` + IsInsertEnabled bool `json:"is_insert_enabled"` + IsUpdateEnabled bool `json:"is_update_enabled"` + IsDeleteEnabled bool `json:"is_delete_enabled"` + IsApprovalEnabled bool `json:"is_approval_enabled"` + IsAdminEnabled bool `json:"is_admin_enabled"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/user_role_accesses/service/user_role_accesses.service.go b/app/module/user_role_accesses/service/user_role_accesses.service.go new file mode 100644 index 0000000..c643062 --- /dev/null +++ b/app/module/user_role_accesses/service/user_role_accesses.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/user_role_accesses/mapper" + "go-humas-be/app/module/user_role_accesses/repository" + "go-humas-be/app/module/user_role_accesses/request" + "go-humas-be/app/module/user_role_accesses/response" + "go-humas-be/utils/paginator" +) + +// UserRoleAccessesService +type userRoleAccessesService struct { + Repo repository.UserRoleAccessesRepository + Log zerolog.Logger +} + +// UserRoleAccessesService define interface of IUserRoleAccessesService +type UserRoleAccessesService interface { + All(req request.UserRoleAccessesQueryRequest) (userRoleAccesses []*response.UserRoleAccessesResponse, paging paginator.Pagination, err error) + Show(id uint) (userRoleAccesses *response.UserRoleAccessesResponse, err error) + Save(req request.UserRoleAccessesCreateRequest) (err error) + Update(id uint, req request.UserRoleAccessesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewUserRoleAccessesService init UserRoleAccessesService +func NewUserRoleAccessesService(repo repository.UserRoleAccessesRepository, log zerolog.Logger) UserRoleAccessesService { + + return &userRoleAccessesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of UserRoleAccessesService +func (_i *userRoleAccessesService) All(req request.UserRoleAccessesQueryRequest) (userRoleAccessess []*response.UserRoleAccessesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + userRoleAccessess = append(userRoleAccessess, mapper.UserRoleAccessesResponseMapper(result)) + } + + return +} + +func (_i *userRoleAccessesService) Show(id uint) (userRoleAccesses *response.UserRoleAccessesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.UserRoleAccessesResponseMapper(result), nil +} + +func (_i *userRoleAccessesService) Save(req request.UserRoleAccessesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *userRoleAccessesService) Update(id uint, req request.UserRoleAccessesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *userRoleAccessesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/user_role_accesses/user_role_accesses.module.go b/app/module/user_role_accesses/user_role_accesses.module.go new file mode 100644 index 0000000..62eea8f --- /dev/null +++ b/app/module/user_role_accesses/user_role_accesses.module.go @@ -0,0 +1,53 @@ +package user_role_accesses + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_role_accesses/controller" + "go-humas-be/app/module/user_role_accesses/repository" + "go-humas-be/app/module/user_role_accesses/service" + "go.uber.org/fx" +) + +// struct of UserRoleAccessesRouter +type UserRoleAccessesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of UserRoleAccesses module +var NewUserRoleAccessesModule = fx.Options( + // register repository of UserRoleAccesses module + fx.Provide(repository.NewUserRoleAccessesRepository), + + // register service of UserRoleAccesses module + fx.Provide(service.NewUserRoleAccessesService), + + // register controller of UserRoleAccesses module + fx.Provide(controller.NewController), + + // register router of UserRoleAccesses module + fx.Provide(NewUserRoleAccessesRouter), +) + +// init UserRoleAccessesRouter +func NewUserRoleAccessesRouter(fiber *fiber.App, controller *controller.Controller) *UserRoleAccessesRouter { + return &UserRoleAccessesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of UserRoleAccesses module +func (_i *UserRoleAccessesRouter) RegisterUserRoleAccessesRoutes() { + // define controllers + userRoleAccessesController := _i.Controller.UserRoleAccesses + + // define routes + _i.App.Route("/user-role-accesses", func(router fiber.Router) { + router.Get("/", userRoleAccessesController.All) + router.Get("/:id", userRoleAccessesController.Show) + router.Post("/", userRoleAccessesController.Save) + router.Put("/:id", userRoleAccessesController.Update) + router.Delete("/:id", userRoleAccessesController.Delete) + }) +} \ No newline at end of file diff --git a/app/module/user_roles/controller/controller.go b/app/module/user_roles/controller/controller.go new file mode 100644 index 0000000..cb3e7a4 --- /dev/null +++ b/app/module/user_roles/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/user_roles/service" + +type Controller struct { + UserRoles UserRolesController +} + +func NewController(UserRolesService service.UserRolesService) *Controller { + return &Controller{ + UserRoles: NewUserRolesController(UserRolesService), + } +} \ No newline at end of file diff --git a/app/module/user_roles/controller/user_roles.controller.go b/app/module/user_roles/controller/user_roles.controller.go new file mode 100644 index 0000000..b6ec973 --- /dev/null +++ b/app/module/user_roles/controller/user_roles.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_roles/request" + "go-humas-be/app/module/user_roles/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type userRolesController struct { + userRolesService service.UserRolesService +} + +type UserRolesController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewUserRolesController(userRolesService service.UserRolesService) UserRolesController { + return &userRolesController{ + userRolesService: userRolesService, + } +} + +// All get all UserRoles +// @Summary Get all UserRoles +// @Description API for getting all UserRoles +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-roles [get] +func (_i *userRolesController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.UserRolesQueryRequest + req.Pagination = paginate + + userRolesData, paging, err := _i.userRolesService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoles list successfully retrieved"}, + Data: userRolesData, + Meta: paging, + }) +} + +// Show get one UserRoles +// @Summary Get one UserRoles +// @Description API for getting one UserRoles +// @Tags Task +// @Security Bearer +// @Param id path int true "UserRoles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-roles/{id} [get] +func (_i *userRolesController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + userRolesData, err := _i.userRolesService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoles successfully retrieved"}, + Data: userRolesData, + }) +} + +// Save create UserRoles +// @Summary Create UserRoles +// @Description API for create UserRoles +// @Tags Task +// @Security Bearer +// @Body request.UserRolesCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-roles [post] +func (_i *userRolesController) Save(c *fiber.Ctx) error { + req := new(request.UserRolesCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.userRolesService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoles successfully created"}, + }) +} + +// Update update UserRoles +// @Summary update UserRoles +// @Description API for update UserRoles +// @Tags Task +// @Security Bearer +// @Body request.UserRolesUpdateRequest +// @Param id path int true "UserRoles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-roles/{id} [put] +func (_i *userRolesController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.UserRolesUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.userRolesService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoles successfully updated"}, + }) +} + +// Delete delete UserRoles +// @Summary delete UserRoles +// @Description API for delete UserRoles +// @Tags Task +// @Security Bearer +// @Param id path int true "UserRoles ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /user-roles/{id} [delete] +func (_i *userRolesController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.userRolesService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"UserRoles successfully deleted"}, + }) +} diff --git a/app/module/user_roles/mapper/user_roles.mapper.go b/app/module/user_roles/mapper/user_roles.mapper.go new file mode 100644 index 0000000..fc7529f --- /dev/null +++ b/app/module/user_roles/mapper/user_roles.mapper.go @@ -0,0 +1,24 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/user_roles/response" +) + +func UserRolesResponseMapper(userRolesReq *entity.UserRoles) (userRolesRes *res.UserRolesResponse) { + if userRolesReq != nil { + userRolesRes = &res.UserRolesResponse{ + ID: userRolesReq.ID, + Name: userRolesReq.Name, + Description: userRolesReq.Description, + Code: userRolesReq.Code, + LevelNumber: userRolesReq.LevelNumber, + StatusId: userRolesReq.StatusId, + CreatedById: userRolesReq.CreatedById, + IsActive: userRolesReq.IsActive, + CreatedAt: userRolesReq.CreatedAt, + UpdatedAt: userRolesReq.UpdatedAt, + } + } + return userRolesRes +} \ No newline at end of file diff --git a/app/module/user_roles/repository/user_roles.repository.go b/app/module/user_roles/repository/user_roles.repository.go new file mode 100644 index 0000000..a9d916b --- /dev/null +++ b/app/module/user_roles/repository/user_roles.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/user_roles/request" + "go-humas-be/utils/paginator" +) + +type userRolesRepository struct { + DB *database.Database +} + +// UserRolesRepository define interface of IUserRolesRepository +type UserRolesRepository interface { + GetAll(req request.UserRolesQueryRequest) (userRoless []*entity.UserRoles, paging paginator.Pagination, err error) + FindOne(id uint) (userRoles *entity.UserRoles, err error) + Create(userRoles *entity.UserRoles) (err error) + Update(id uint, userRoles *entity.UserRoles) (err error) + Delete(id uint) (err error) +} + +func NewUserRolesRepository(db *database.Database) UserRolesRepository { + return &userRolesRepository{ + DB: db, + } +} + +// implement interface of IUserRolesRepository +func (_i *userRolesRepository) GetAll(req request.UserRolesQueryRequest) (userRoless []*entity.UserRoles, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.UserRoles{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&userRoless).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *userRolesRepository) FindOne(id uint) (userRoles *entity.UserRoles, err error) { + if err := _i.DB.DB.First(&userRoles, id).Error; err != nil { + return nil, err + } + + return userRoles, nil +} + +func (_i *userRolesRepository) Create(userRoles *entity.UserRoles) (err error) { + return _i.DB.DB.Create(userRoles).Error +} + +func (_i *userRolesRepository) Update(id uint, userRoles *entity.UserRoles) (err error) { + return _i.DB.DB.Model(&entity.UserRoles{}). + Where(&entity.UserRoles{ID: id}). + Updates(userRoles).Error +} + +func (_i *userRolesRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.UserRoles{}, id).Error +} \ No newline at end of file diff --git a/app/module/user_roles/request/user_roles.request.go b/app/module/user_roles/request/user_roles.request.go new file mode 100644 index 0000000..c34255d --- /dev/null +++ b/app/module/user_roles/request/user_roles.request.go @@ -0,0 +1,72 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type UserRolesGeneric interface { + ToEntity() +} + +type UserRolesQueryRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + Code string `json:"code" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type UserRolesCreateRequest struct { + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + Code string `json:"code" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req UserRolesCreateRequest) ToEntity() *entity.UserRoles { + return &entity.UserRoles{ + Name: req.Name, + Description: req.Description, + Code: req.Code, + LevelNumber: req.LevelNumber, + StatusId: req.StatusId, + CreatedById: req.CreatedById, + IsActive: req.IsActive, + } +} + +type UserRolesUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Name string `json:"name" validate:"required"` + Description string `json:"description" validate:"required"` + Code string `json:"code" validate:"required"` + LevelNumber int `json:"level_number" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req UserRolesUpdateRequest) ToEntity() *entity.UserRoles { + return &entity.UserRoles{ + ID: req.ID, + Name: req.Name, + Description: req.Description, + Code: req.Code, + LevelNumber: req.LevelNumber, + StatusId: req.StatusId, + CreatedById: req.CreatedById, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/user_roles/response/user_roles.response.go b/app/module/user_roles/response/user_roles.response.go new file mode 100644 index 0000000..04157d9 --- /dev/null +++ b/app/module/user_roles/response/user_roles.response.go @@ -0,0 +1,16 @@ +package response + +import "time" + +type UserRolesResponse struct { + ID uint `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + Code string `json:"code"` + LevelNumber int `json:"level_number"` + StatusId int `json:"status_id"` + CreatedById int `json:"created_by_id"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/user_roles/service/user_roles.service.go b/app/module/user_roles/service/user_roles.service.go new file mode 100644 index 0000000..fe302ac --- /dev/null +++ b/app/module/user_roles/service/user_roles.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/user_roles/mapper" + "go-humas-be/app/module/user_roles/repository" + "go-humas-be/app/module/user_roles/request" + "go-humas-be/app/module/user_roles/response" + "go-humas-be/utils/paginator" +) + +// UserRolesService +type userRolesService struct { + Repo repository.UserRolesRepository + Log zerolog.Logger +} + +// UserRolesService define interface of IUserRolesService +type UserRolesService interface { + All(req request.UserRolesQueryRequest) (userRoles []*response.UserRolesResponse, paging paginator.Pagination, err error) + Show(id uint) (userRoles *response.UserRolesResponse, err error) + Save(req request.UserRolesCreateRequest) (err error) + Update(id uint, req request.UserRolesUpdateRequest) (err error) + Delete(id uint) error +} + +// NewUserRolesService init UserRolesService +func NewUserRolesService(repo repository.UserRolesRepository, log zerolog.Logger) UserRolesService { + + return &userRolesService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of UserRolesService +func (_i *userRolesService) All(req request.UserRolesQueryRequest) (userRoless []*response.UserRolesResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + userRoless = append(userRoless, mapper.UserRolesResponseMapper(result)) + } + + return +} + +func (_i *userRolesService) Show(id uint) (userRoles *response.UserRolesResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.UserRolesResponseMapper(result), nil +} + +func (_i *userRolesService) Save(req request.UserRolesCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *userRolesService) Update(id uint, req request.UserRolesUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *userRolesService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/user_roles/user_roles.module.go b/app/module/user_roles/user_roles.module.go new file mode 100644 index 0000000..674c6e3 --- /dev/null +++ b/app/module/user_roles/user_roles.module.go @@ -0,0 +1,53 @@ +package user_roles + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/user_roles/controller" + "go-humas-be/app/module/user_roles/repository" + "go-humas-be/app/module/user_roles/service" + "go.uber.org/fx" +) + +// struct of UserRolesRouter +type UserRolesRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of UserRoles module +var NewUserRolesModule = fx.Options( + // register repository of UserRoles module + fx.Provide(repository.NewUserRolesRepository), + + // register service of UserRoles module + fx.Provide(service.NewUserRolesService), + + // register controller of UserRoles module + fx.Provide(controller.NewController), + + // register router of UserRoles module + fx.Provide(NewUserRolesRouter), +) + +// init UserRolesRouter +func NewUserRolesRouter(fiber *fiber.App, controller *controller.Controller) *UserRolesRouter { + return &UserRolesRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of UserRoles module +func (_i *UserRolesRouter) RegisterUserRolesRoutes() { + // define controllers + userRolesController := _i.Controller.UserRoles + + // define routes + _i.App.Route("/user-roles", func(router fiber.Router) { + router.Get("/", userRolesController.All) + router.Get("/:id", userRolesController.Show) + router.Post("/", userRolesController.Save) + router.Put("/:id", userRolesController.Update) + router.Delete("/:id", userRolesController.Delete) + }) +} diff --git a/app/module/users/controller/controller.go b/app/module/users/controller/controller.go new file mode 100644 index 0000000..5def7a5 --- /dev/null +++ b/app/module/users/controller/controller.go @@ -0,0 +1,13 @@ +package controller + +import "go-humas-be/app/module/users/service" + +type Controller struct { + Users UsersController +} + +func NewController(UsersService service.UsersService) *Controller { + return &Controller{ + Users: NewUsersController(UsersService), + } +} \ No newline at end of file diff --git a/app/module/users/controller/users.controller.go b/app/module/users/controller/users.controller.go new file mode 100644 index 0000000..de80c20 --- /dev/null +++ b/app/module/users/controller/users.controller.go @@ -0,0 +1,181 @@ +package controller + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/users/request" + "go-humas-be/app/module/users/service" + "go-humas-be/utils/paginator" + "strconv" + + utilRes "go-humas-be/utils/response" + utilVal "go-humas-be/utils/validator" +) + +type usersController struct { + usersService service.UsersService +} + +type UsersController interface { + All(c *fiber.Ctx) error + Show(c *fiber.Ctx) error + Save(c *fiber.Ctx) error + Update(c *fiber.Ctx) error + Delete(c *fiber.Ctx) error +} + +func NewUsersController(usersService service.UsersService) UsersController { + return &usersController{ + usersService: usersService, + } +} + +// All get all Users +// @Summary Get all Users +// @Description API for getting all Users +// @Tags Task +// @Security Bearer +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /users [get] +func (_i *usersController) All(c *fiber.Ctx) error { + paginate, err := paginator.Paginate(c) + if err != nil { + return err + } + + var req request.UsersQueryRequest + req.Pagination = paginate + + usersData, paging, err := _i.usersService.All(req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Users list successfully retrieved"}, + Data: usersData, + Meta: paging, + }) +} + +// Show get one Users +// @Summary Get one Users +// @Description API for getting one Users +// @Tags Task +// @Security Bearer +// @Param id path int true "Users ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /users/{id} [get] +func (_i *usersController) Show(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + usersData, err := _i.usersService.Show(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Users successfully retrieved"}, + Data: usersData, + }) +} + +// Save create Users +// @Summary Create Users +// @Description API for create Users +// @Tags Task +// @Security Bearer +// @Body request.UsersCreateRequest +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /users [post] +func (_i *usersController) Save(c *fiber.Ctx) error { + req := new(request.UsersCreateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err := _i.usersService.Save(*req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Users successfully created"}, + }) +} + +// Update update Users +// @Summary update Users +// @Description API for update Users +// @Tags Task +// @Security Bearer +// @Body request.UsersUpdateRequest +// @Param id path int true "Users ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /users/{id} [put] +func (_i *usersController) Update(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + req := new(request.UsersUpdateRequest) + if err := utilVal.ParseAndValidate(c, req); err != nil { + return err + } + + err = _i.usersService.Update(uint(id), *req) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Users successfully updated"}, + }) +} + +// Delete delete Users +// @Summary delete Users +// @Description API for delete Users +// @Tags Task +// @Security Bearer +// @Param id path int true "Users ID" +// @Success 200 {object} response.Response +// @Failure 401 {object} response.Response +// @Failure 404 {object} response.Response +// @Failure 422 {object} response.Response +// @Failure 500 {object} response.Response +// @Router /users/{id} [delete] +func (_i *usersController) Delete(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + err = _i.usersService.Delete(uint(id)) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Messages: utilRes.Messages{"Users successfully deleted"}, + }) +} diff --git a/app/module/users/mapper/users.mapper.go b/app/module/users/mapper/users.mapper.go new file mode 100644 index 0000000..ec5d60b --- /dev/null +++ b/app/module/users/mapper/users.mapper.go @@ -0,0 +1,35 @@ +package mapper + +import ( + "go-humas-be/app/database/entity" + res "go-humas-be/app/module/users/response" +) + +func UsersResponseMapper(usersReq *entity.Users) (usersRes *res.UsersResponse) { + if usersReq != nil { + usersRes = &res.UsersResponse{ + ID: usersReq.ID, + Username: usersReq.Username, + Email: usersReq.Email, + Fullname: usersReq.Fullname, + Address: usersReq.Address, + PhoneNumber: usersReq.PhoneNumber, + WorkType: usersReq.WorkType, + GenderType: usersReq.GenderType, + IdentityType: usersReq.IdentityType, + IdentityNumber: usersReq.IdentityNumber, + DateOfBirth: usersReq.DateOfBirth, + LastEducation: usersReq.LastEducation, + KeycloakId: usersReq.KeycloakId, + UserRoleId: usersReq.UserRoleId, + StatusId: usersReq.StatusId, + UserLevelsId: usersReq.UserLevelsId, + CreatedById: usersReq.CreatedById, + ProfilePicturePath: usersReq.ProfilePicturePath, + IsActive: usersReq.IsActive, + CreatedAt: usersReq.CreatedAt, + UpdatedAt: usersReq.UpdatedAt, + } + } + return usersRes +} \ No newline at end of file diff --git a/app/module/users/repository/users.repository.go b/app/module/users/repository/users.repository.go new file mode 100644 index 0000000..6d7f193 --- /dev/null +++ b/app/module/users/repository/users.repository.go @@ -0,0 +1,69 @@ +package repository + +import ( + "go-humas-be/app/database" + "go-humas-be/app/database/entity" + "go-humas-be/app/module/users/request" + "go-humas-be/utils/paginator" +) + +type usersRepository struct { + DB *database.Database +} + +// UsersRepository define interface of IUsersRepository +type UsersRepository interface { + GetAll(req request.UsersQueryRequest) (userss []*entity.Users, paging paginator.Pagination, err error) + FindOne(id uint) (users *entity.Users, err error) + Create(users *entity.Users) (err error) + Update(id uint, users *entity.Users) (err error) + Delete(id uint) (err error) +} + +func NewUsersRepository(db *database.Database) UsersRepository { + return &usersRepository{ + DB: db, + } +} + +// implement interface of IUsersRepository +func (_i *usersRepository) GetAll(req request.UsersQueryRequest) (userss []*entity.Users, paging paginator.Pagination, err error) { + var count int64 + + query := _i.DB.DB.Model(&entity.Users{}) + query.Count(&count) + + req.Pagination.Count = count + req.Pagination = paginator.Paging(req.Pagination) + + err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&userss).Error + if err != nil { + return + } + + paging = *req.Pagination + + return +} + +func (_i *usersRepository) FindOne(id uint) (users *entity.Users, err error) { + if err := _i.DB.DB.First(&users, id).Error; err != nil { + return nil, err + } + + return users, nil +} + +func (_i *usersRepository) Create(users *entity.Users) (err error) { + return _i.DB.DB.Create(users).Error +} + +func (_i *usersRepository) Update(id uint, users *entity.Users) (err error) { + return _i.DB.DB.Model(&entity.Users{}). + Where(&entity.Users{ID: id}). + Updates(users).Error +} + +func (_i *usersRepository) Delete(id uint) error { + return _i.DB.DB.Delete(&entity.Users{}, id).Error +} \ No newline at end of file diff --git a/app/module/users/request/users.request.go b/app/module/users/request/users.request.go new file mode 100644 index 0000000..b606fac --- /dev/null +++ b/app/module/users/request/users.request.go @@ -0,0 +1,127 @@ +package request + +import ( + "go-humas-be/app/database/entity" + "go-humas-be/utils/paginator" + "time" +) + +type UsersGeneric interface { + ToEntity() +} + +type UsersQueryRequest struct { + Username string `json:"username" validate:"required,lowercase"` + Email string `json:"email" validate:"required,email"` + Fullname string `json:"fullname" validate:"required"` + Address string `json:"address" validate:"required"` + PhoneNumber string `json:"phone_number" validate:"required"` + WorkType string `json:"work_type" validate:"required"` + GenderType string `json:"gender_type" validate:"required"` + IdentityType string `json:"identity_type" validate:"required"` + IdentityNumber string `json:"identity_number" validate:"required"` + DateOfBirth string `json:"date_of_birth" validate:"required"` + LastEducation string `json:"last_education" validate:"required"` + KeycloakId string `json:"keycloak_id" validate:"required"` + UserRoleId int `json:"user_role_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + UserLevelsId int `json:"user_levels_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ProfilePicturePath string `json:"profile_picture_path" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + Pagination *paginator.Pagination `json:"pagination"` +} + +type UsersCreateRequest struct { + Username string `json:"username" validate:"required,lowercase"` + Email string `json:"email" validate:"required,email"` + Fullname string `json:"fullname" validate:"required"` + Address string `json:"address" validate:"required"` + PhoneNumber string `json:"phone_number" validate:"required"` + WorkType string `json:"work_type" validate:"required"` + GenderType string `json:"gender_type" validate:"required"` + IdentityType string `json:"identity_type" validate:"required"` + IdentityNumber string `json:"identity_number" validate:"required"` + DateOfBirth string `json:"date_of_birth" validate:"required"` + LastEducation string `json:"last_education" validate:"required"` + KeycloakId string `json:"keycloak_id" validate:"required"` + UserRoleId int `json:"user_role_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + UserLevelsId int `json:"user_levels_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ProfilePicturePath string `json:"profile_picture_path" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` +} + +func (req UsersCreateRequest) ToEntity() *entity.Users { + return &entity.Users{ + Username: req.Username, + Email: req.Email, + Fullname: req.Fullname, + Address: req.Address, + PhoneNumber: req.PhoneNumber, + WorkType: req.WorkType, + GenderType: req.GenderType, + IdentityType: req.IdentityType, + IdentityNumber: req.IdentityNumber, + DateOfBirth: req.DateOfBirth, + LastEducation: req.LastEducation, + KeycloakId: req.KeycloakId, + UserRoleId: req.UserRoleId, + StatusId: req.StatusId, + UserLevelsId: req.UserLevelsId, + CreatedById: req.CreatedById, + ProfilePicturePath: req.ProfilePicturePath, + IsActive: req.IsActive, + } +} + +type UsersUpdateRequest struct { + ID uint `json:"id" validate:"required"` + Username string `json:"username" validate:"required,lowercase"` + Email string `json:"email" validate:"required,email"` + Fullname string `json:"fullname" validate:"required"` + Address string `json:"address" validate:"required"` + PhoneNumber string `json:"phone_number" validate:"required"` + WorkType string `json:"work_type" validate:"required"` + GenderType string `json:"gender_type" validate:"required"` + IdentityType string `json:"identity_type" validate:"required"` + IdentityNumber string `json:"identity_number" validate:"required"` + DateOfBirth string `json:"date_of_birth" validate:"required"` + LastEducation string `json:"last_education" validate:"required"` + KeycloakId string `json:"keycloak_id" validate:"required"` + UserRoleId int `json:"user_role_id" validate:"required"` + StatusId int `json:"status_id" validate:"required"` + UserLevelsId int `json:"user_levels_id" validate:"required"` + CreatedById int `json:"created_by_id" validate:"required"` + ProfilePicturePath string `json:"profile_picture_path" validate:"required"` + IsActive bool `json:"is_active" validate:"required"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +func (req UsersUpdateRequest) ToEntity() *entity.Users { + return &entity.Users{ + ID: req.ID, + Username: req.Username, + Email: req.Email, + Fullname: req.Fullname, + Address: req.Address, + PhoneNumber: req.PhoneNumber, + WorkType: req.WorkType, + GenderType: req.GenderType, + IdentityType: req.IdentityType, + IdentityNumber: req.IdentityNumber, + DateOfBirth: req.DateOfBirth, + LastEducation: req.LastEducation, + KeycloakId: req.KeycloakId, + UserRoleId: req.UserRoleId, + StatusId: req.StatusId, + UserLevelsId: req.UserLevelsId, + CreatedById: req.CreatedById, + ProfilePicturePath: req.ProfilePicturePath, + IsActive: req.IsActive, + CreatedAt: req.CreatedAt, + UpdatedAt: req.UpdatedAt, + } +} diff --git a/app/module/users/response/users.response.go b/app/module/users/response/users.response.go new file mode 100644 index 0000000..60a7eb6 --- /dev/null +++ b/app/module/users/response/users.response.go @@ -0,0 +1,27 @@ +package response + +import "time" + +type UsersResponse struct { + ID uint `json:"id"` + Username string `json:"username"` + Email string `json:"email"` + Fullname string `json:"fullname"` + Address string `json:"address"` + PhoneNumber string `json:"phone_number"` + WorkType string `json:"work_type"` + GenderType string `json:"gender_type"` + IdentityType string `json:"identity_type"` + IdentityNumber string `json:"identity_number"` + DateOfBirth string `json:"date_of_birth"` + LastEducation string `json:"last_education"` + KeycloakId string `json:"keycloak_id"` + UserRoleId int `json:"user_role_id"` + StatusId int `json:"status_id"` + UserLevelsId int `json:"user_levels_id"` + CreatedById int `json:"created_by_id"` + ProfilePicturePath string `json:"profile_picture_path"` + IsActive bool `json:"is_active"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} \ No newline at end of file diff --git a/app/module/users/service/users.service.go b/app/module/users/service/users.service.go new file mode 100644 index 0000000..8fc0295 --- /dev/null +++ b/app/module/users/service/users.service.go @@ -0,0 +1,72 @@ +package service + +import ( + "github.com/rs/zerolog" + "go-humas-be/app/module/users/mapper" + "go-humas-be/app/module/users/repository" + "go-humas-be/app/module/users/request" + "go-humas-be/app/module/users/response" + "go-humas-be/utils/paginator" +) + +// UsersService +type usersService struct { + Repo repository.UsersRepository + Log zerolog.Logger +} + +// UsersService define interface of IUsersService +type UsersService interface { + All(req request.UsersQueryRequest) (users []*response.UsersResponse, paging paginator.Pagination, err error) + Show(id uint) (users *response.UsersResponse, err error) + Save(req request.UsersCreateRequest) (err error) + Update(id uint, req request.UsersUpdateRequest) (err error) + Delete(id uint) error +} + +// NewUsersService init UsersService +func NewUsersService(repo repository.UsersRepository, log zerolog.Logger) UsersService { + + return &usersService{ + Repo: repo, + Log: log, + } +} + +// All implement interface of UsersService +func (_i *usersService) All(req request.UsersQueryRequest) (userss []*response.UsersResponse, paging paginator.Pagination, err error) { + results, paging, err := _i.Repo.GetAll(req) + if err != nil { + return + } + + for _, result := range results { + userss = append(userss, mapper.UsersResponseMapper(result)) + } + + return +} + +func (_i *usersService) Show(id uint) (users *response.UsersResponse, err error) { + result, err := _i.Repo.FindOne(id) + if err != nil { + return nil, err + } + + return mapper.UsersResponseMapper(result), nil +} + +func (_i *usersService) Save(req request.UsersCreateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + + return _i.Repo.Create(req.ToEntity()) +} + +func (_i *usersService) Update(id uint, req request.UsersUpdateRequest) (err error) { + _i.Log.Info().Interface("data", req).Msg("") + return _i.Repo.Update(id, req.ToEntity()) +} + +func (_i *usersService) Delete(id uint) error { + return _i.Repo.Delete(id) +} diff --git a/app/module/users/users.module.go b/app/module/users/users.module.go new file mode 100644 index 0000000..d10a291 --- /dev/null +++ b/app/module/users/users.module.go @@ -0,0 +1,53 @@ +package users + +import ( + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/users/controller" + "go-humas-be/app/module/users/repository" + "go-humas-be/app/module/users/service" + "go.uber.org/fx" +) + +// struct of UsersRouter +type UsersRouter struct { + App fiber.Router + Controller *controller.Controller +} + +// register bulky of Users module +var NewUsersModule = fx.Options( + // register repository of Users module + fx.Provide(repository.NewUsersRepository), + + // register service of Users module + fx.Provide(service.NewUsersService), + + // register controller of Users module + fx.Provide(controller.NewController), + + // register router of Users module + fx.Provide(NewUsersRouter), +) + +// init UsersRouter +func NewUsersRouter(fiber *fiber.App, controller *controller.Controller) *UsersRouter { + return &UsersRouter{ + App: fiber, + Controller: controller, + } +} + +// register routes of Users module +func (_i *UsersRouter) RegisterUsersRoutes() { + // define controllers + usersController := _i.Controller.Users + + // define routes + _i.App.Route("/users", func(router fiber.Router) { + router.Get("/", usersController.All) + router.Get("/:id", usersController.Show) + router.Post("/", usersController.Save) + router.Put("/:id", usersController.Update) + router.Delete("/:id", usersController.Delete) + }) +} diff --git a/app/router/api.go b/app/router/api.go new file mode 100644 index 0000000..6b4c920 --- /dev/null +++ b/app/router/api.go @@ -0,0 +1,122 @@ +package router + +import ( + swagger "github.com/arsmn/fiber-swagger/v2" + "github.com/gofiber/fiber/v2" + "go-humas-be/app/module/article_categories" + "go-humas-be/app/module/article_category_details" + "go-humas-be/app/module/article_files" + "go-humas-be/app/module/articles" + "go-humas-be/app/module/cities" + "go-humas-be/app/module/districts" + "go-humas-be/app/module/magazine_files" + "go-humas-be/app/module/magazines" + "go-humas-be/app/module/master_menus" + "go-humas-be/app/module/master_modules" + "go-humas-be/app/module/ppid_data_categories" + "go-humas-be/app/module/ppid_data_files" + "go-humas-be/app/module/provinces" + "go-humas-be/app/module/user_levels" + "go-humas-be/app/module/user_role_accesses" + "go-humas-be/app/module/user_roles" + "go-humas-be/app/module/users" + "go-humas-be/config/config" + _ "go-humas-be/docs/swagger" +) + +type Router struct { + App fiber.Router + Cfg *config.Config + + ArticleCategoriesRouter *article_categories.ArticleCategoriesRouter + ArticleCategoryDetailsRouter *article_category_details.ArticleCategoryDetailsRouter + ArticleFilesRouter *article_files.ArticleFilesRouter + ArticlesRouter *articles.ArticlesRouter + CitiesRouter *cities.CitiesRouter + DistrictsRouter *districts.DistrictsRouter + MagazineFilesRouter *magazine_files.MagazineFilesRouter + MagazinesRouter *magazines.MagazinesRouter + MasterMenusRouter *master_menus.MasterMenusRouter + MasterModulesRouter *master_modules.MasterModulesRouter + PpidDataCategoriesRouter *ppid_data_categories.PpidDataCategoriesRouter + PpidDataFilesRouter *ppid_data_files.PpidDataFilesRouter + ProvincesRouter *provinces.ProvincesRouter + UserLevelsRouter *user_levels.UserLevelsRouter + UserRoleAccessesRouter *user_role_accesses.UserRoleAccessesRouter + UserRolesRouter *user_roles.UserRolesRouter + UsersRouter *users.UsersRouter +} + +func NewRouter( + fiber *fiber.App, + cfg *config.Config, + + articleCategoriesRouter *article_categories.ArticleCategoriesRouter, + articleCategoryDetailsRouter *article_category_details.ArticleCategoryDetailsRouter, + articleFilesRouter *article_files.ArticleFilesRouter, + articlesRouter *articles.ArticlesRouter, + citiesRouter *cities.CitiesRouter, + districtsRouter *districts.DistrictsRouter, + magazineFilesRouter *magazine_files.MagazineFilesRouter, + magazinesRouter *magazines.MagazinesRouter, + masterMenuRouter *master_menus.MasterMenusRouter, + masterModuleRouter *master_modules.MasterModulesRouter, + ppidDataCategoriesRouter *ppid_data_categories.PpidDataCategoriesRouter, + ppidDataFilesRouter *ppid_data_files.PpidDataFilesRouter, + provincesRouter *provinces.ProvincesRouter, + userLevelsRouter *user_levels.UserLevelsRouter, + userRoleAccessesRouter *user_role_accesses.UserRoleAccessesRouter, + userRolesRouter *user_roles.UserRolesRouter, + usersRouter *users.UsersRouter, +) *Router { + return &Router{ + App: fiber, + Cfg: cfg, + ArticleCategoriesRouter: articleCategoriesRouter, + ArticleCategoryDetailsRouter: articleCategoryDetailsRouter, + ArticleFilesRouter: articleFilesRouter, + ArticlesRouter: articlesRouter, + CitiesRouter: citiesRouter, + DistrictsRouter: districtsRouter, + MagazineFilesRouter: magazineFilesRouter, + MagazinesRouter: magazinesRouter, + MasterMenusRouter: masterMenuRouter, + MasterModulesRouter: masterModuleRouter, + PpidDataCategoriesRouter: ppidDataCategoriesRouter, + PpidDataFilesRouter: ppidDataFilesRouter, + ProvincesRouter: provincesRouter, + UserLevelsRouter: userLevelsRouter, + UserRoleAccessesRouter: userRoleAccessesRouter, + UserRolesRouter: userRolesRouter, + UsersRouter: usersRouter, + } +} + +// Register routes +func (r *Router) Register() { + // Test Routes + r.App.Get("/ping", func(c *fiber.Ctx) error { + return c.SendString("Pong! 👋") + }) + + //Swagger Documentation + r.App.Get("/swagger/*", swagger.HandlerDefault) + + // Register routes of modules + r.ArticleCategoriesRouter.RegisterArticleCategoriesRoutes() + r.ArticleCategoryDetailsRouter.RegisterArticleCategoryDetailsRoutes() + r.ArticleFilesRouter.RegisterArticleFilesRoutes() + r.ArticlesRouter.RegisterArticlesRoutes() + r.CitiesRouter.RegisterCitiesRoutes() + r.DistrictsRouter.RegisterDistrictsRoutes() + r.MagazinesRouter.RegisterMagazinesRoutes() + r.MagazineFilesRouter.RegisterMagazineFilesRoutes() + r.MasterMenusRouter.RegisterMasterMenusRoutes() + r.MasterModulesRouter.RegisterMasterModulesRoutes() + r.PpidDataCategoriesRouter.RegisterPpidDataCategoriesRoutes() + r.PpidDataFilesRouter.RegisterPpidDataFilesRoutes() + r.ProvincesRouter.RegisterProvincesRoutes() + r.UserLevelsRouter.RegisterUserLevelsRoutes() + r.UserRoleAccessesRouter.RegisterUserRoleAccessesRoutes() + r.UsersRouter.RegisterUsersRoutes() +} diff --git a/config/config/index.config.main.go b/config/config/index.config.main.go new file mode 100644 index 0000000..d4a2c84 --- /dev/null +++ b/config/config/index.config.main.go @@ -0,0 +1,119 @@ +package config + +import ( + "github.com/gofiber/fiber/v2" + "github.com/gofiber/fiber/v2/middleware/compress" + "github.com/pelletier/go-toml/v2" + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" + "os" + "path/filepath" + "runtime" + "strings" + "time" +) + +type app = struct { + Name string `toml:"name"` + Port string `toml:"port"` + PrintRoutes bool `toml:"print-routes"` + Prefork bool `toml:"prefork"` + Production bool `toml:"production"` + IdleTimeout time.Duration `toml:"idle-timeout"` +} + +// db struct config +type db = struct { + Postgres struct { + DSN string `toml:"dsn"` + Migrate bool `toml:"migrate"` + Seed bool `toml:"seed"` + } +} + +// log struct config +type logger = struct { + TimeFormat string `toml:"time-format"` + Level zerolog.Level `toml:"level"` + Prettier bool `toml:"prettier"` +} + +// middleware +type middleware = struct { + Compress struct { + Enable bool + Level compress.Level + } + + Recover struct { + Enable bool + } + + Monitor struct { + Enable bool + Path string + } + + Pprof struct { + Enable bool + } + + Limiter struct { + Enable bool + Max int + Expiration time.Duration `toml:"expiration_seconds"` + } +} + +type Config struct { + App app + DB db + Logger logger + Middleware middleware +} + +// NewConfig : initialize config +func NewConfig() *Config { + config, err := ParseConfig("config") + if err != nil && !fiber.IsChild() { + // panic if config is not found + log.Panic().Err(err).Msg("config not found") + } + + return config +} + +// ParseConfig : func to parse config +func ParseConfig(name string, debug ...bool) (*Config, error) { + var ( + contents *Config + file []byte + err error + ) + + if len(debug) > 0 { + file, err = os.ReadFile(name) + } else { + _, b, _, _ := runtime.Caller(0) + // get base path + path := filepath.Dir(filepath.Dir(filepath.Dir(b))) + file, err = os.ReadFile(filepath.Join(path, "./config/toml/", name+".toml")) + } + + if err != nil { + return &Config{}, err + } + + err = toml.Unmarshal(file, &contents) + + return contents, err +} + +// ParseAddress : func to parse address +func ParseAddress(raw string) (host, port string) { + if i := strings.LastIndex(raw, ":"); i > 0 { + return raw[:i], raw[i+1:] + } + + return raw, "" +} diff --git a/config/logger/index.logger.go b/config/logger/index.logger.go new file mode 100644 index 0000000..beac391 --- /dev/null +++ b/config/logger/index.logger.go @@ -0,0 +1,45 @@ +package logger + +import ( + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" + "go-humas-be/config/config" + "os" +) + +// NewLogger : initialize logger +func NewLogger(cfg *config.Config) zerolog.Logger { + zerolog.TimeFieldFormat = cfg.Logger.TimeFormat + + if cfg.Logger.Prettier { + //log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}) + + logFile, _ := os.OpenFile( + "debug.log", + os.O_APPEND|os.O_CREATE|os.O_WRONLY, + 0664, + ) + + multi := zerolog.MultiLevelWriter(os.Stdout, logFile) + log.Logger = zerolog.New(multi).With().Timestamp().Logger() + } + + zerolog.SetGlobalLevel(cfg.Logger.Level) + + return log.Hook(PreforkHook{}) +} + +// PreforkHook : prefer hook for zerologger +type PreforkHook struct{} + +func (h PreforkHook) Run(e *zerolog.Event, level zerolog.Level, msg string) { + //if fiber.IsChild() { + // e.Discard() + //} +} + +type StringerFunc func() string + +func (f StringerFunc) String() string { + return f() +} diff --git a/config/toml/config.toml b/config/toml/config.toml new file mode 100644 index 0000000..b8d7f91 --- /dev/null +++ b/config/toml/config.toml @@ -0,0 +1,38 @@ +# Configuration vars for cmd/app +[app] +name = "Fiber starter" +port = ":8800" +idle-timeout = 5 # As seconds +print-routes = false +prefork = true +production = false + +[db.postgres] +dsn = "postgresql://humas_polri:P@ssw0rd.1@103.82.242.92:5432/humas_polri" # ://:@:/ +migrate = false +seed = false + +[logger] +log-dir = "debug.log" +time-format = "" # https://pkg.go.dev/time#pkg-constants, https://github.com/rs/zerolog/blob/master/api.go#L10 +level = 0 # panic -> 5, fatal -> 4, error -> 3, warn -> 2, info -> 1, debug -> 0, trace -> -1 +prettier = true + +[middleware.compress] +enable = true +level = 1 + +[middleware.recover] +enable = true + +[middleware.monitor] +enable = false +path = "/monitor" + +[middleware.pprof] +enable = true + +[middleware.limiter] +enable = false +max = 20 +expiration_seconds = 60 \ No newline at end of file diff --git a/config/webserver/webserver.config.go b/config/webserver/webserver.config.go new file mode 100644 index 0000000..84e0766 --- /dev/null +++ b/config/webserver/webserver.config.go @@ -0,0 +1,144 @@ +package webserver + +import ( + "context" + "flag" + "github.com/gofiber/fiber/v2" + futils "github.com/gofiber/fiber/v2/utils" + "github.com/rs/zerolog" + "go-humas-be/app/database" + "go-humas-be/app/database/seeds" + md "go-humas-be/app/middleware" + "go-humas-be/app/router" + "go-humas-be/config/config" + "go-humas-be/utils/response" + "go.uber.org/fx" + "os" + "runtime" + "strings" + "time" +) + +// NewFiber : initialize the webserver +func NewFiber(cfg *config.Config) *fiber.App { + // setup + app := fiber.New(fiber.Config{ + ServerHeader: cfg.App.Name, + AppName: cfg.App.Name, + Prefork: cfg.App.Prefork, + ErrorHandler: response.ErrorHandler, + IdleTimeout: cfg.App.IdleTimeout * time.Second, + EnablePrintRoutes: cfg.App.PrintRoutes, + DisableStartupMessage: true, + }) + + // pass production config to check it + response.IsProduction = cfg.App.Production + + return app +} + +// Start : function to start webserver +func Start(lifecycle fx.Lifecycle, cfg *config.Config, fiber *fiber.App, router *router.Router, middlewares *md.Middleware, db *database.Database, log zerolog.Logger) { + lifecycle.Append( + fx.Hook{ + OnStart: func(ctx context.Context) error { + // Register middlewares & routes + middlewares.Register() + router.Register() + + // Custom Startup Messages + host, port := config.ParseAddress(cfg.App.Port) + if host == "" { + if fiber.Config().Network == "tcp6" { + host = "[::1]" + } else { + host = "0.0.0.0" + } + } + + // ASCII Art + ascii, err := os.ReadFile("./storage/ascii_art.txt") + if err != nil { + log.Debug().Err(err).Msg("An unknown error occurred when to print ASCII art!") + } + + for _, line := range strings.Split(futils.UnsafeString(ascii), "\n") { + log.Info().Msg(line) + } + + // Information message + log.Info().Msg(fiber.Config().AppName + " is running at the moment!") + + // Debug informations + if !cfg.App.Production { + prefork := "Enabled" + procs := runtime.GOMAXPROCS(0) + if !cfg.App.Prefork { + procs = 1 + prefork = "Disabled" + } + + log.Debug().Msgf("Version: %s", "-") + log.Debug().Msgf("Host: %s", host) + log.Debug().Msgf("Port: %s", port) + log.Debug().Msgf("Prefork: %s", prefork) + log.Debug().Msgf("Handlers: %d", fiber.HandlersCount()) + log.Debug().Msgf("Processes: %d", procs) + log.Debug().Msgf("PID: %d", os.Getpid()) + } + + // Listen the app (with TLS Support) + //if cfg.App.TLS.Enable { + // log.Debug().Msg("TLS support was enabled.") + // + // if err := fiber.ListenTLS(cfg.App.Port, cfg.App.TLS.CertFile, cfg.App.TLS.KeyFile); err != nil { + // log.Error().Err(err).Msg("An unknown error occurred when to run server!") + // } + //} + + go func() { + if err := fiber.Listen(cfg.App.Port); err != nil { + log.Error().Err(err).Msg("An unknown error occurred when to run server!") + } + }() + + db.ConnectDatabase() + + migrateFlag := flag.Bool("migrate", db.Cfg.DB.Postgres.Migrate, "migrate the database") + seedFlag := flag.Bool("seed", db.Cfg.DB.Postgres.Seed, "seed the database") + flag.Parse() + + // read flag -migrate to migrate the database + if *migrateFlag { + db.MigrateModels() + } + // read flag -seed to seed the database + if *seedFlag { + + // init seed models + masterStatusSeeder := seeds.MasterStatusesSeeder{} + allSeeders := []database.Seeder{masterStatusSeeder} + + db.SeedModels(allSeeders) + } + + return nil + }, + OnStop: func(ctx context.Context) error { + log.Info().Msg("Shutting down the app...") + if err := fiber.Shutdown(); err != nil { + log.Panic().Err(err).Msg("") + } + + log.Info().Msg("Running cleanup tasks...") + log.Info().Msg("1- Shutdown the database") + db.ShutdownDatabase() + log.Info().Msgf("%s was successful shutdown.", cfg.App.Name) + log.Info().Msg("\u001b[96msee you again👋\u001b[0m") + + return nil + }, + }, + ) +} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go new file mode 100644 index 0000000..7ca9d2c --- /dev/null +++ b/docs/swagger/docs.go @@ -0,0 +1,5002 @@ +// Package swagger Code generated by swaggo/swag. DO NOT EDIT +package swagger + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "contact": {}, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/article-categories": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Get all ArticleCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Create ArticleCategories", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ArticleCategoriesCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-categories/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Get one ArticleCategories", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleCategories", + "tags": [ + "Task" + ], + "summary": "update ArticleCategories", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ArticleCategoriesCreateRequest" + } + }, + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleCategories", + "tags": [ + "Task" + ], + "summary": "delete ArticleCategories", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-category-details": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Get all ArticleCategoryDetails", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Create ArticleCategoryDetails", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-category-details/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Get one ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "update ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "delete ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Get all ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Create ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files/viewer": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Create ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Get one ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleFiles", + "tags": [ + "Task" + ], + "summary": "update ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleFiles", + "tags": [ + "Task" + ], + "summary": "delete ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/articles": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Articles", + "tags": [ + "Task" + ], + "summary": "Get all Articles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Articles", + "tags": [ + "Task" + ], + "summary": "Create Articles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/articles/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Articles", + "tags": [ + "Task" + ], + "summary": "Get one Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Articles", + "tags": [ + "Task" + ], + "summary": "update Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Articles", + "tags": [ + "Task" + ], + "summary": "delete Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/cities": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Cities", + "tags": [ + "Task" + ], + "summary": "Get all Cities", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Cities", + "tags": [ + "Task" + ], + "summary": "Create Cities", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.CitiesCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/cities/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Cities", + "tags": [ + "Task" + ], + "summary": "Get one Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Cities", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "update Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.CitiesUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Cities", + "tags": [ + "Task" + ], + "summary": "delete Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/districts": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Districts", + "tags": [ + "Task" + ], + "summary": "Get all Districts", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Districts", + "tags": [ + "Task" + ], + "summary": "Create Districts", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/districts/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Districts", + "tags": [ + "Task" + ], + "summary": "Get one Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Districts", + "tags": [ + "Task" + ], + "summary": "update Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Districts", + "tags": [ + "Task" + ], + "summary": "delete Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazine-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Get all MagazineFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Create MagazineFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazine-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Get one MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MagazineFiles", + "tags": [ + "Task" + ], + "summary": "update MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MagazineFiles", + "tags": [ + "Task" + ], + "summary": "delete MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazines": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Magazines", + "tags": [ + "Task" + ], + "summary": "Get all Magazines", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Magazines", + "tags": [ + "Task" + ], + "summary": "Create Magazines", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazines/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Magazines", + "tags": [ + "Task" + ], + "summary": "Get one Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Magazines", + "tags": [ + "Task" + ], + "summary": "update Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Magazines", + "tags": [ + "Task" + ], + "summary": "delete Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-menus": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterMenus", + "tags": [ + "Task" + ], + "summary": "Get all MasterMenus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterMenus", + "tags": [ + "Task" + ], + "summary": "Create MasterMenus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-menus/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterMenus", + "tags": [ + "Task" + ], + "summary": "Get one MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterMenus", + "tags": [ + "Task" + ], + "summary": "update MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterMenus", + "tags": [ + "Task" + ], + "summary": "delete MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-modules": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterModules", + "tags": [ + "Task" + ], + "summary": "Get all MasterModules", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterModules", + "tags": [ + "Task" + ], + "summary": "Create MasterModules", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-modules/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterModules", + "tags": [ + "Task" + ], + "summary": "Get one MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterModules", + "tags": [ + "Task" + ], + "summary": "update MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterModules", + "tags": [ + "Task" + ], + "summary": "delete MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-statuses": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Get all MasterStatuses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Create MasterStatuses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-statuses/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Get one MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterStatuses", + "tags": [ + "Task" + ], + "summary": "update MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterStatuses", + "tags": [ + "Task" + ], + "summary": "delete MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-categories": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Get all PpidDataCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Create PpidDataCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-categories/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Get one PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "update PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "delete PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Get all PpidDataFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Create PpidDataFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Get one PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "update PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "delete PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-datas": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDatas", + "tags": [ + "Task" + ], + "summary": "Get all PpidDatas", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDatas", + "tags": [ + "Task" + ], + "summary": "Create PpidDatas", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-datas/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDatas", + "tags": [ + "Task" + ], + "summary": "Get one PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDatas", + "tags": [ + "Task" + ], + "summary": "update PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDatas", + "tags": [ + "Task" + ], + "summary": "delete PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/provinces": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Provinces", + "tags": [ + "Task" + ], + "summary": "Get all Provinces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Provinces", + "tags": [ + "Task" + ], + "summary": "Create Provinces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/provinces/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Provinces", + "tags": [ + "Task" + ], + "summary": "Get one Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Provinces", + "tags": [ + "Task" + ], + "summary": "update Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Provinces", + "tags": [ + "Task" + ], + "summary": "delete Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-levels": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserLevels", + "tags": [ + "Task" + ], + "summary": "Get all UserLevels", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserLevels", + "tags": [ + "Task" + ], + "summary": "Create UserLevels", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-levels/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserLevels", + "tags": [ + "Task" + ], + "summary": "Get one UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserLevels", + "tags": [ + "Task" + ], + "summary": "update UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserLevels", + "tags": [ + "Task" + ], + "summary": "delete UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-role-accesses": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Get all UserRoleAccesses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Create UserRoleAccesses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-role-accesses/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Get one UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "update UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "delete UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-roles": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserRoles", + "tags": [ + "Task" + ], + "summary": "Get all UserRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserRoles", + "tags": [ + "Task" + ], + "summary": "Create UserRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-roles/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserRoles", + "tags": [ + "Task" + ], + "summary": "Get one UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserRoles", + "tags": [ + "Task" + ], + "summary": "update UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserRoles", + "tags": [ + "Task" + ], + "summary": "delete UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/users": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Users", + "tags": [ + "Task" + ], + "summary": "Get all Users", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Users", + "tags": [ + "Task" + ], + "summary": "Create Users", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/users/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Users", + "tags": [ + "Task" + ], + "summary": "Get one Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Users", + "tags": [ + "Task" + ], + "summary": "update Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Users", + "tags": [ + "Task" + ], + "summary": "delete Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + } + }, + "definitions": { + "request.ArticleCategoriesCreateRequest": { + "type": "object", + "required": [ + "created_by_id", + "description", + "is_active", + "is_enabled", + "is_publish", + "parent_id", + "published_at", + "status_id", + "thumbnail_path", + "thumbnail_url", + "title" + ], + "properties": { + "created_by_id": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "is_enabled": { + "type": "boolean" + }, + "is_publish": { + "type": "boolean" + }, + "parent_id": { + "type": "integer" + }, + "published_at": { + "type": "string" + }, + "status_id": { + "type": "integer" + }, + "thumbnail_path": { + "type": "string" + }, + "thumbnail_url": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "request.CitiesCreateRequest": { + "type": "object", + "required": [ + "city_name", + "prov_id" + ], + "properties": { + "city_name": { + "type": "string" + }, + "prov_id": { + "type": "integer" + } + } + }, + "request.CitiesUpdateRequest": { + "type": "object", + "required": [ + "city_name", + "id", + "prov_id" + ], + "properties": { + "city_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "prov_id": { + "type": "integer" + } + } + }, + "response.Response": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "messages": { + "type": "array", + "items": {} + }, + "meta": {}, + "success": { + "type": "boolean" + } + } + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "", + Host: "", + BasePath: "", + Schemes: []string{}, + Title: "", + Description: "", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json new file mode 100644 index 0000000..a502729 --- /dev/null +++ b/docs/swagger/swagger.json @@ -0,0 +1,4973 @@ +{ + "swagger": "2.0", + "info": { + "contact": {} + }, + "paths": { + "/article-categories": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Get all ArticleCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Create ArticleCategories", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ArticleCategoriesCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-categories/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleCategories", + "tags": [ + "Task" + ], + "summary": "Get one ArticleCategories", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleCategories", + "tags": [ + "Task" + ], + "summary": "update ArticleCategories", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ArticleCategoriesCreateRequest" + } + }, + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleCategories", + "tags": [ + "Task" + ], + "summary": "delete ArticleCategories", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-category-details": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Get all ArticleCategoryDetails", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Create ArticleCategoryDetails", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-category-details/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "Get one ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "update ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleCategoryDetails", + "tags": [ + "Task" + ], + "summary": "delete ArticleCategoryDetails", + "parameters": [ + { + "type": "integer", + "description": "ArticleCategoryDetails ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Get all ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Create ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files/viewer": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Create ArticleFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/article-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one ArticleFiles", + "tags": [ + "Task" + ], + "summary": "Get one ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update ArticleFiles", + "tags": [ + "Task" + ], + "summary": "update ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete ArticleFiles", + "tags": [ + "Task" + ], + "summary": "delete ArticleFiles", + "parameters": [ + { + "type": "integer", + "description": "ArticleFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/articles": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Articles", + "tags": [ + "Task" + ], + "summary": "Get all Articles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Articles", + "tags": [ + "Task" + ], + "summary": "Create Articles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/articles/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Articles", + "tags": [ + "Task" + ], + "summary": "Get one Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Articles", + "tags": [ + "Task" + ], + "summary": "update Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Articles", + "tags": [ + "Task" + ], + "summary": "delete Articles", + "parameters": [ + { + "type": "integer", + "description": "Articles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/cities": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Cities", + "tags": [ + "Task" + ], + "summary": "Get all Cities", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Cities", + "tags": [ + "Task" + ], + "summary": "Create Cities", + "parameters": [ + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.CitiesCreateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/cities/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Cities", + "tags": [ + "Task" + ], + "summary": "Get one Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Cities", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "update Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Required payload", + "name": "payload", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.CitiesUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Cities", + "tags": [ + "Task" + ], + "summary": "delete Cities", + "parameters": [ + { + "type": "integer", + "description": "Cities ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/districts": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Districts", + "tags": [ + "Task" + ], + "summary": "Get all Districts", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Districts", + "tags": [ + "Task" + ], + "summary": "Create Districts", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/districts/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Districts", + "tags": [ + "Task" + ], + "summary": "Get one Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Districts", + "tags": [ + "Task" + ], + "summary": "update Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Districts", + "tags": [ + "Task" + ], + "summary": "delete Districts", + "parameters": [ + { + "type": "integer", + "description": "Districts ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazine-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Get all MagazineFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Create MagazineFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazine-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MagazineFiles", + "tags": [ + "Task" + ], + "summary": "Get one MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MagazineFiles", + "tags": [ + "Task" + ], + "summary": "update MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MagazineFiles", + "tags": [ + "Task" + ], + "summary": "delete MagazineFiles", + "parameters": [ + { + "type": "integer", + "description": "MagazineFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazines": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Magazines", + "tags": [ + "Task" + ], + "summary": "Get all Magazines", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Magazines", + "tags": [ + "Task" + ], + "summary": "Create Magazines", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/magazines/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Magazines", + "tags": [ + "Task" + ], + "summary": "Get one Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Magazines", + "tags": [ + "Task" + ], + "summary": "update Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Magazines", + "tags": [ + "Task" + ], + "summary": "delete Magazines", + "parameters": [ + { + "type": "integer", + "description": "Magazines ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-menus": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterMenus", + "tags": [ + "Task" + ], + "summary": "Get all MasterMenus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterMenus", + "tags": [ + "Task" + ], + "summary": "Create MasterMenus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-menus/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterMenus", + "tags": [ + "Task" + ], + "summary": "Get one MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterMenus", + "tags": [ + "Task" + ], + "summary": "update MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterMenus", + "tags": [ + "Task" + ], + "summary": "delete MasterMenus", + "parameters": [ + { + "type": "integer", + "description": "MasterMenus ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-modules": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterModules", + "tags": [ + "Task" + ], + "summary": "Get all MasterModules", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterModules", + "tags": [ + "Task" + ], + "summary": "Create MasterModules", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-modules/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterModules", + "tags": [ + "Task" + ], + "summary": "Get one MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterModules", + "tags": [ + "Task" + ], + "summary": "update MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterModules", + "tags": [ + "Task" + ], + "summary": "delete MasterModules", + "parameters": [ + { + "type": "integer", + "description": "MasterModules ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-statuses": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Get all MasterStatuses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Create MasterStatuses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/master-statuses/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one MasterStatuses", + "tags": [ + "Task" + ], + "summary": "Get one MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update MasterStatuses", + "tags": [ + "Task" + ], + "summary": "update MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete MasterStatuses", + "tags": [ + "Task" + ], + "summary": "delete MasterStatuses", + "parameters": [ + { + "type": "integer", + "description": "MasterStatuses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-categories": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Get all PpidDataCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Create PpidDataCategories", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-categories/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "Get one PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "update PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDataCategories", + "tags": [ + "Task" + ], + "summary": "delete PpidDataCategories", + "parameters": [ + { + "type": "integer", + "description": "PpidDataCategories ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-files": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Get all PpidDataFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Create PpidDataFiles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-data-files/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "Get one PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "update PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDataFiles", + "tags": [ + "Task" + ], + "summary": "delete PpidDataFiles", + "parameters": [ + { + "type": "integer", + "description": "PpidDataFiles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-datas": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all PpidDatas", + "tags": [ + "Task" + ], + "summary": "Get all PpidDatas", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create PpidDatas", + "tags": [ + "Task" + ], + "summary": "Create PpidDatas", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/ppid-datas/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one PpidDatas", + "tags": [ + "Task" + ], + "summary": "Get one PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update PpidDatas", + "tags": [ + "Task" + ], + "summary": "update PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete PpidDatas", + "tags": [ + "Task" + ], + "summary": "delete PpidDatas", + "parameters": [ + { + "type": "integer", + "description": "PpidDatas ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/provinces": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Provinces", + "tags": [ + "Task" + ], + "summary": "Get all Provinces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Provinces", + "tags": [ + "Task" + ], + "summary": "Create Provinces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/provinces/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Provinces", + "tags": [ + "Task" + ], + "summary": "Get one Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Provinces", + "tags": [ + "Task" + ], + "summary": "update Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Provinces", + "tags": [ + "Task" + ], + "summary": "delete Provinces", + "parameters": [ + { + "type": "integer", + "description": "Provinces ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-levels": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserLevels", + "tags": [ + "Task" + ], + "summary": "Get all UserLevels", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserLevels", + "tags": [ + "Task" + ], + "summary": "Create UserLevels", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-levels/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserLevels", + "tags": [ + "Task" + ], + "summary": "Get one UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserLevels", + "tags": [ + "Task" + ], + "summary": "update UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserLevels", + "tags": [ + "Task" + ], + "summary": "delete UserLevels", + "parameters": [ + { + "type": "integer", + "description": "UserLevels ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-role-accesses": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Get all UserRoleAccesses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Create UserRoleAccesses", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-role-accesses/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "Get one UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "update UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserRoleAccesses", + "tags": [ + "Task" + ], + "summary": "delete UserRoleAccesses", + "parameters": [ + { + "type": "integer", + "description": "UserRoleAccesses ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-roles": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all UserRoles", + "tags": [ + "Task" + ], + "summary": "Get all UserRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create UserRoles", + "tags": [ + "Task" + ], + "summary": "Create UserRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/user-roles/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one UserRoles", + "tags": [ + "Task" + ], + "summary": "Get one UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update UserRoles", + "tags": [ + "Task" + ], + "summary": "update UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete UserRoles", + "tags": [ + "Task" + ], + "summary": "delete UserRoles", + "parameters": [ + { + "type": "integer", + "description": "UserRoles ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/users": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting all Users", + "tags": [ + "Task" + ], + "summary": "Get all Users", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for create Users", + "tags": [ + "Task" + ], + "summary": "Create Users", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/users/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for getting one Users", + "tags": [ + "Task" + ], + "summary": "Get one Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for update Users", + "tags": [ + "Task" + ], + "summary": "update Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "API for delete Users", + "tags": [ + "Task" + ], + "summary": "delete Users", + "parameters": [ + { + "type": "integer", + "description": "Users ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "422": { + "description": "Unprocessable Entity", + "schema": { + "$ref": "#/definitions/response.Response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + } + }, + "definitions": { + "request.ArticleCategoriesCreateRequest": { + "type": "object", + "required": [ + "created_by_id", + "description", + "is_active", + "is_enabled", + "is_publish", + "parent_id", + "published_at", + "status_id", + "thumbnail_path", + "thumbnail_url", + "title" + ], + "properties": { + "created_by_id": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "is_active": { + "type": "boolean" + }, + "is_enabled": { + "type": "boolean" + }, + "is_publish": { + "type": "boolean" + }, + "parent_id": { + "type": "integer" + }, + "published_at": { + "type": "string" + }, + "status_id": { + "type": "integer" + }, + "thumbnail_path": { + "type": "string" + }, + "thumbnail_url": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "request.CitiesCreateRequest": { + "type": "object", + "required": [ + "city_name", + "prov_id" + ], + "properties": { + "city_name": { + "type": "string" + }, + "prov_id": { + "type": "integer" + } + } + }, + "request.CitiesUpdateRequest": { + "type": "object", + "required": [ + "city_name", + "id", + "prov_id" + ], + "properties": { + "city_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "prov_id": { + "type": "integer" + } + } + }, + "response.Response": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "messages": { + "type": "array", + "items": {} + }, + "meta": {}, + "success": { + "type": "boolean" + } + } + } + } +} \ No newline at end of file diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml new file mode 100644 index 0000000..efec28e --- /dev/null +++ b/docs/swagger/swagger.yaml @@ -0,0 +1,3176 @@ +definitions: + request.ArticleCategoriesCreateRequest: + properties: + created_by_id: + type: integer + description: + type: string + is_active: + type: boolean + is_enabled: + type: boolean + is_publish: + type: boolean + parent_id: + type: integer + published_at: + type: string + status_id: + type: integer + thumbnail_path: + type: string + thumbnail_url: + type: string + title: + type: string + required: + - created_by_id + - description + - is_active + - is_enabled + - is_publish + - parent_id + - published_at + - status_id + - thumbnail_path + - thumbnail_url + - title + type: object + request.CitiesCreateRequest: + properties: + city_name: + type: string + prov_id: + type: integer + required: + - city_name + - prov_id + type: object + request.CitiesUpdateRequest: + properties: + city_name: + type: string + id: + type: integer + prov_id: + type: integer + required: + - city_name + - id + - prov_id + type: object + response.Response: + properties: + code: + type: integer + data: {} + messages: + items: {} + type: array + meta: {} + success: + type: boolean + type: object +info: + contact: {} +paths: + /article-categories: + get: + description: API for getting all ArticleCategories + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all ArticleCategories + tags: + - Task + post: + description: API for create ArticleCategories + parameters: + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleCategoriesCreateRequest' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create ArticleCategories + tags: + - Task + /article-categories/{id}: + delete: + description: API for delete ArticleCategories + parameters: + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete ArticleCategories + tags: + - Task + get: + description: API for getting one ArticleCategories + parameters: + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one ArticleCategories + tags: + - Task + put: + description: API for update ArticleCategories + parameters: + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleCategoriesCreateRequest' + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update ArticleCategories + tags: + - Task + /article-category-details: + get: + description: API for getting all ArticleCategoryDetails + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all ArticleCategoryDetails + tags: + - Task + post: + description: API for create ArticleCategoryDetails + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create ArticleCategoryDetails + tags: + - Task + /article-category-details/{id}: + delete: + description: API for delete ArticleCategoryDetails + parameters: + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete ArticleCategoryDetails + tags: + - Task + get: + description: API for getting one ArticleCategoryDetails + parameters: + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one ArticleCategoryDetails + tags: + - Task + put: + description: API for update ArticleCategoryDetails + parameters: + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update ArticleCategoryDetails + tags: + - Task + /article-files: + get: + description: API for getting all ArticleFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all ArticleFiles + tags: + - Task + post: + description: API for create ArticleFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create ArticleFiles + tags: + - Task + /article-files/{id}: + delete: + description: API for delete ArticleFiles + parameters: + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete ArticleFiles + tags: + - Task + get: + description: API for getting one ArticleFiles + parameters: + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one ArticleFiles + tags: + - Task + put: + description: API for update ArticleFiles + parameters: + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update ArticleFiles + tags: + - Task + /article-files/viewer: + get: + description: API for create ArticleFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create ArticleFiles + tags: + - Task + /articles: + get: + description: API for getting all Articles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Articles + tags: + - Task + post: + description: API for create Articles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Articles + tags: + - Task + /articles/{id}: + delete: + description: API for delete Articles + parameters: + - description: Articles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Articles + tags: + - Task + get: + description: API for getting one Articles + parameters: + - description: Articles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Articles + tags: + - Task + put: + description: API for update Articles + parameters: + - description: Articles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Articles + tags: + - Task + /cities: + get: + description: API for getting all Cities + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Cities + tags: + - Task + post: + description: API for create Cities + parameters: + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.CitiesCreateRequest' + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Cities + tags: + - Task + /cities/{id}: + delete: + description: API for delete Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Cities + tags: + - Task + get: + description: API for getting one Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Cities + tags: + - Task + put: + consumes: + - application/json + description: API for update Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.CitiesUpdateRequest' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Cities + tags: + - Task + /districts: + get: + description: API for getting all Districts + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Districts + tags: + - Task + post: + description: API for create Districts + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Districts + tags: + - Task + /districts/{id}: + delete: + description: API for delete Districts + parameters: + - description: Districts ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Districts + tags: + - Task + get: + description: API for getting one Districts + parameters: + - description: Districts ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Districts + tags: + - Task + put: + description: API for update Districts + parameters: + - description: Districts ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Districts + tags: + - Task + /magazine-files: + get: + description: API for getting all MagazineFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all MagazineFiles + tags: + - Task + post: + description: API for create MagazineFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create MagazineFiles + tags: + - Task + /magazine-files/{id}: + delete: + description: API for delete MagazineFiles + parameters: + - description: MagazineFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete MagazineFiles + tags: + - Task + get: + description: API for getting one MagazineFiles + parameters: + - description: MagazineFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one MagazineFiles + tags: + - Task + put: + description: API for update MagazineFiles + parameters: + - description: MagazineFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update MagazineFiles + tags: + - Task + /magazines: + get: + description: API for getting all Magazines + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Magazines + tags: + - Task + post: + description: API for create Magazines + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Magazines + tags: + - Task + /magazines/{id}: + delete: + description: API for delete Magazines + parameters: + - description: Magazines ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Magazines + tags: + - Task + get: + description: API for getting one Magazines + parameters: + - description: Magazines ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Magazines + tags: + - Task + put: + description: API for update Magazines + parameters: + - description: Magazines ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Magazines + tags: + - Task + /master-menus: + get: + description: API for getting all MasterMenus + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all MasterMenus + tags: + - Task + post: + description: API for create MasterMenus + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create MasterMenus + tags: + - Task + /master-menus/{id}: + delete: + description: API for delete MasterMenus + parameters: + - description: MasterMenus ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete MasterMenus + tags: + - Task + get: + description: API for getting one MasterMenus + parameters: + - description: MasterMenus ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one MasterMenus + tags: + - Task + put: + description: API for update MasterMenus + parameters: + - description: MasterMenus ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update MasterMenus + tags: + - Task + /master-modules: + get: + description: API for getting all MasterModules + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all MasterModules + tags: + - Task + post: + description: API for create MasterModules + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create MasterModules + tags: + - Task + /master-modules/{id}: + delete: + description: API for delete MasterModules + parameters: + - description: MasterModules ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete MasterModules + tags: + - Task + get: + description: API for getting one MasterModules + parameters: + - description: MasterModules ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one MasterModules + tags: + - Task + put: + description: API for update MasterModules + parameters: + - description: MasterModules ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update MasterModules + tags: + - Task + /master-statuses: + get: + description: API for getting all MasterStatuses + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all MasterStatuses + tags: + - Task + post: + description: API for create MasterStatuses + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create MasterStatuses + tags: + - Task + /master-statuses/{id}: + delete: + description: API for delete MasterStatuses + parameters: + - description: MasterStatuses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete MasterStatuses + tags: + - Task + get: + description: API for getting one MasterStatuses + parameters: + - description: MasterStatuses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one MasterStatuses + tags: + - Task + put: + description: API for update MasterStatuses + parameters: + - description: MasterStatuses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update MasterStatuses + tags: + - Task + /ppid-data-categories: + get: + description: API for getting all PpidDataCategories + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all PpidDataCategories + tags: + - Task + post: + description: API for create PpidDataCategories + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create PpidDataCategories + tags: + - Task + /ppid-data-categories/{id}: + delete: + description: API for delete PpidDataCategories + parameters: + - description: PpidDataCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete PpidDataCategories + tags: + - Task + get: + description: API for getting one PpidDataCategories + parameters: + - description: PpidDataCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one PpidDataCategories + tags: + - Task + put: + description: API for update PpidDataCategories + parameters: + - description: PpidDataCategories ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update PpidDataCategories + tags: + - Task + /ppid-data-files: + get: + description: API for getting all PpidDataFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all PpidDataFiles + tags: + - Task + post: + description: API for create PpidDataFiles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create PpidDataFiles + tags: + - Task + /ppid-data-files/{id}: + delete: + description: API for delete PpidDataFiles + parameters: + - description: PpidDataFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete PpidDataFiles + tags: + - Task + get: + description: API for getting one PpidDataFiles + parameters: + - description: PpidDataFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one PpidDataFiles + tags: + - Task + put: + description: API for update PpidDataFiles + parameters: + - description: PpidDataFiles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update PpidDataFiles + tags: + - Task + /ppid-datas: + get: + description: API for getting all PpidDatas + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all PpidDatas + tags: + - Task + post: + description: API for create PpidDatas + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create PpidDatas + tags: + - Task + /ppid-datas/{id}: + delete: + description: API for delete PpidDatas + parameters: + - description: PpidDatas ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete PpidDatas + tags: + - Task + get: + description: API for getting one PpidDatas + parameters: + - description: PpidDatas ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one PpidDatas + tags: + - Task + put: + description: API for update PpidDatas + parameters: + - description: PpidDatas ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update PpidDatas + tags: + - Task + /provinces: + get: + description: API for getting all Provinces + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Provinces + tags: + - Task + post: + description: API for create Provinces + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Provinces + tags: + - Task + /provinces/{id}: + delete: + description: API for delete Provinces + parameters: + - description: Provinces ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Provinces + tags: + - Task + get: + description: API for getting one Provinces + parameters: + - description: Provinces ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Provinces + tags: + - Task + put: + description: API for update Provinces + parameters: + - description: Provinces ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Provinces + tags: + - Task + /user-levels: + get: + description: API for getting all UserLevels + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all UserLevels + tags: + - Task + post: + description: API for create UserLevels + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create UserLevels + tags: + - Task + /user-levels/{id}: + delete: + description: API for delete UserLevels + parameters: + - description: UserLevels ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete UserLevels + tags: + - Task + get: + description: API for getting one UserLevels + parameters: + - description: UserLevels ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one UserLevels + tags: + - Task + put: + description: API for update UserLevels + parameters: + - description: UserLevels ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update UserLevels + tags: + - Task + /user-role-accesses: + get: + description: API for getting all UserRoleAccesses + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all UserRoleAccesses + tags: + - Task + post: + description: API for create UserRoleAccesses + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create UserRoleAccesses + tags: + - Task + /user-role-accesses/{id}: + delete: + description: API for delete UserRoleAccesses + parameters: + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete UserRoleAccesses + tags: + - Task + get: + description: API for getting one UserRoleAccesses + parameters: + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one UserRoleAccesses + tags: + - Task + put: + description: API for update UserRoleAccesses + parameters: + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update UserRoleAccesses + tags: + - Task + /user-roles: + get: + description: API for getting all UserRoles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all UserRoles + tags: + - Task + post: + description: API for create UserRoles + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create UserRoles + tags: + - Task + /user-roles/{id}: + delete: + description: API for delete UserRoles + parameters: + - description: UserRoles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete UserRoles + tags: + - Task + get: + description: API for getting one UserRoles + parameters: + - description: UserRoles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one UserRoles + tags: + - Task + put: + description: API for update UserRoles + parameters: + - description: UserRoles ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update UserRoles + tags: + - Task + /users: + get: + description: API for getting all Users + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get all Users + tags: + - Task + post: + description: API for create Users + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Create Users + tags: + - Task + /users/{id}: + delete: + description: API for delete Users + parameters: + - description: Users ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: delete Users + tags: + - Task + get: + description: API for getting one Users + parameters: + - description: Users ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: Get one Users + tags: + - Task + put: + description: API for update Users + parameters: + - description: Users ID + in: path + name: id + required: true + type: integer + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.Response' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/response.Response' + "404": + description: Not Found + schema: + $ref: '#/definitions/response.Response' + "422": + description: Unprocessable Entity + schema: + $ref: '#/definitions/response.Response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: update Users + tags: + - Task +swagger: "2.0" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ec4d775 --- /dev/null +++ b/go.mod @@ -0,0 +1,69 @@ +module go-humas-be + +go 1.21.6 + +require ( + github.com/arsmn/fiber-swagger/v2 v2.31.1 + github.com/efectn/fx-zerolog v1.1.0 + github.com/go-playground/locales v0.14.1 + github.com/go-playground/universal-translator v0.18.1 + github.com/go-playground/validator/v10 v10.17.0 + github.com/gofiber/fiber/v2 v2.52.2 + github.com/minio/minio-go/v7 v7.0.68 + github.com/pelletier/go-toml/v2 v2.1.1 + github.com/rs/zerolog v1.31.0 + github.com/swaggo/swag v1.16.3 + go.uber.org/fx v1.20.1 + gorm.io/driver/postgres v1.5.4 + gorm.io/gorm v1.25.6 +) + +require ( + github.com/KyleBanks/depth v1.2.1 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/go-openapi/jsonpointer v0.20.3 // indirect + github.com/go-openapi/jsonreference v0.20.5 // indirect + github.com/go-openapi/spec v0.20.15 // indirect + github.com/go-openapi/swag v0.22.10 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgx/v5 v5.4.3 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/minio/md5-simd v1.1.2 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/philhofer/fwd v1.1.2 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/xid v1.5.0 // indirect + github.com/swaggo/files v1.0.1 // indirect + github.com/tinylib/msgp v1.1.8 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasthttp v1.52.0 // indirect + github.com/valyala/tcplisten v1.0.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/dig v1.17.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.19.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d4bb3cf --- /dev/null +++ b/go.sum @@ -0,0 +1,265 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= +github.com/arsmn/fiber-swagger/v2 v2.31.1 h1:VmX+flXiGGNqLX3loMEEzL3BMOZFSPwBEWR04GA6Mco= +github.com/arsmn/fiber-swagger/v2 v2.31.1/go.mod h1:ZHhMprtB3M6jd2mleG03lPGhHH0lk9u3PtfWS1cBhMA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/efectn/fx-zerolog v1.1.0 h1:n/DYCo53t/mXhL6OasOI/4+JQCYa2doc1G3ogvTGoRY= +github.com/efectn/fx-zerolog v1.1.0/go.mod h1:j7ixjXFvkky0z4s7kX0Dz8O/D+E0TQo9uG+GHJijeqQ= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.20.3 h1:jykzYWS/kyGtsHfRt6aV8JTB9pcQAXPIA7qlZ5aRlyk= +github.com/go-openapi/jsonpointer v0.20.3/go.mod h1:c7l0rjoouAuIxCm8v/JWKRgMjDG/+/7UBWsXMrv6PsM= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.20.5 h1:hutI+cQI+HbSQaIGSfsBsYI0pHk+CATf8Fk5gCSj0yI= +github.com/go-openapi/jsonreference v0.20.5/go.mod h1:thAqAp31UABtI+FQGKAQfmv7DbFpKNUlva2UPCxKu2Y= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/spec v0.20.15 h1:8bDcVxF607pTh9NpPwgsH4J5Uhh5mV5XoWnkurdiY+U= +github.com/go-openapi/spec v0.20.15/go.mod h1:o0upgqg5uYFG7O5mADrDVmSG3Wa6y6OLhwiCqQ+sTv4= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.10 h1:4y86NVn7Z2yYd6pfS4Z+Nyh3aAUL3Nul+LMbhFKy0gA= +github.com/go-openapi/swag v0.22.10/go.mod h1:Cnn8BYtRlx6BNE3DPN86f/xkapGIcLWzh3CLEb4C1jI= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= +github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofiber/fiber/v2 v2.31.0/go.mod h1:1Ega6O199a3Y7yDGuM9FyXDPYQfv+7/y48wl6WCwUF4= +github.com/gofiber/fiber/v2 v2.52.2 h1:b0rYH6b06Df+4NyrbdptQL8ifuxw/Tf2DgfkZkDaxEo= +github.com/gofiber/fiber/v2 v2.52.2/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= +github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= +github.com/minio/minio-go/v7 v7.0.68 h1:hTqSIfLlpXaKuNy4baAp4Jjy2sqZEN9hRxD0M4aOfrQ= +github.com/minio/minio-go/v7 v7.0.68/go.mod h1:XAvOPJQ5Xlzk5o3o/ArO2NMbhSGkimC+bpW/ngRKDmQ= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= +github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= +github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= +github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= +github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= +github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= +github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= +github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.20.1 h1:zVwVQGS8zYvhh9Xxcu4w1M6ESyeMzebzj2NbSayZ4Mk= +go.uber.org/fx v1.20.1/go.mod h1:iSYNbHf2y55acNCwCXKx7LbWb5WG1Bnue5RDXz1OREg= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.5.4 h1:Iyrp9Meh3GmbSuyIAGyjkN+n9K+GHX9b9MqsTL4EJCo= +gorm.io/driver/postgres v1.5.4/go.mod h1:Bgo89+h0CRcdA33Y6frlaHHVuTdOf87pmyzwW9C/BH0= +gorm.io/gorm v1.25.6 h1:V92+vVda1wEISSOMtodHVRcUIOPYa2tgQtyF+DfFx+A= +gorm.io/gorm v1.25.6/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= diff --git a/hl.exe b/hl.exe new file mode 100644 index 0000000000000000000000000000000000000000..29571410d81234ebdb35d88854e8f35fc2be97a0 GIT binary patch literal 6577152 zcmeFa33wDm`aeDsGB6ymCqghN=%7Ip4@?v#0l^u_U=Q|SP=fIQfc+ zrfu6rR@AR6in=NuXmkYv3QPbKK$Ivdh^xeNI|enVK)_@EpSP-ej${%Dvb#Rd|Hnh7 zyX$zX>aDjv_10UL=jsKfP9~En5r3hO$y9|W{d2J2_J5k;ecUOlk2AgA^_~7zX6c>& zCa9vfnVvo_pC9_L;M%P8*n%)GbXXedzm< zGuHm~oQsXWeFp{(e*@q94x|r1pFJ~%zlLYkap}V!X3vb_FSF;s;jiF%+o7|EzlrC* z17{Ckj_2CHo_+D@?1?yd)*W~5@O5}ze#4aMl!j5FJeSEdb$(}4_BSi08E#FcQ%&6y zjyv6SXo$)5UU@~=PPLZdnZYpOY+&h^H?=m9karKCi2Sw*( z>CI%iApnEDMM8D7UAtCQ{li{rcU-wHkp=wFaY6(noJ+z`8&c!{c}KU z2J&F0RPfi-RLE(fY|;N5NN!*;56H@hvYKj8)~{NHb49s`+(V{@6YyVa0?^WxsUt zb+1aG)Mb~oae$;uTPi7~m6GDCl9UNS#kE;>r7Nzjvg@oWyBd9o?%eMzB|cZX8W2n{j0QA+$755(rhu65 zq6O{IL;nA0QCp?hBI_lhIwP$Zl4T;va?2k;Iv@q3!MhVB<#w?2_Egb-yWQlS=uvXh zGCf0c)3Uw8-KxXxmhtUYOl~C)m62c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