Skip to content

Commit

Permalink
[Add/#26] Challenge DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed May 10, 2024
1 parent c0b3613 commit 622c78f
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 0 deletions.
44 changes: 44 additions & 0 deletions HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@
367243E62BEDEAF8007A5A7B /* #RequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243DF2BEDEAF8007A5A7B /* #RequestDTO.swift */; };
367243E72BEDEAF8007A5A7B /* RefreshTokenResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243E02BEDEAF8007A5A7B /* RefreshTokenResponseDTO.swift */; };
367243E82BEDEAF8007A5A7B /* LogoutResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243E12BEDEAF8007A5A7B /* LogoutResponseDTO.swift */; };
367243F42BEDEB32007A5A7B /* AddAppResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243E92BEDEB30007A5A7B /* AddAppResponseDTO.swift */; };
367243F52BEDEB32007A5A7B /* AddAppRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243EA2BEDEB31007A5A7B /* AddAppRequestDTO.swift */; };
367243F62BEDEB32007A5A7B /* DeleteAppRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243EB2BEDEB31007A5A7B /* DeleteAppRequestDTO.swift */; };
367243F72BEDEB32007A5A7B /* CreateChallengeResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243EC2BEDEB31007A5A7B /* CreateChallengeResponseDTO.swift */; };
367243F82BEDEB32007A5A7B /* GetChallengeResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243ED2BEDEB31007A5A7B /* GetChallengeResponseDTO.swift */; };
367243F92BEDEB32007A5A7B /* GetDummyResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243EE2BEDEB31007A5A7B /* GetDummyResponseDTO.swift */; };
367243FA2BEDEB32007A5A7B /* GetHomeChallengeResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243EF2BEDEB31007A5A7B /* GetHomeChallengeResponseDTO.swift */; };
367243FB2BEDEB32007A5A7B /* CreateChallengeRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243F02BEDEB31007A5A7B /* CreateChallengeRequestDTO.swift */; };
367243FC2BEDEB32007A5A7B /* HomeChallengeResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243F12BEDEB31007A5A7B /* HomeChallengeResponseDTO.swift */; };
367243FD2BEDEB32007A5A7B /* EmptyResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243F22BEDEB32007A5A7B /* EmptyResponseDTO.swift */; };
367243FE2BEDEB32007A5A7B /* MidnightRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367243F32BEDEB32007A5A7B /* MidnightRequestDTO.swift */; };
368C5D972BCC41990035A1AC /* HMHDeviceActivityReport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368C5D962BCC41990035A1AC /* HMHDeviceActivityReport.swift */; };
368C5D992BCC41990035A1AC /* TotalActivityReport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368C5D982BCC41990035A1AC /* TotalActivityReport.swift */; };
368C5D9B2BCC41990035A1AC /* TotalActivityView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368C5D9A2BCC41990035A1AC /* TotalActivityView.swift */; };
Expand Down Expand Up @@ -195,6 +206,17 @@
367243DF2BEDEAF8007A5A7B /* #RequestDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = #RequestDTO.swift; sourceTree = "<group>"; };
367243E02BEDEAF8007A5A7B /* RefreshTokenResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RefreshTokenResponseDTO.swift; sourceTree = "<group>"; };
367243E12BEDEAF8007A5A7B /* LogoutResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogoutResponseDTO.swift; sourceTree = "<group>"; };
367243E92BEDEB30007A5A7B /* AddAppResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddAppResponseDTO.swift; sourceTree = "<group>"; };
367243EA2BEDEB31007A5A7B /* AddAppRequestDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddAppRequestDTO.swift; sourceTree = "<group>"; };
367243EB2BEDEB31007A5A7B /* DeleteAppRequestDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeleteAppRequestDTO.swift; sourceTree = "<group>"; };
367243EC2BEDEB31007A5A7B /* CreateChallengeResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateChallengeResponseDTO.swift; sourceTree = "<group>"; };
367243ED2BEDEB31007A5A7B /* GetChallengeResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetChallengeResponseDTO.swift; sourceTree = "<group>"; };
367243EE2BEDEB31007A5A7B /* GetDummyResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetDummyResponseDTO.swift; sourceTree = "<group>"; };
367243EF2BEDEB31007A5A7B /* GetHomeChallengeResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetHomeChallengeResponseDTO.swift; sourceTree = "<group>"; };
367243F02BEDEB31007A5A7B /* CreateChallengeRequestDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateChallengeRequestDTO.swift; sourceTree = "<group>"; };
367243F12BEDEB31007A5A7B /* HomeChallengeResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeChallengeResponseDTO.swift; sourceTree = "<group>"; };
367243F22BEDEB32007A5A7B /* EmptyResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmptyResponseDTO.swift; sourceTree = "<group>"; };
367243F32BEDEB32007A5A7B /* MidnightRequestDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MidnightRequestDTO.swift; sourceTree = "<group>"; };
368C5D942BCC41990035A1AC /* HMHDeviceActivityReport.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.extensionkit-extension"; includeInIndex = 0; path = HMHDeviceActivityReport.appex; sourceTree = BUILT_PRODUCTS_DIR; };
368C5D962BCC41990035A1AC /* HMHDeviceActivityReport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMHDeviceActivityReport.swift; sourceTree = "<group>"; };
368C5D982BCC41990035A1AC /* TotalActivityReport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TotalActivityReport.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -568,6 +590,17 @@
367243D92BEDEAD2007A5A7B /* Challenge */ = {
isa = PBXGroup;
children = (
367243EA2BEDEB31007A5A7B /* AddAppRequestDTO.swift */,
367243E92BEDEB30007A5A7B /* AddAppResponseDTO.swift */,
367243F02BEDEB31007A5A7B /* CreateChallengeRequestDTO.swift */,
367243EC2BEDEB31007A5A7B /* CreateChallengeResponseDTO.swift */,
367243EB2BEDEB31007A5A7B /* DeleteAppRequestDTO.swift */,
367243F22BEDEB32007A5A7B /* EmptyResponseDTO.swift */,
367243ED2BEDEB31007A5A7B /* GetChallengeResponseDTO.swift */,
367243EE2BEDEB31007A5A7B /* GetDummyResponseDTO.swift */,
367243EF2BEDEB31007A5A7B /* GetHomeChallengeResponseDTO.swift */,
367243F12BEDEB31007A5A7B /* HomeChallengeResponseDTO.swift */,
367243F32BEDEB32007A5A7B /* MidnightRequestDTO.swift */,
);
path = Challenge;
sourceTree = "<group>";
Expand Down Expand Up @@ -753,13 +786,17 @@
0BF56C972BC3B871003ECFB1 /* StoryContentView.swift in Sources */,
0B3C296D2BA01C2000435B30 /* ChallengeView.swift in Sources */,
3601C8362BC6E8FB005790F7 /* HomeViewModel.swift in Sources */,
367243FC2BEDEB32007A5A7B /* HomeChallengeResponseDTO.swift in Sources */,
365CD6BF2B7E4C4F00245CDD /* ContentView.swift in Sources */,
0B82ECB22BC916C6002D5CF3 /* MyPageButton.swift in Sources */,
368CAAE22BB9B26000FA83B3 /* CustomNavigationBarModifier.swift in Sources */,
367243D42BEDE9F6007A5A7B /* NetworkResult.swift in Sources */,
367243D32BEDE9F6007A5A7B /* ResponseData.swift in Sources */,
367243F62BEDEB32007A5A7B /* DeleteAppRequestDTO.swift in Sources */,
368CAADF2BB9975C00FA83B3 /* NavigationBarView.swift in Sources */,
0B3C296B2BA01BD200435B30 /* TabBarView.swift in Sources */,
367243F42BEDEB32007A5A7B /* AddAppResponseDTO.swift in Sources */,
367243F72BEDEB32007A5A7B /* CreateChallengeResponseDTO.swift in Sources */,
0BF56C952BC39BE9003ECFB1 /* OnboardingCompleteView.swift in Sources */,
0B3C296F2BA01C2800435B30 /* HomeView.swift in Sources */,
0B5140542BE3A2D600C78B9F /* LoginView.swift in Sources */,
Expand All @@ -771,6 +808,7 @@
367243E22BEDEAF8007A5A7B /* SocialLoginRequestDTO.swift in Sources */,
0BC0E5AF2BB04B7100FB0330 /* SurveyView.swift in Sources */,
365CD6BD2B7E4C4F00245CDD /* HMH_iOSApp.swift in Sources */,
367243F92BEDEB32007A5A7B /* GetDummyResponseDTO.swift in Sources */,
0BD2D67C2B9F5A7B00733843 /* String.swift in Sources */,
0BC0E5BD2BB0571E00FB0330 /* NextButtonView.swift in Sources */,
0BC0E5A92BB03EE400FB0330 /* OnboardingModel.swift in Sources */,
Expand All @@ -780,12 +818,17 @@
0B7646BB2BB13F6100C56D7A /* SurveyButton.swift in Sources */,
0BC0E5B52BB04BD100FB0330 /* GoalTimeView.swift in Sources */,
0BC0E5AB2BB03F8100FB0330 /* OnboardingViewModel.swift in Sources */,
367243F52BEDEB32007A5A7B /* AddAppRequestDTO.swift in Sources */,
0B82ECB02BC9152F002D5CF3 /* MyPageViewModel.swift in Sources */,
0BF56C932BC39127003ECFB1 /* PickerView.swift in Sources */,
367243D12BEDE9F6007A5A7B /* NetworkHelper.swift in Sources */,
367243FD2BEDEB32007A5A7B /* EmptyResponseDTO.swift in Sources */,
367243FB2BEDEB32007A5A7B /* CreateChallengeRequestDTO.swift in Sources */,
367243F82BEDEB32007A5A7B /* GetChallengeResponseDTO.swift in Sources */,
0B9834DC2BC8234700A1457A /* SplashView.swift in Sources */,
367243E32BEDEAF8007A5A7B /* SocialLoginResponseDTO.swift in Sources */,
3601C8382BC6EC5C005790F7 /* UsageTimeListItemView.swift in Sources */,
367243FA2BEDEB32007A5A7B /* GetHomeChallengeResponseDTO.swift in Sources */,
367243E82BEDEAF8007A5A7B /* LogoutResponseDTO.swift in Sources */,
0BC0E5B12BB04BA800FB0330 /* SurveyProblemView.swift in Sources */,
367243D72BEDE9F6007A5A7B /* MoyaLoggerPlugin.swift in Sources */,
Expand All @@ -795,6 +838,7 @@
367243D62BEDE9F6007A5A7B /* APIConstants.swift in Sources */,
0B3C29712BA01C3000435B30 /* MyPageView.swift in Sources */,
0B3C29732BA01DCE00435B30 /* CustomTabView.swift in Sources */,
367243FE2BEDEB32007A5A7B /* MidnightRequestDTO.swift in Sources */,
0BC0E5AD2BB0404500FB0330 /* OnboardingContentView.swift in Sources */,
0BC0E5BB2BB04C0B00FB0330 /* AppGoalTimeView.swift in Sources */,
367243E72BEDEAF8007A5A7B /* RefreshTokenResponseDTO.swift in Sources */,
Expand Down
12 changes: 12 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/AddAppRequestDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// AddAppRequestDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct AddAppRequestDTO: Codable {
let apps: [Apps]
}
12 changes: 12 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/AddAppResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// AddAppResponseDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct AddAppResponseDTO: Codable {
let apps: [Apps]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// CreateChallengeRequestDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/12/24.
//

import Foundation

struct CreateChallengeRequestDTO: Codable {
let period, goalTime: Int
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// CreateChallengeResponseDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/12/24.
//

import Foundation

struct CreateChallengeResponseDTO: Codable {
let challengeID: Int

enum CodingKeys: String, CodingKey {
case challengeID = "challengeId"
}
}
12 changes: 12 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/DeleteAppRequestDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// DeleteAppRequestDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct DeleteAppRequestDTO: Codable {
let appCode: String
}
10 changes: 10 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/EmptyResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// EmptyResponseDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct EmptyResponseDTO: Codable { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// getChallengeResponseDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct GetChallengeResponseDTO: Codable {
let period: Int
let statuses: [String]
let todayIndex: Int
let goalTime: Int
let apps: [Apps]
}
24 changes: 24 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/GetDummyResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// GetDummyResponseDTO.swift
// HMH_iOS
//
// Created by 김보연 on 1/19/24.
//

import Foundation

struct GetDummyResponseDTO: Codable {
let apps: [App]
}

struct App: Codable {
let appName: String
let appImageURL: String
let goalTime, usageTime: Int

enum CodingKeys: String, CodingKey {
case appName
case appImageURL = "appImageUrl"
case goalTime, usageTime
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// GetHomeChallengeResponseDTO.swift
// HMH_iOS
//
// Created by 김보연 on 1/18/24.
//

import Foundation

struct GetHomeChallengeResponseDTO: Codable {
let status: String
let goalTime: Int
let apps: [Apps]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// HomeChallengeResponseDTO.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct HomeChallengeResponseDTO: Codable {
let apps: [Apps]
}
12 changes: 12 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/Challenge/MidnightRequestDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Midnight.swift
// HMH_iOS
//
// Created by 지희의 MAC on 1/16/24.
//

import Foundation

struct MidnightRequestDTO: Codable {
let apps: [Apps]
}
18 changes: 18 additions & 0 deletions HMH_iOS/HMH_iOS/Network/DTO/MyPage/GetUserDataResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// GetUserDataResponseDTO.swift
// HMH_iOS
//
// Created by 김보연 on 1/14/24.
//

import Foundation

struct GetUserDataResponseDTO: Codable {
let name: String
let point: Int

enum CodingKeys: CodingKey {
case name
case point
}
}

0 comments on commit 622c78f

Please # to comment.