-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
23 changed files
with
1,387 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
SOPT-iOS/Projects/Data/Sources/Transform/PartRankingTransform.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// PartRankingTransform.swift | ||
// Data | ||
// | ||
// Created by Aiden.lee on 2024/04/05. | ||
// Copyright © 2024 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import Core | ||
import Domain | ||
import Networks | ||
|
||
extension PartRankingEntity { | ||
public func toDomain() -> PartRankingModel { | ||
return .init(part: part, rank: rank, points: points) | ||
} | ||
} | ||
|
29 changes: 29 additions & 0 deletions
29
SOPT-iOS/Projects/Domain/Sources/Model/PartRankingModel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// PartRankingModel.swift | ||
// Domain | ||
// | ||
// Created by Aiden.lee on 2024/04/05. | ||
// Copyright © 2024 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct PartRankingModel: Hashable { | ||
public let part: String | ||
public let rank: Int | ||
public let points: Int | ||
|
||
public init(part: String, rank: Int, points: Int) { | ||
self.part = part | ||
self.rank = rank | ||
self.points = points | ||
} | ||
} | ||
|
||
public struct PartRankingChartModel: Hashable { | ||
public let ranking: [PartRankingModel] | ||
|
||
public init(ranking: [PartRankingModel]) { | ||
self.ranking = ranking | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
SOPT-iOS/Projects/Features/StampFeature/Interface/Sources/Part.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// Part.swift | ||
// StampFeatureInterface | ||
// | ||
// Created by Aiden.lee on 2024/04/06. | ||
// Copyright © 2024 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum Part: String, CaseIterable { | ||
case plan = "기획" | ||
case design = "디자인" | ||
case web = "웹" | ||
case ios = "아요" | ||
case android = "안드" | ||
case server = "서버" | ||
|
||
public func uppercasedName() -> String { | ||
switch self { | ||
case .plan: return "PLAN" | ||
case .design: return "DESIGN" | ||
case .web: return "WEB" | ||
case .ios: return "IOS" | ||
case .android: return "ANDROID" | ||
case .server: return "SERVER" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.