Skip to content

Commit

Permalink
[Chore] sopt-makers#327 - PokeUserModel에 playgroundId 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj8706 committed Dec 21, 2023
1 parent 46fd30d commit c29814a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Networks
extension PokeUserEntity {
public func toDomain() -> PokeUserModel {
return PokeUserModel(userId: userId,
playgroundId: playgroundId,
profileImage: profileImage,
name: name,
generation: generation,
Expand Down
4 changes: 3 additions & 1 deletion SOPT-iOS/Projects/Domain/Sources/Model/PokeUserModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Foundation
// MARK: - Empty
public struct PokeUserModel: Codable {
public let userId: Int
public let playgroundId: Int
public let profileImage, name: String
public let generation: Int
public let part: String
Expand All @@ -20,8 +21,9 @@ public struct PokeUserModel: Codable {
public let mutual: [String]
public let isFirstMeet, isAlreadyPoke: Bool

public init(userId: Int, profileImage: String, name: String, generation: Int, part: String, pokeNum: Int, message: String, relationName: String, mutual: [String], isFirstMeet: Bool, isAlreadyPoke: Bool) {
public init(userId: Int, playgroundId: Int, profileImage: String, name: String, generation: Int, part: String, pokeNum: Int, message: String, relationName: String, mutual: [String], isFirstMeet: Bool, isAlreadyPoke: Bool) {
self.userId = userId
self.playgroundId = playgroundId
self.profileImage = profileImage
self.name = name
self.generation = generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import DSKit
import Domain

public enum PokeRelation: String {
case nonFriend
case newFriend = "친한친구"
case bestFriend = "단짝친구"
case soulmate = "천생연분"
Expand All @@ -19,7 +20,7 @@ public enum PokeRelation: String {
extension PokeRelation {
var color: UIColor {
switch self {
case .newFriend:
case .nonFriend, .newFriend:
return DSKitAsset.Colors.success.color
case .bestFriend:
return DSKitAsset.Colors.information.color
Expand All @@ -31,6 +32,6 @@ extension PokeRelation {

extension PokeUserModel {
var pokeRelation: PokeRelation {
return PokeRelation(rawValue: self.relationName) ?? .newFriend
return PokeRelation(rawValue: self.relationName) ?? .nonFriend
}
}
8 changes: 0 additions & 8 deletions SOPT-iOS/Projects/Features/PokeFeature/Sources/PokeTemp.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Foundation

public struct PokeUserEntity: Codable {
public let userId: Int
public let playgroundId: Int
public let profileImage, name: String
public let generation: Int
public let part: String
Expand Down

0 comments on commit c29814a

Please sign in to comment.