From d4ce589adbeadf63be3385ef9e1c3355cd58a4ed Mon Sep 17 00:00:00 2001 From: JinUng41 Date: Mon, 8 Jul 2024 16:14:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat/#135=20=EC=A0=9C=EB=84=A4=EB=A6=AD=20R?= =?UTF-8?q?esponseBodyDTO=20=EA=B5=AC=ED=98=84=20=EB=B0=8F=20EmptyModel=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 32 +++++++++++++++++++ .../Network/DTO/Request/EmptyModel.swift | 10 ++++++ .../DTO/Response/ResponseBodyDTO.swift | 20 ++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 KkuMulKum/Network/DTO/Request/EmptyModel.swift create mode 100644 KkuMulKum/Network/DTO/Response/ResponseBodyDTO.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 7aa3ba9e..e46d266a 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -83,6 +83,8 @@ DE8248002C36E857000601BC /* ObservablePattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE8247FF2C36E857000601BC /* ObservablePattern.swift */; }; DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E187F2C3BA4AA00DB76B4 /* CustomButton.swift */; }; DE9E18842C3BA84500DB76B4 /* CustomTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18832C3BA84500DB76B4 /* CustomTextField.swift */; }; + DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */; }; + DE9E188B2C3BC92500DB76B4 /* EmptyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */; }; DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBEB2C345210006ECE7E /* BaseViewController.swift */; }; DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBED2C34529A006ECE7E /* BaseView.swift */; }; DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBEF2C345317006ECE7E /* BaseCollectionViewCell.swift */; }; @@ -126,6 +128,8 @@ DE8247FF2C36E857000601BC /* ObservablePattern.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObservablePattern.swift; sourceTree = ""; }; DE9E187F2C3BA4AA00DB76B4 /* CustomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomButton.swift; sourceTree = ""; }; DE9E18832C3BA84500DB76B4 /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = ""; }; + DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseBodyDTO.swift; sourceTree = ""; }; + DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyModel.swift; sourceTree = ""; }; DED5DBEB2C345210006ECE7E /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; DED5DBED2C34529A006ECE7E /* BaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseView.swift; sourceTree = ""; }; DED5DBEF2C345317006ECE7E /* BaseCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCollectionViewCell.swift; sourceTree = ""; }; @@ -345,6 +349,7 @@ isa = PBXGroup; children = ( DE8247FC2C36E7C7000601BC /* MoyaLoggingPlugin.swift */, + DE9E18852C3BC8F000DB76B4 /* DTO */, ); path = Network; sourceTree = ""; @@ -366,6 +371,31 @@ path = Components; sourceTree = ""; }; + DE9E18852C3BC8F000DB76B4 /* DTO */ = { + isa = PBXGroup; + children = ( + DE9E18872C3BC90300DB76B4 /* Request */, + DE9E18862C3BC8F900DB76B4 /* Response */, + ); + path = DTO; + sourceTree = ""; + }; + DE9E18862C3BC8F900DB76B4 /* Response */ = { + isa = PBXGroup; + children = ( + DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */, + ); + path = Response; + sourceTree = ""; + }; + DE9E18872C3BC90300DB76B4 /* Request */ = { + isa = PBXGroup; + children = ( + DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */, + ); + path = Request; + sourceTree = ""; + }; DED5DBEA2C345202006ECE7E /* Base */ = { isa = PBXGroup; children = ( @@ -514,6 +544,7 @@ files = ( DED5DBF22C34534A006ECE7E /* BaseCollectionReusableView.swift in Sources */, DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */, + DE9E188B2C3BC92500DB76B4 /* EmptyModel.swift in Sources */, DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */, DE9E18842C3BA84500DB76B4 /* CustomTextField.swift in Sources */, DD865B642C3920F000C351A2 /* LoginViewController.swift in Sources */, @@ -532,6 +563,7 @@ DED5DBF42C34539A006ECE7E /* BaseTableViewCell.swift in Sources */, 78B9286E2C29402C006D9942 /* SceneDelegate.swift in Sources */, DDA2EE792C385FCF007C6059 /* MyPageViewController.swift in Sources */, + DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */, DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */, diff --git a/KkuMulKum/Network/DTO/Request/EmptyModel.swift b/KkuMulKum/Network/DTO/Request/EmptyModel.swift new file mode 100644 index 00000000..f7e94510 --- /dev/null +++ b/KkuMulKum/Network/DTO/Request/EmptyModel.swift @@ -0,0 +1,10 @@ +// +// EmptyModel.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation + +struct EmptyModel: Codable {} diff --git a/KkuMulKum/Network/DTO/Response/ResponseBodyDTO.swift b/KkuMulKum/Network/DTO/Response/ResponseBodyDTO.swift new file mode 100644 index 00000000..df814ff3 --- /dev/null +++ b/KkuMulKum/Network/DTO/Response/ResponseBodyDTO.swift @@ -0,0 +1,20 @@ +// +// ResponseBodyDTO.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation + +/// 제네릭 ResponseBody 구조체 정의 +struct ResponseBodyDTO: Codable { + let data: T? + let error: ErrorResponse? +} + +/// 에러 응답 구조체 정의 +struct ErrorResponse: Codable { + let code: Int + let message: String +} From 5209dcfb224bcd626c89872d63df573ca5677cea Mon Sep 17 00:00:00 2001 From: JinUng41 Date: Mon, 8 Jul 2024 16:29:42 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore/#135=20=ED=8F=B4=EB=8D=94=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 74 ++++++++++++++++++- .../Network/DTO/Model/Auth/AuthTemp.swift | 8 ++ .../{Request => Model/Empty}/EmptyModel.swift | 0 .../DTO/Model/Meetings/MeetingsTemp.swift | 8 ++ .../DTO/Model/Promises/PromisesTemp.swift | 8 ++ .../Network/DTO/Model/Users/UsersTemp.swift | 8 ++ .../Network/DTO/Model/Utils/UtilsTemp.swift | 8 ++ 7 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 KkuMulKum/Network/DTO/Model/Auth/AuthTemp.swift rename KkuMulKum/Network/DTO/{Request => Model/Empty}/EmptyModel.swift (100%) create mode 100644 KkuMulKum/Network/DTO/Model/Meetings/MeetingsTemp.swift create mode 100644 KkuMulKum/Network/DTO/Model/Promises/PromisesTemp.swift create mode 100644 KkuMulKum/Network/DTO/Model/Users/UsersTemp.swift create mode 100644 KkuMulKum/Network/DTO/Model/Utils/UtilsTemp.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index e46d266a..f7c64b9d 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -85,6 +85,11 @@ DE9E18842C3BA84500DB76B4 /* CustomTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18832C3BA84500DB76B4 /* CustomTextField.swift */; }; DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */; }; DE9E188B2C3BC92500DB76B4 /* EmptyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */; }; + DE9E18922C3BCC9D00DB76B4 /* AuthTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18912C3BCC9D00DB76B4 /* AuthTemp.swift */; }; + DE9E18942C3BCCA300DB76B4 /* UsersTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18932C3BCCA300DB76B4 /* UsersTemp.swift */; }; + DE9E18962C3BCCAC00DB76B4 /* MeetingsTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18952C3BCCAC00DB76B4 /* MeetingsTemp.swift */; }; + DE9E18982C3BCCB800DB76B4 /* PromisesTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18972C3BCCB800DB76B4 /* PromisesTemp.swift */; }; + DE9E189A2C3BCCBE00DB76B4 /* UtilsTemp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9E18992C3BCCBE00DB76B4 /* UtilsTemp.swift */; }; DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBEB2C345210006ECE7E /* BaseViewController.swift */; }; DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBED2C34529A006ECE7E /* BaseView.swift */; }; DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED5DBEF2C345317006ECE7E /* BaseCollectionViewCell.swift */; }; @@ -130,6 +135,11 @@ DE9E18832C3BA84500DB76B4 /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = ""; }; DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseBodyDTO.swift; sourceTree = ""; }; DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyModel.swift; sourceTree = ""; }; + DE9E18912C3BCC9D00DB76B4 /* AuthTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthTemp.swift; sourceTree = ""; }; + DE9E18932C3BCCA300DB76B4 /* UsersTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UsersTemp.swift; sourceTree = ""; }; + DE9E18952C3BCCAC00DB76B4 /* MeetingsTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingsTemp.swift; sourceTree = ""; }; + DE9E18972C3BCCB800DB76B4 /* PromisesTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromisesTemp.swift; sourceTree = ""; }; + DE9E18992C3BCCBE00DB76B4 /* UtilsTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilsTemp.swift; sourceTree = ""; }; DED5DBEB2C345210006ECE7E /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; DED5DBED2C34529A006ECE7E /* BaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseView.swift; sourceTree = ""; }; DED5DBEF2C345317006ECE7E /* BaseCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCollectionViewCell.swift; sourceTree = ""; }; @@ -374,7 +384,7 @@ DE9E18852C3BC8F000DB76B4 /* DTO */ = { isa = PBXGroup; children = ( - DE9E18872C3BC90300DB76B4 /* Request */, + DE9E18872C3BC90300DB76B4 /* Model */, DE9E18862C3BC8F900DB76B4 /* Response */, ); path = DTO; @@ -388,12 +398,65 @@ path = Response; sourceTree = ""; }; - DE9E18872C3BC90300DB76B4 /* Request */ = { + DE9E18872C3BC90300DB76B4 /* Model */ = { + isa = PBXGroup; + children = ( + DE9E189B2C3BCCC600DB76B4 /* Empty */, + DE9E188D2C3BCC6100DB76B4 /* Auth */, + DE9E188C2C3BCC3E00DB76B4 /* Users */, + DE9E188E2C3BCC6B00DB76B4 /* Meetings */, + DE9E188F2C3BCC7600DB76B4 /* Promises */, + DE9E18902C3BCC8000DB76B4 /* Utils */, + ); + path = Model; + sourceTree = ""; + }; + DE9E188C2C3BCC3E00DB76B4 /* Users */ = { + isa = PBXGroup; + children = ( + DE9E18932C3BCCA300DB76B4 /* UsersTemp.swift */, + ); + path = Users; + sourceTree = ""; + }; + DE9E188D2C3BCC6100DB76B4 /* Auth */ = { + isa = PBXGroup; + children = ( + DE9E18912C3BCC9D00DB76B4 /* AuthTemp.swift */, + ); + path = Auth; + sourceTree = ""; + }; + DE9E188E2C3BCC6B00DB76B4 /* Meetings */ = { + isa = PBXGroup; + children = ( + DE9E18952C3BCCAC00DB76B4 /* MeetingsTemp.swift */, + ); + path = Meetings; + sourceTree = ""; + }; + DE9E188F2C3BCC7600DB76B4 /* Promises */ = { + isa = PBXGroup; + children = ( + DE9E18972C3BCCB800DB76B4 /* PromisesTemp.swift */, + ); + path = Promises; + sourceTree = ""; + }; + DE9E18902C3BCC8000DB76B4 /* Utils */ = { + isa = PBXGroup; + children = ( + DE9E18992C3BCCBE00DB76B4 /* UtilsTemp.swift */, + ); + path = Utils; + sourceTree = ""; + }; + DE9E189B2C3BCCC600DB76B4 /* Empty */ = { isa = PBXGroup; children = ( DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */, ); - path = Request; + path = Empty; sourceTree = ""; }; DED5DBEA2C345202006ECE7E /* Base */ = { @@ -544,6 +607,7 @@ files = ( DED5DBF22C34534A006ECE7E /* BaseCollectionReusableView.swift in Sources */, DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */, + DE9E18942C3BCCA300DB76B4 /* UsersTemp.swift in Sources */, DE9E188B2C3BC92500DB76B4 /* EmptyModel.swift in Sources */, DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */, DE9E18842C3BA84500DB76B4 /* CustomTextField.swift in Sources */, @@ -555,8 +619,11 @@ DE8248002C36E857000601BC /* ObservablePattern.swift in Sources */, DE254AAA2C31190E00A4015E /* UIStackView+.swift in Sources */, DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */, + DE9E18922C3BCC9D00DB76B4 /* AuthTemp.swift in Sources */, DE254AA82C3118EA00A4015E /* UIView+.swift in Sources */, DE254AAE2C31193600A4015E /* UIFont+.swift in Sources */, + DE9E189A2C3BCCBE00DB76B4 /* UtilsTemp.swift in Sources */, + DE9E18962C3BCCAC00DB76B4 /* MeetingsTemp.swift in Sources */, DE254AB22C31197B00A4015E /* UIButton+.swift in Sources */, DDA2EE772C385FC3007C6059 /* GroupListViewController.swift in Sources */, 78B9286C2C29402C006D9942 /* AppDelegate.swift in Sources */, @@ -564,6 +631,7 @@ 78B9286E2C29402C006D9942 /* SceneDelegate.swift in Sources */, DDA2EE792C385FCF007C6059 /* MyPageViewController.swift in Sources */, DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, + DE9E18982C3BCCB800DB76B4 /* PromisesTemp.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */, DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */, diff --git a/KkuMulKum/Network/DTO/Model/Auth/AuthTemp.swift b/KkuMulKum/Network/DTO/Model/Auth/AuthTemp.swift new file mode 100644 index 00000000..2abb090b --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Auth/AuthTemp.swift @@ -0,0 +1,8 @@ +// +// AuthTemp.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation diff --git a/KkuMulKum/Network/DTO/Request/EmptyModel.swift b/KkuMulKum/Network/DTO/Model/Empty/EmptyModel.swift similarity index 100% rename from KkuMulKum/Network/DTO/Request/EmptyModel.swift rename to KkuMulKum/Network/DTO/Model/Empty/EmptyModel.swift diff --git a/KkuMulKum/Network/DTO/Model/Meetings/MeetingsTemp.swift b/KkuMulKum/Network/DTO/Model/Meetings/MeetingsTemp.swift new file mode 100644 index 00000000..cc9f2114 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Meetings/MeetingsTemp.swift @@ -0,0 +1,8 @@ +// +// MeetingsTemp.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation diff --git a/KkuMulKum/Network/DTO/Model/Promises/PromisesTemp.swift b/KkuMulKum/Network/DTO/Model/Promises/PromisesTemp.swift new file mode 100644 index 00000000..66ebf8d2 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Promises/PromisesTemp.swift @@ -0,0 +1,8 @@ +// +// PromisesTemp.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation diff --git a/KkuMulKum/Network/DTO/Model/Users/UsersTemp.swift b/KkuMulKum/Network/DTO/Model/Users/UsersTemp.swift new file mode 100644 index 00000000..9d333877 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Users/UsersTemp.swift @@ -0,0 +1,8 @@ +// +// UsersTemp.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation diff --git a/KkuMulKum/Network/DTO/Model/Utils/UtilsTemp.swift b/KkuMulKum/Network/DTO/Model/Utils/UtilsTemp.swift new file mode 100644 index 00000000..4eb7a28f --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Utils/UtilsTemp.swift @@ -0,0 +1,8 @@ +// +// UtilsTemp.swift +// KkuMulKum +// +// Created by 김진웅 on 7/8/24. +// + +import Foundation