Skip to content

Commit

Permalink
[Add] TeamSparker#89 - Feed 데이터 모델 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsubinn committed Jan 17, 2022
1 parent 1084738 commit d345810
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Spark-iOS/Spark-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
2B9C6BCB279277D600CD914F /* GoalWriting.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B9C6BCA279277D600CD914F /* GoalWriting.storyboard */; };
2B9C6BCE2792781F00CD914F /* GoalWritingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B9C6BCD2792781F00CD914F /* GoalWritingVC.swift */; };
2BBED12D279539B90052CA5C /* WaitingMember.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BBED12C279539B90052CA5C /* WaitingMember.swift */; };
2BBED13027956C9F0052CA5C /* Feed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BBED12F27956C9F0052CA5C /* Feed.swift */; };
2BC1726D278E8F1000BA3029 /* UIView+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BC1726C278E8F1000BA3029 /* UIView+.swift */; };
2BC17270278F54DB00BA3029 /* WaitingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BC1726F278F54DB00BA3029 /* WaitingVC.swift */; };
2BC17274278F56D100BA3029 /* Waiting.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BC17273278F56D100BA3029 /* Waiting.storyboard */; };
Expand Down Expand Up @@ -132,6 +133,7 @@
2B9C6BCA279277D600CD914F /* GoalWriting.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = GoalWriting.storyboard; sourceTree = "<group>"; };
2B9C6BCD2792781F00CD914F /* GoalWritingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoalWritingVC.swift; sourceTree = "<group>"; };
2BBED12C279539B90052CA5C /* WaitingMember.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitingMember.swift; sourceTree = "<group>"; };
2BBED12F27956C9F0052CA5C /* Feed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Feed.swift; sourceTree = "<group>"; };
2BC1726C278E8F1000BA3029 /* UIView+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+.swift"; sourceTree = "<group>"; };
2BC1726F278F54DB00BA3029 /* WaitingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitingVC.swift; sourceTree = "<group>"; };
2BC17273278F56D100BA3029 /* Waiting.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Waiting.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -280,6 +282,14 @@
path = GoalWriting;
sourceTree = "<group>";
};
2BBED12E27956C4F0052CA5C /* Feed */ = {
isa = PBXGroup;
children = (
2BBED12F27956C9F0052CA5C /* Feed.swift */,
);
path = Feed;
sourceTree = "<group>";
};
2BC1726E278F54B300BA3029 /* Waiting */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -671,6 +681,7 @@
F82F57FC2792847D003E4174 /* GenericResponse.swift */,
F82F5800279287EC003E4174 /* Home */,
2BF3AB4A27947C3A001A9042 /* Room */,
2BBED12E27956C4F0052CA5C /* Feed */,
);
path = NetworkModels;
sourceTree = "<group>";
Expand Down Expand Up @@ -987,6 +998,7 @@
F8096F2B27841F4100B71D38 /* Storyboard.swift in Sources */,
2BC17270278F54DB00BA3029 /* WaitingVC.swift in Sources */,
EB9C508A2792A86D00588155 /* CompleteAuthVC.swift in Sources */,
2BBED13027956C9F0052CA5C /* Feed.swift in Sources */,
F8096F442784221900B71D38 /* Xib.swift in Sources */,
EB625E8A278F29D300C43DE9 /* CarouselLayout.swift in Sources */,
F82F57FF27928588003E4174 /* URL.swift in Sources */,
Expand Down
37 changes: 37 additions & 0 deletions Spark-iOS/Spark-iOS/Source/NetworkModels/Feed/Feed.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// Feed.swift
// Spark-iOS
//
// Created by 양수빈 on 2022/01/17.
//

import Foundation

// MARK: - Feed
struct Feed: Codable {
let data: RecordList
}

// MARK: - DataClass
struct RecordList: Codable {
let records: [Record]
}

// MARK: - Record
struct Record: Codable {
let date, day: String
let userID, recordID: Int
let nickname: String
let profileImg: String?
let certifyingImg: String?
let likeNum, sparkCount: Int
let isLiked: Bool
let timerRecord: String?

enum CodingKeys: String, CodingKey {
case date, day
case userID = "userId"
case recordID = "recordId"
case nickname, profileImg, certifyingImg, likeNum, sparkCount, isLiked, timerRecord
}
}
2 changes: 1 addition & 1 deletion Spark-iOS/Spark-iOS/Source/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window?.windowScene = windowScene
let rootViewController = UIStoryboard(name: Const.Storyboard.Name.waiting, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.waiting)
let rootViewController = UIStoryboard(name: Const.Storyboard.Name.mainTabBar, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.mainTabBar)
window?.rootViewController = rootViewController
window?.makeKeyAndVisible()
}
Expand Down

0 comments on commit d345810

Please sign in to comment.