Skip to content

Commit

Permalink
Merge pull request #136 from OMZigak/feat/#135-responsebodydto
Browse files Browse the repository at this point in the history
[feat] 제네릭 ResponseBodyDTO 구현 및 EmptyModel 구현
  • Loading branch information
JinUng41 authored Jul 8, 2024
2 parents 022a1a9 + 5209dcf commit ba7460e
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 0 deletions.
100 changes: 100 additions & 0 deletions KkuMulKum.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@
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 */; };
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 */; };
Expand Down Expand Up @@ -126,6 +133,13 @@
DE8247FF2C36E857000601BC /* ObservablePattern.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObservablePattern.swift; sourceTree = "<group>"; };
DE9E187F2C3BA4AA00DB76B4 /* CustomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomButton.swift; sourceTree = "<group>"; };
DE9E18832C3BA84500DB76B4 /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = "<group>"; };
DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseBodyDTO.swift; sourceTree = "<group>"; };
DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyModel.swift; sourceTree = "<group>"; };
DE9E18912C3BCC9D00DB76B4 /* AuthTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthTemp.swift; sourceTree = "<group>"; };
DE9E18932C3BCCA300DB76B4 /* UsersTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UsersTemp.swift; sourceTree = "<group>"; };
DE9E18952C3BCCAC00DB76B4 /* MeetingsTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingsTemp.swift; sourceTree = "<group>"; };
DE9E18972C3BCCB800DB76B4 /* PromisesTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromisesTemp.swift; sourceTree = "<group>"; };
DE9E18992C3BCCBE00DB76B4 /* UtilsTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilsTemp.swift; sourceTree = "<group>"; };
DED5DBEB2C345210006ECE7E /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
DED5DBED2C34529A006ECE7E /* BaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseView.swift; sourceTree = "<group>"; };
DED5DBEF2C345317006ECE7E /* BaseCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCollectionViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -345,6 +359,7 @@
isa = PBXGroup;
children = (
DE8247FC2C36E7C7000601BC /* MoyaLoggingPlugin.swift */,
DE9E18852C3BC8F000DB76B4 /* DTO */,
);
path = Network;
sourceTree = "<group>";
Expand All @@ -366,6 +381,84 @@
path = Components;
sourceTree = "<group>";
};
DE9E18852C3BC8F000DB76B4 /* DTO */ = {
isa = PBXGroup;
children = (
DE9E18872C3BC90300DB76B4 /* Model */,
DE9E18862C3BC8F900DB76B4 /* Response */,
);
path = DTO;
sourceTree = "<group>";
};
DE9E18862C3BC8F900DB76B4 /* Response */ = {
isa = PBXGroup;
children = (
DE9E18882C3BC91000DB76B4 /* ResponseBodyDTO.swift */,
);
path = Response;
sourceTree = "<group>";
};
DE9E18872C3BC90300DB76B4 /* Model */ = {
isa = PBXGroup;
children = (
DE9E189B2C3BCCC600DB76B4 /* Empty */,
DE9E188D2C3BCC6100DB76B4 /* Auth */,
DE9E188C2C3BCC3E00DB76B4 /* Users */,
DE9E188E2C3BCC6B00DB76B4 /* Meetings */,
DE9E188F2C3BCC7600DB76B4 /* Promises */,
DE9E18902C3BCC8000DB76B4 /* Utils */,
);
path = Model;
sourceTree = "<group>";
};
DE9E188C2C3BCC3E00DB76B4 /* Users */ = {
isa = PBXGroup;
children = (
DE9E18932C3BCCA300DB76B4 /* UsersTemp.swift */,
);
path = Users;
sourceTree = "<group>";
};
DE9E188D2C3BCC6100DB76B4 /* Auth */ = {
isa = PBXGroup;
children = (
DE9E18912C3BCC9D00DB76B4 /* AuthTemp.swift */,
);
path = Auth;
sourceTree = "<group>";
};
DE9E188E2C3BCC6B00DB76B4 /* Meetings */ = {
isa = PBXGroup;
children = (
DE9E18952C3BCCAC00DB76B4 /* MeetingsTemp.swift */,
);
path = Meetings;
sourceTree = "<group>";
};
DE9E188F2C3BCC7600DB76B4 /* Promises */ = {
isa = PBXGroup;
children = (
DE9E18972C3BCCB800DB76B4 /* PromisesTemp.swift */,
);
path = Promises;
sourceTree = "<group>";
};
DE9E18902C3BCC8000DB76B4 /* Utils */ = {
isa = PBXGroup;
children = (
DE9E18992C3BCCBE00DB76B4 /* UtilsTemp.swift */,
);
path = Utils;
sourceTree = "<group>";
};
DE9E189B2C3BCCC600DB76B4 /* Empty */ = {
isa = PBXGroup;
children = (
DE9E188A2C3BC92500DB76B4 /* EmptyModel.swift */,
);
path = Empty;
sourceTree = "<group>";
};
DED5DBEA2C345202006ECE7E /* Base */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -514,6 +607,8 @@
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 */,
DD865B642C3920F000C351A2 /* LoginViewController.swift in Sources */,
Expand All @@ -524,14 +619,19 @@
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 */,
DED5DBF42C34539A006ECE7E /* BaseTableViewCell.swift in Sources */,
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 */,
Expand Down
8 changes: 8 additions & 0 deletions KkuMulKum/Network/DTO/Model/Auth/AuthTemp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// AuthTemp.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation
10 changes: 10 additions & 0 deletions KkuMulKum/Network/DTO/Model/Empty/EmptyModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// EmptyModel.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation

struct EmptyModel: Codable {}
8 changes: 8 additions & 0 deletions KkuMulKum/Network/DTO/Model/Meetings/MeetingsTemp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// MeetingsTemp.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation
8 changes: 8 additions & 0 deletions KkuMulKum/Network/DTO/Model/Promises/PromisesTemp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// PromisesTemp.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation
8 changes: 8 additions & 0 deletions KkuMulKum/Network/DTO/Model/Users/UsersTemp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// UsersTemp.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation
8 changes: 8 additions & 0 deletions KkuMulKum/Network/DTO/Model/Utils/UtilsTemp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// UtilsTemp.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation
20 changes: 20 additions & 0 deletions KkuMulKum/Network/DTO/Response/ResponseBodyDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// ResponseBodyDTO.swift
// KkuMulKum
//
// Created by 김진웅 on 7/8/24.
//

import Foundation

/// 제네릭 ResponseBody 구조체 정의
struct ResponseBodyDTO<T: Codable>: Codable {
let data: T?
let error: ErrorResponse?
}

/// 에러 응답 구조체 정의
struct ErrorResponse: Codable {
let code: Int
let message: String
}

0 comments on commit ba7460e

Please sign in to comment.