-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from AVIRO-official/Feature/AnnouncementPopup
(24.08.21 - 24.08.28) [Feat]: 공지 팝업 업데이트
- Loading branch information
Showing
70 changed files
with
307 additions
and
82 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
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
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
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
18 changes: 0 additions & 18 deletions
18
AVIRO/Model/APIResonseModel/AVIRO/AVIROGet/ETC/AVIROWellcome+DTO.swift
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
57 changes: 57 additions & 0 deletions
57
AVIRO/Model_Domain/APIResonseModel/AVIRO/AVIROGet/ETC/AVIROWelcome+DTO.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,57 @@ | ||
// | ||
// AVIROWelcome+DTO.swift | ||
// AVIRO | ||
// | ||
// Created by 전성훈 on 2024/03/16. | ||
// | ||
|
||
import Foundation | ||
|
||
struct AVIROWelcomeDTO: Decodable { | ||
let statusCode: Int | ||
let data: [AVIROWelcomeDataDTO]? | ||
let message: String? | ||
} | ||
|
||
struct AVIROWelcomeDataDTO: Decodable { | ||
let title: String | ||
let imageURL: String | ||
let url: String? | ||
let event: String? | ||
let buttonColor: String | ||
let order: Int | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case title | ||
case imageURL = "image_url" | ||
case url | ||
case event | ||
case buttonColor = "button_color" | ||
case order | ||
} | ||
|
||
func toDomain() -> WelcomePopup { | ||
let imageURL = URL(string: imageURL)! | ||
|
||
let url = self.url.flatMap { URL(string: $0) } | ||
|
||
let event: WelcomePopupEvent? = { | ||
guard let eventString = self.event else { return nil } | ||
|
||
switch eventString { | ||
case "MTCH": | ||
return .MTCH | ||
default: | ||
return nil | ||
} | ||
}() | ||
|
||
return WelcomePopup( | ||
title: title, | ||
imageURL: imageURL, | ||
url: url, | ||
event: event, | ||
buttonColor: buttonColor | ||
) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.