Skip to content

Commit

Permalink
➕ [ADD] LoginResponseDataModel #7
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Dec 24, 2021
1 parent e10a17c commit 4c2ef96
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions DalTube/DalTube.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
9A193E172773395C00231077 /* TagCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A193E152773395C00231077 /* TagCollectionViewCell.swift */; };
9A193E182773395C00231077 /* TagCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A193E162773395C00231077 /* TagCollectionViewCell.xib */; };
9A193E1A27758AB700231077 /* APIConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A193E1927758AB700231077 /* APIConstants.swift */; };
9A193E1D27758B4900231077 /* NetworkResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A193E1C27758B4900231077 /* NetworkResult.swift */; };
9A193E1F27758BF600231077 /* LoginResponseDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A193E1E27758BF600231077 /* LoginResponseDataModel.swift */; };
9A193E2127758C5E00231077 /* UserSignService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A193E2027758C5E00231077 /* UserSignService.swift */; };
9A43F82C27293CDD002DC0D5 /* CustomTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A43F82B27293CDD002DC0D5 /* CustomTabBarController.swift */; };
9A43F838272944A2002DC0D5 /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A43F837272944A2002DC0D5 /* HomeVC.swift */; };
9A43F83A272944B6002DC0D5 /* ShortsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A43F839272944B6002DC0D5 /* ShortsVC.swift */; };
Expand Down Expand Up @@ -53,6 +56,9 @@
9A193E152773395C00231077 /* TagCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagCollectionViewCell.swift; sourceTree = "<group>"; };
9A193E162773395C00231077 /* TagCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TagCollectionViewCell.xib; sourceTree = "<group>"; };
9A193E1927758AB700231077 /* APIConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIConstants.swift; sourceTree = "<group>"; };
9A193E1C27758B4900231077 /* NetworkResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkResult.swift; sourceTree = "<group>"; };
9A193E1E27758BF600231077 /* LoginResponseDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginResponseDataModel.swift; sourceTree = "<group>"; };
9A193E2027758C5E00231077 /* UserSignService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSignService.swift; sourceTree = "<group>"; };
9A43F82B27293CDD002DC0D5 /* CustomTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTabBarController.swift; sourceTree = "<group>"; };
9A43F837272944A2002DC0D5 /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = "<group>"; };
9A43F839272944B6002DC0D5 /* ShortsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortsVC.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -122,6 +128,8 @@
isa = PBXGroup;
children = (
9A193E1927758AB700231077 /* APIConstants.swift */,
9A193E1C27758B4900231077 /* NetworkResult.swift */,
9A193E1E27758BF600231077 /* LoginResponseDataModel.swift */,
);
path = Network;
sourceTree = "<group>";
Expand All @@ -132,6 +140,7 @@
9A53B769270A7D7800ECE343 /* LoginViewController.swift */,
9A53B76B270A7DEB00ECE343 /* SigninViewController.swift */,
9A53B76D270A7E0A00ECE343 /* WelcomeViewController.swift */,
9A193E2027758C5E00231077 /* UserSignService.swift */,
);
path = Login;
sourceTree = "<group>";
Expand Down Expand Up @@ -302,10 +311,13 @@
9A04DCA52743E7BA0012658D /* HomeContentDataModel.swift in Sources */,
9A53B76A270A7D7800ECE343 /* LoginViewController.swift in Sources */,
9A193E1A27758AB700231077 /* APIConstants.swift in Sources */,
9A193E1D27758B4900231077 /* NetworkResult.swift in Sources */,
9A43F838272944A2002DC0D5 /* HomeVC.swift in Sources */,
9A193E1F27758BF600231077 /* LoginResponseDataModel.swift in Sources */,
9A04DCA22743E17F0012658D /* HomeTableViewCell.swift in Sources */,
9A43F82C27293CDD002DC0D5 /* CustomTabBarController.swift in Sources */,
9A193E13277333E500231077 /* HomeCollectionViewCell.swift in Sources */,
9A193E2127758C5E00231077 /* UserSignService.swift in Sources */,
9A53B76C270A7DEB00ECE343 /* SigninViewController.swift in Sources */,
9A43F83C272944BF002DC0D5 /* AddVC.swift in Sources */,
9A1870822708521500228B78 /* ViewController.swift in Sources */,
Expand Down
Binary file not shown.
20 changes: 20 additions & 0 deletions DalTube/DalTube/Network/LoginResponseDataModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This file was generated from JSON Schema using quicktype, do not modify it directly.
// To parse the JSON, add this file to your project and do:
//
// let welcome = try? newJSONDecoder().decode(Welcome.self, from: jsonData)

import Foundation

// MARK: - LoginResponseData
struct LoginResponseData: Codable {
let status: Int
let success: Bool
let message: String
let data: LoginResultData?
}

// MARK: - LoginResultData
struct LoginResultData: Codable {
let id: Int
let name, email: String
}
16 changes: 16 additions & 0 deletions DalTube/DalTube/Network/NetworkResult.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// NetworkResult.swift
// DalTube
//
// Created by 김선오 on 2021/12/24.
//

import Foundation

enum NetworkResult <T> {
case success(T)
case requestErr(T)
case pathErr
case serverErr
case networkFail
}

0 comments on commit 4c2ef96

Please sign in to comment.