generated from GSM-MSG/MSG-Repository-Generator
-
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 branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 334-…
…authentication-form-ui-building
- Loading branch information
Showing
23 changed files
with
427 additions
and
11 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
19 changes: 19 additions & 0 deletions
19
Projects/Domain/StudentDomain/Interface/DTO/Request/CreatePortfolioLinkRequestDTO.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,19 @@ | ||
import Foundation | ||
|
||
public struct CreatePortfolioLinkRequestDTO: Encodable { | ||
public let studentID: String | ||
public let periodDay: Int | ||
|
||
public init( | ||
studentID: String, | ||
periodDay: Int | ||
) { | ||
self.studentID = studentID | ||
self.periodDay = periodDay | ||
} | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case studentID = "studentId" | ||
case periodDay | ||
} | ||
} |
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
9 changes: 9 additions & 0 deletions
9
Projects/Domain/StudentDomain/Interface/Entity/PortfolioLinkEntity.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,9 @@ | ||
import Foundation | ||
|
||
public struct PortfolioLinkEntity: Equatable { | ||
public let token: String | ||
|
||
public init(token: String) { | ||
self.token = token | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
Projects/Domain/StudentDomain/Interface/UseCase/CreatePortfolioLinkUseCase.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,5 @@ | ||
import Foundation | ||
|
||
public protocol CreatePortfolioLinkUseCase { | ||
func execute(req: CreatePortfolioLinkRequestDTO) async throws -> PortfolioLinkEntity | ||
} |
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
14 changes: 14 additions & 0 deletions
14
Projects/Domain/StudentDomain/Sources/DTO/Response/CreatePortfolioLinkResponseDTO.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,14 @@ | ||
import Foundation | ||
import StudentDomainInterface | ||
|
||
public struct CreatePortfolioLinkResponseDTO: Decodable { | ||
public let token: String | ||
} | ||
|
||
public extension CreatePortfolioLinkResponseDTO { | ||
func toDomain() -> PortfolioLinkEntity { | ||
PortfolioLinkEntity( | ||
token: token | ||
) | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
Projects/Domain/StudentDomain/Sources/UseCase/CreatePortfolioLinkUseCaseImpl.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,13 @@ | ||
import StudentDomainInterface | ||
|
||
struct CreatePortfolioLinkUseCaseImpl: CreatePortfolioLinkUseCase { | ||
private let studentRepository: any StudentRepository | ||
|
||
init(studentRepository: any StudentRepository) { | ||
self.studentRepository = studentRepository | ||
} | ||
|
||
func execute(req: CreatePortfolioLinkRequestDTO) async throws -> PortfolioLinkEntity { | ||
try await studentRepository.createPortfolioLink(req: req) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Projects/Domain/StudentDomain/Testing/UseCase/CreatePortfolioLinkUseCaseSpy.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,11 @@ | ||
import StudentDomainInterface | ||
|
||
public final class CreatePortfolioLinkUseCaseSpy: CreatePortfolioLinkUseCase { | ||
public init() {} | ||
|
||
public func execute( | ||
req: CreatePortfolioLinkRequestDTO | ||
) async throws -> PortfolioLinkEntity { | ||
return .init(token: "") | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
Projects/Feature/GSMAuthenticationFormFeature/Sources/Source.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 @@ | ||
// This is for Tuist |
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
Oops, something went wrong.