-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] #153- 출석 조회하기 API 연결 #157
Merged
The head ref may contain hidden characters: "#153-\uCD9C\uC11D\uC870\uD68C\uD558\uAE30-API\uC5F0\uACB0"
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
94692f7
[Chore] #153- enum type core layer 로 이동
devxsby 21ee32d
[Feat] #153- entitiy 추가
devxsby 52907ee
[Chore] #153- 파일 위치 변경
devxsby a8f8866
[Chore] #153- 파일명 변경으로 인한 수정
devxsby 8ef46f3
[Feat] #153- AttendanceService 추가
devxsby 7d3ad6e
[Feat] #153- 도메인레이어 모델 추가
devxsby b4f8e49
[Feat] #153- entity에서 model로 변환하는 Transform 추가
devxsby 21ff201
[Feat] #153- Repository, Repository Interface 추가
devxsby 1e7e109
[Chore] #153- 더미 모델로 변경
devxsby 5a9e905
[Feat] #153- Usecase 추가
devxsby 8d5475a
[Chore] #153- Presentation layer 연결 확인
devxsby 9ce4285
[Chore] #153- 루트 뷰 변경
devxsby a58ff01
[Merge] #153- 브랜치 최신화
devxsby e748f2e
[Feat] #153- 오늘의 일정 부분 뷰 반영
devxsby 8a84423
[Chore] #153- 레이아웃 변경
devxsby cd5d3ee
[Feat] #153- 점수 영역 뷰 반영
devxsby 511d139
[Feat] #153- doubleToString 추가
devxsby 0be3553
[Chore] #153- doubleToString로 이름 변경
devxsby 9d2c1ff
[Chore] #153- 폰트 변경
devxsby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
SOPT-iOS/Projects/Core/Sources/Enum/AttendanceScheduleType.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 @@ | ||
// | ||
// AttendanceScheduleType.swift | ||
// Core | ||
// | ||
// Created by devxsby on 2023/04/15. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum AttendanceScheduleType { | ||
case unscheduledDay /// 일정 없는 날 | ||
case scheduledDay /// 일정(세미나, 행사) 있는 날 | ||
} |
16 changes: 16 additions & 0 deletions
16
SOPT-iOS/Projects/Core/Sources/Enum/AttendanceStateType.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,16 @@ | ||
// | ||
// AttendanceStateType.swift | ||
// Core | ||
// | ||
// Created by devxsby on 2023/04/15. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum AttendanceStateType: String, CaseIterable { | ||
case all = "전체" | ||
case attendance = "출석" | ||
case tardy = "지각" | ||
case absent = "결석" | ||
} |
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
33 changes: 33 additions & 0 deletions
33
SOPT-iOS/Projects/Data/Sources/Transform/AttendanceScheduleTransform.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,33 @@ | ||
// | ||
// AttendanceScheduleTransform.swift | ||
// Data | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
import Network | ||
|
||
extension AttendanceScheduleEntity { | ||
|
||
public func toDomain() -> AttendanceScheduleModel { | ||
return .init(type: self.type, | ||
location: self.location, | ||
name: self.name, | ||
startDate: self.startDate, | ||
endDate: self.endDate, | ||
message: self.message, | ||
attendances: self.attendances.map { $0.toDomain() }) | ||
} | ||
} | ||
|
||
extension TodayAttendance { | ||
|
||
public func toDomain() -> TodayAttendanceModel { | ||
return .init(status: self.status, | ||
attendedAt: self.attendedAt) | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
SOPT-iOS/Projects/Data/Sources/Transform/AttendanceScoreTransform.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,42 @@ | ||
// | ||
// AttendanceScoreTransform.swift | ||
// Data | ||
// | ||
// Created by devxsby on 2023/04/15. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
import Network | ||
|
||
extension AttendanceScoreEntity { | ||
|
||
public func toDomain() -> AttendanceScoreModel { | ||
.init(part: self.part, | ||
generation: self.generation, | ||
name: self.name, | ||
score: self.score, | ||
total: self.total.toDomain(), | ||
attendances: self.attendances.map { $0.toDomain() } ) | ||
} | ||
} | ||
|
||
extension TotalScore { | ||
public func toDomain() -> TotalScoreModel { | ||
.init(attendance: self.attendance, | ||
absent: self.absent, | ||
tardy: self.tardy, | ||
participate: self.participate) | ||
} | ||
} | ||
|
||
extension Attendance { | ||
public func toDomain() -> AttendanceModel { | ||
.init(attribute: self.attribute, | ||
name: self.name, | ||
status: self.status, | ||
date: self.date) | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
SOPT-iOS/Projects/Data/Sources/Transform/ShowAttendanceTransform.swift
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
SOPT-iOS/Projects/Domain/Sources/Model/AttendanceScheduleModel.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,35 @@ | ||
// | ||
// AttendanceScheduleModel.swift | ||
// Domain | ||
// | ||
// Created by devxsby on 2023/04/11. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct AttendanceScheduleModel: Codable, Hashable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hashable을 채택한 이유가 궁금합니다! |
||
public let type: String | ||
public let location, name, startDate, endDate: String | ||
public let message: String | ||
public let attendances: [TodayAttendanceModel] | ||
|
||
public init(type: String, location: String, name: String, startDate: String, endDate: String, message: String, attendances: [TodayAttendanceModel]) { | ||
self.type = type | ||
self.location = location | ||
self.name = name | ||
self.startDate = startDate | ||
self.endDate = endDate | ||
self.message = message | ||
self.attendances = attendances | ||
} | ||
} | ||
|
||
public struct TodayAttendanceModel: Codable, Hashable { | ||
public let status, attendedAt: String | ||
|
||
public init(status: String, attendedAt: String) { | ||
self.status = status | ||
self.attendedAt = attendedAt | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
SOPT-iOS/Projects/Domain/Sources/Model/AttendanceScoreModel.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,50 @@ | ||
// | ||
// AttendanceScoreModel.swift | ||
// Domain | ||
// | ||
// Created by devxsby on 2023/04/15. | ||
// Copyright © 2023 SOPT-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct AttendanceScoreModel: Codable, Hashable { | ||
public let part: String | ||
public let generation: Int | ||
public let name: String | ||
public let score: Double | ||
public let total: TotalScoreModel | ||
public let attendances: [AttendanceModel] | ||
|
||
public init(part: String, generation: Int, name: String, score: Double, total: TotalScoreModel, attendances: [AttendanceModel]) { | ||
self.part = part | ||
self.generation = generation | ||
self.name = name | ||
self.score = score | ||
self.total = total | ||
self.attendances = attendances | ||
} | ||
|
||
} | ||
|
||
public struct TotalScoreModel: Codable, Hashable { | ||
public let attendance, absent, tardy, participate: Int | ||
|
||
public init(attendance: Int, absent: Int, tardy: Int, participate: Int) { | ||
self.attendance = attendance | ||
self.absent = absent | ||
self.tardy = tardy | ||
self.participate = participate | ||
} | ||
} | ||
|
||
public struct AttendanceModel: Codable, Hashable { | ||
public let attribute, name, status, date: String | ||
|
||
public init(attribute: String, name: String, status: String, date: String) { | ||
self.attribute = attribute | ||
self.name = name | ||
self.status = status | ||
self.date = date | ||
} | ||
} |
16 changes: 0 additions & 16 deletions
16
SOPT-iOS/Projects/Domain/Sources/Model/ShowAttendanceModel.swift
This file was deleted.
Oops, something went wrong.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 친구들은 토큰 받아오면 없어질 예정이겠죠..?