Skip to content
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

Feature/moit list #72

Merged
merged 116 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
3e9ce98
feat: DesignSystemType case chip μΆ”κ°€
hope1053 Jun 3, 2023
c44fd3e
feat: NavigationBar κ΅¬ν˜„
chansooo Jun 4, 2023
210c9aa
feat: Navigationdemo κ΅¬ν˜„
chansooo Jun 4, 2023
1f06a30
fix: NavigationDemoViewController 이름 λ³€κ²½
chansooo Jun 5, 2023
0834bce
fix: NavigationBar titleLabel 쀑앙 μ •λ ¬ μˆ˜μ •
chansooo Jun 5, 2023
9d4534f
feat: NavigationColorType κ΅¬ν˜„
chansooo Jun 5, 2023
5f6afeb
feat: λ²„νŠΌ tintcolor λ³€κ²½ μœ„ν•΄ λ Œλ”λ§ λͺ¨λ“œ λ³€κ²½
chansooo Jun 5, 2023
92ce6c0
add: `MOITTabPager` 생성
chansooooo Jun 5, 2023
106cda4
add: `MOITTabPager` 생성
chansooo Jun 5, 2023
d9cfc98
Merge branch 'DesignSystem/TapPager' of https://github.com/mash-up-kr…
chansooo Jun 5, 2023
404726a
Merge branch 'develop' into DesignSystem/Chip
hope1053 Jun 5, 2023
6e5b27c
remove: dummy file μ‚­μ œ
hope1053 Jun 5, 2023
0a39410
feat: MOITChipType κ΅¬ν˜„
hope1053 Jun 5, 2023
b841157
feat: MOITChip κ΅¬ν˜„
hope1053 Jun 5, 2023
701af15
feat: MOITChipDemoViewController κ΅¬ν˜„
hope1053 Jun 5, 2023
f4717d2
feat: DemoViewController μ—°κ²°
hope1053 Jun 5, 2023
d7f5a71
Merge branch 'develop' into DesignSystem/Chip
hope1053 Jun 5, 2023
a7af07b
feat: PagerType κ΅¬ν˜„
chansooo Jun 7, 2023
c8394dd
feat: TapPager κ΅¬ν˜„
chansooo Jun 7, 2023
cde95e7
feat: SegmentPager κ΅¬ν˜„
chansooo Jun 7, 2023
9693156
feat: PagerDemoViewController μΆ”κ°€
chansooo Jun 7, 2023
309f29c
fix: unavailable μΆ”κ°€
hope1053 Jun 8, 2023
11dabdd
feat: DemoApp Chip 폴더 μΆ”κ°€
hope1053 Jun 8, 2023
9cb5246
fix: enum case AssociatedValue μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” λΆ€λΆ„ μ‚­μ œ
hope1053 Jun 8, 2023
aba45ab
Merge branch 'DesignSystem/Chip' of https://github.com/mash-up-kr/MOI…
chansooo Jun 8, 2023
f955488
feat: StudyPreview κ΅¬ν˜„μ€‘
chansooo Jun 8, 2023
5cbb61a
feat: μŠ€μ™€μ΄ν”„ -> μ‚­μ œ λ²„νŠΌ μ• λ‹ˆλ©”μ΄μ…˜ κ΅¬ν˜„
chansooo Jun 8, 2023
1cb1c78
Merge branch 'develop' of https://github.com/mash-up-kr/MOIT-iOS into…
chansooo Jun 9, 2023
c3f71b4
add: secondary color set μΆ”κ°€
chansooo Jun 11, 2023
2135af4
remove: ν•„μš” μ—†λŠ” 파일 μ‚­μ œ
chansooo Jun 11, 2023
683e54f
feat: optinal인 view addItem μ‰½κ²Œ ν•  수 μžˆλŠ” λ©”μ†Œλ“œ κ΅¬ν˜„
chansooo Jun 11, 2023
e6a8d2c
refactor: μŠ€μ™€μ΄ν”„, νƒ­ λΆ€λ“œλŸ½κ²Œ λ³€κ²½
chansooo Jun 11, 2023
094e885
fix: StudyPreview UI λ³€κ²½
chansooo Jun 11, 2023
62cb634
feat: λ²„νŠΌ λˆ„λ₯Ό 수 μžˆλŠ” λ·° μΆ”κ°€
chansooo Jun 11, 2023
e1c2b6a
fix: StudyPreviewDemoViewController μˆ˜μ •
chansooo Jun 11, 2023
8326914
refactor: StudyPreview UI Center 맞게 μˆ˜μ •
chansooo Jun 12, 2023
508c6da
refactor: panGesture 둜직 λ³€κ²½
chansooo Jun 12, 2023
aa43302
refactor: final μΆ”κ°€
chansooo Jun 13, 2023
c2c4991
redactor: `layoutIfNeeded` μ‚­μ œ
chansooo Jun 13, 2023
06205ab
Merge branch 'develop' of https://github.com/mash-up-kr/MOIT-iOS into…
chansooo Jun 13, 2023
2948713
Merge branch 'develop' of https://github.com/mash-up-kr/MOIT-iOS into…
chansooo Jun 14, 2023
3abddca
feat: SignUp κΈ°λ³Έ μ„ΈνŒ…
chansooo Jun 14, 2023
d3e3729
feat: Utils Target μΆ”κ°€
chansooo Jun 14, 2023
cf57aac
feat: SignUp μ ‘κ·Ό μ œν•œμž λ³€κ²½
chansooo Jun 14, 2023
2d84117
feat: Utils νƒ€κ²Ÿμ— pinlayout, flexlayout μΆ”κ°€
chansooo Jun 14, 2023
e43e1e3
feat: BaseViewController 상속받을 경우 navigateBar μ„€μ • νŽΈλ¦¬ν•˜κ²Œ κ΅¬ν˜„
chansooo Jun 14, 2023
f969bed
feat: StudyPreview configure ν•¨μˆ˜ κ΅¬ν˜„
chansooo Jun 15, 2023
e6b5c66
feat: ProfileView image 없이 생성, configureImage ν•¨μˆ˜ μΆ”κ°€
chansooo Jun 15, 2023
e2fd3a1
refactor: 린트 맞게 μ½”λ“œ μˆ˜μ •
chansooo Jun 15, 2023
4c90a0a
fix: navigationBar와 flexRootView κ²ΉμΉ˜μ§€ μ•Šκ²Œ μˆ˜μ •
chansooo Jun 15, 2023
44fe382
feat: scrollView μžλ™ μ„€μ •
chansooo Jun 15, 2023
c9053cd
feat: νƒ­ μ‹œ ν‚€λ³΄λ“œ 사라지도둝 κ΅¬ν˜„
chansooo Jun 15, 2023
2bdbc60
feat: SignUpViewController κ΅¬ν˜„
chansooo Jun 15, 2023
4a4e3e1
feat: λ‹€μŒ λ²„νŠΌ μΆ”κ°€
chansooo Jun 15, 2023
3bb2c0f
refactor: `MOITProfileView` 이미지 λ‘œλ“œ 둜직 λ³€κ²½
chansooo Jun 17, 2023
104c95f
feat: NavigationBar logo μΆ”κ°€
chansooo Jun 17, 2023
59e86de
feat: ViewControllable extension μΆ”κ°€
chansooo Jun 19, 2023
4e898d9
feat: StudyList shortcut μΆ”κ°€
chansooo Jun 19, 2023
b79d5e7
feat: dependency μˆ˜μ •
chansooo Jun 19, 2023
b9e38f3
feat: SignUp κ΄€λ ¨ UseCase μΆ”κ°€
chansooo Jun 19, 2023
fefab8a
feat: SignUpRepository μž„μ‹œ μΆ”κ°€
chansooo Jun 19, 2023
f3bb3ba
Merge branch 'feature/SignUp' of https://github.com/mash-up-kr/MOIT-i…
chansooo Jun 19, 2023
14e6116
fix: `MOITProfileView` border μΆ”κ°€
chansooo Jun 19, 2023
d1a585f
fix: SignUpDemoApp RIBs 기반으둜 μƒμ„±ν•˜λ„λ‘ μˆ˜μ •
chansooo Jun 19, 2023
48a7376
fix: DemoApp Dependency μ„€μ •ν•  수 μžˆλ„λ‘ μˆ˜μ •
chansooo Jun 19, 2023
849e1a2
fix: DemoApp Dependency μ„€μ •
chansooo Jun 19, 2023
5a53f8f
feat: SignUpDependency μΆ”κ°€
chansooo Jun 19, 2023
40defae
chore: 주석 μ‚­μ œ 및 μ½”λ“œ μŠ€νƒ€μΌ μˆ˜μ •
chansooo Jun 19, 2023
faf06de
feat: SignUp λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 μˆ˜μ •
chansooo Jun 19, 2023
6c83479
Merge branch 'develop' of https://github.com/mash-up-kr/MOIT-iOS into…
chansooo Jul 1, 2023
3d24a7a
feat: MOITList κΈ°λ³Έ 파일 생성
chansooo Jul 15, 2023
fa40e5a
Merge branch 'develop' of https://github.com/mash-up-kr/MOIT-iOS into…
chansooo Jul 15, 2023
fe59977
fix: MOITList λͺ¨λ“ˆ 버전 μˆ˜μ •
chansooo Jul 15, 2023
5bc2a70
refactor: MOITListUseInterface λͺ¨λ“ˆ 및 파일 뢄리
chansooo Jul 15, 2023
a4c0a05
feat: MOITListDemoApp DemoApp μ—°κ²°
chansooo Jul 15, 2023
82f701d
refactor: λͺ¨λ“ˆ 이름 MOITList둜 λ³€κ²½
chansooo Jul 23, 2023
f143318
fix: MOITList dependency λ³€κ²½
chansooo Jul 23, 2023
a06c232
chore: dummy 파일 μ‚­μ œ
chansooo Jul 23, 2023
968abff
feat: MOITList에 ν•„μš”ν•œ model μ •μ˜
chansooo Jul 23, 2023
3fec2c3
feat: MOITList에 ν•„μš”ν•œ usecase μ •μ˜
chansooo Jul 23, 2023
35d83c6
feat: MOITList Data Layer μ •μ˜
chansooo Jul 23, 2023
baa06b3
feat: FetchMoitListUseCase κ΅¬ν˜„
chansooo Jul 23, 2023
4abd0a0
fix: MOITPreview 썸넀일 없어도 생성할 수 μžˆλ„λ‘ μˆ˜μ •
chansooo Jul 23, 2023
f38f149
feat: MOITAlarmType hashable μ±„νƒν•˜λ„λ‘ μˆ˜μ •
chansooo Jul 23, 2023
a2c512f
fix: moitButton width μˆ˜μ •ν•  수 μžˆλ„λ‘ λ³€κ²½
chansooo Jul 23, 2023
9f005ad
fix: AlarmView size μˆ˜μ •ν•  수 μžˆλ„λ‘ λ³€κ²½
chansooo Jul 23, 2023
a617abf
feat: EmptyMOITView κ΅¬ν˜„
chansooo Jul 23, 2023
69a2148
feat: νŽ˜μ΄μ§• κ°€λŠ₯ν•œ λ·° κ΅¬ν˜„
chansooo Jul 23, 2023
d952102
feat: BaseCollectionViewCell κ΅¬ν˜„
chansooo Jul 23, 2023
233f9de
feat: AlarmViewModel κ΅¬ν˜„
chansooo Jul 23, 2023
e6bc970
feat: MOITPreviewViewModel κ΅¬ν˜„
chansooo Jul 23, 2023
0035181
feat: MOITListInteractor 데이터 λ°›μ•„μ˜€λŠ” λΆ€λΆ„ κ΅¬ν˜„
chansooo Jul 23, 2023
c3e9911
feat: ν•„μš”ν•œ usecase μΆ”κ°€
chansooo Jul 23, 2023
f302c4f
feat: MOITListViewControllerμ—μ„œ λ³΄μ—¬μ£ΌλŠ” λΆ€λΆ„ κ΅¬ν˜„
chansooo Jul 23, 2023
1ba31dd
feat: MOITListDependency에 ν•„μš”ν•œ dependency μΆ”κ°€
chansooo Jul 23, 2023
7e25144
feat: MockUsecase κ΅¬ν˜„
chansooo Jul 23, 2023
977dfb0
fix: MOITListAppDelegate μˆ˜μ •
chansooo Jul 23, 2023
eaaae74
fix: navigationBar 색상 λ³€κ²½
chansooo Jul 23, 2023
da72db2
feat: `MOITListViewController` μœ μ € μ•‘μ…˜ 바인딩
chansooo Jul 23, 2023
b01fda7
feat: `MOITListInteractor` μœ μ € μ•‘μ…˜ 바인딩
chansooo Jul 23, 2023
ea33a9b
chore: dummy 파일 μ‚­μ œ
chansooo Jul 23, 2023
b4624a5
feat: `FetchMOITListRequestable` κ΅¬ν˜„
chansooo Jul 23, 2023
316a292
feat: moitlistdto -> moitlist ν•¨μˆ˜ κ΅¬ν˜„
chansooo Jul 23, 2023
ee3baa9
feat: deletemoit μΆ”κ°€
chansooo Jul 23, 2023
3c67aa1
feat: fine κ΄€λ ¨ μž„μ‹œ 객체 κ΅¬ν˜„
chansooo Jul 23, 2023
f16d3c9
feat: MOITRepositoryImpl κ΅¬ν˜„
chansooo Jul 23, 2023
8ebac2c
feat: fine μž„μ‹œ λͺ¨λΈ κ΅¬ν˜„
chansooo Jul 23, 2023
669ceeb
fix: dependendy μˆ˜μ •
chansooo Jul 23, 2023
ed8ffb9
feat: `MOITListInteractor` μˆ˜μ •
chansooo Jul 23, 2023
2c5ba4c
feat: DeleteMOITUseCase μ •μ˜
chansooo Jul 23, 2023
92df9ab
feat: clipsToBounds μΆ”κ°€
chansooo Jul 27, 2023
5b8fa0b
refactor: self.fetchPaneltyToBePaiedUseCase μ˜€νƒ€ μˆ˜μ •
chansooo Jul 27, 2023
c932113
refactor: self.fetchPaneltyToBePaiedUseCase μ˜€νƒ€ μˆ˜μ •
chansooo Jul 27, 2023
59f64e1
refactor: layout ν•œλ²ˆλ§Œ μž‘λ„λ‘ μˆ˜μ •
chansooo Jul 27, 2023
49ed87c
refactor: self.fetchPaneltyToBePaiedUseCase μ˜€νƒ€ μˆ˜μ •
chansooo Jul 27, 2023
0c807c6
feat: λ ˆν¬μ§€ν† λ¦¬ ν”„λ‘œν† μ½œ ν•¨μˆ˜ μž„μ‹œ μ„€μ •
chansooo Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions Core/Utils/Base/BaseCollectionViewCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// BaseCollectionViewCell.swift
// Utils
//
// Created by kimchansoo on 2023/07/23.
//

import UIKit

import RxSwift
import RxCocoa

open class BaseCollectionViewCell: UICollectionViewCell {

// MARK: - UI
public let flexRootView = UIView()

// MARK: - Properties
public var disposebag = DisposeBag()

// MARK: - Methods
public override init(frame: CGRect) {
super.init(frame: frame)

self.backgroundColor = .white
configureAttributes()
configureHierarchy()
configureConstraints()
bind()
}

open func configureHierarchy() {
// self.addSubview(flexRootView)
self.contentView.addSubview(flexRootView)
}
open func configureConstraints() {}
open func configureAttributes() {}
open func bind() {}

open override func layoutSubviews() {
// self.contentView.backgroundColor = .green
// self.backgroundColor = .black
// flexRootView.backgroundColor = .blue
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
flexRootView.backgroundColor = .clear

flexRootView.frame = contentView.bounds
flexRootView.pin.all()
flexRootView.flex.layout(mode: .fitContainer)
}

@available(*, unavailable)
required public init?(coder: NSCoder) {
fatalError("init(coder:) is called.")
}
}

2 changes: 1 addition & 1 deletion DesignSystem/Sources/Button/MOITButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ extension MOITButton {
.marginHorizontal(12)
.marginVertical(self.type.marginVertical)
}
.width(self.type.width)
// .width(self.type.width)
}
}

Expand Down
13 changes: 13 additions & 0 deletions DesignSystem/Sources/Modal/MOITAlarmType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,16 @@ public enum MOITAlarmType: Equatable {
}
}
}

extension MOITAlarmType: Hashable {
public func hash(into hasher: inout Hasher) {
switch self {
case .attendanceCheck(let remainSeconds):
hasher.combine(remainSeconds)
case .penalty(let amount):
hasher.combine(amount)
case .attendanceRating(let percent):
hasher.combine(percent)
}
}
}
12 changes: 6 additions & 6 deletions DesignSystem/Sources/Modal/MOITAlarmView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public final class MOITAlarmView: UIView {
public override func layoutSubviews() {
super.layoutSubviews()
self.flexRootView.pin.all()
self.flexRootView.flex.layout()
self.flexRootView.flex.layout(mode: .fitContainer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layout() λ©”μ„œλ“œμ˜ mode default값이 .fitContainerλΌμ„œ ꡳ이 μ΄λ ‡κ²Œ μž‘μ„±ν•΄μ€„ ν•„μš”λŠ” 없을 것 κ°™μ•„μš”~!

self.configureGradient()
}
}
Expand All @@ -73,11 +73,11 @@ extension MOITAlarmView {

self.flexRootView.flex
.direction(.column)
.paddingHorizontal(16)
.define { flex in

flex.addItem(self.titleLabel)
.marginTop(20)
.marginHorizontal(16)

flex.addItem()
.direction(.row)
Expand All @@ -95,15 +95,15 @@ extension MOITAlarmView {
.shrink(1)
.aspectRatio(200/130)
}
.marginHorizontal(16)
.height(130)

flex.addItem(self.button)
.marginHorizontal(16)
// .marginHorizontal(16)
.marginBottom(19)
.width(100%)
}
.width(335)
.height(260)
// .width(335)
// .height(260)
}

private func configureGradient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum NavigationColorType {
var backgroundColor: UIColor {
switch self {
case .normal:
return ResourceKitAsset.Color.white.color
return .clear
case .reverse:
return ResourceKitAsset.Color.gray500.color
}
Expand Down
79 changes: 79 additions & 0 deletions DesignSystem/Sources/StudyPreview/EmptyMOITView.swift
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μš”κ±΄ κ·Έλƒ₯ κΆκΈˆν•œκ±΄λ°...이런 νŠΉμ • μΌ€μ΄μŠ€μ˜ 뷰도 MOITList RIB 내뢀에 λ“€μ–΄κ°€λŠ” 것보닀 Design System에 보톡 λ§Œλ“œλŠ” νŽΈμΈκ°€μš”?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도,,, 잘 λͺ¨λ₯΄κ² κΈ΄ ν•œλ° 일단 μ»΄ν¬λ„ŒνŠΈλΌ 뢄리해두긴 ν–ˆμŠ΅λ‹ˆλ‹€.
μ΄κ±°λŠ” νŒ€λ°”μ΄νŒ€μΌ 것 κ°™μ•„μš”

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
//
// EmptyMOITView.swift
// DesignSystem
//
// Created by kimchansoo on 2023/07/23.
// Copyright Β© 2023 chansoo.MOIT. All rights reserved.
//

import UIKit

import ResourceKit

import FlexLayout
import Kingfisher
import RxSwift
import RxGesture

public final class EmptyMOITView: UIView {

// MARK: - UI
private let flexRootView = UIView()

private let noStudyLabel: UILabel = {
let label = UILabel()
label.text = "μ°Έμ—¬ν•œ μŠ€ν„°λ””κ°€ μ—†μ–΄μš”!"
label.font = ResourceKitFontFamily.p3
label.textColor = ResourceKitAsset.Color.gray600.color
return label
}()

private let studySuggestionLabel: UILabel = {
let label = UILabel()
label.text = "μŠ€ν„°λ””λ₯Ό μƒμ„±ν•˜κ±°λ‚˜ μ°Έμ—¬ν•΄λ³΄μ„Έμš”"
label.font = ResourceKitFontFamily.p3
label.textColor = ResourceKitAsset.Color.gray600.color
return label
}()

// MARK: - Properties
private let disposebag = DisposeBag()

// MARK: - Initializers
public init() {
super.init(frame: .zero)
configure()
}


@available (*, unavailable)
required init?(coder: NSCoder) {
fatalError("required init called")
}

// MARK: - Lifecycle
public override func layoutSubviews() {
super.layoutSubviews()

self.addSubview(flexRootView)
self.flexRootView.pin.all()
self.flexRootView.flex.layout()
self.flexRootView.layer.cornerRadius = 30
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clipsToBoundsλ‚˜ masksToBounds μΆ”κ°€ν•˜μ‹œλŠ”κ±° μ–΄λ– μ‹ κ°€μš© ~

self.flexRootView.clipsToBounds = true
}

// MARK: - Methods
private func configure() {

self.flexRootView.flex
.justifyContent(.center)
.alignItems(.center)
.backgroundColor(.white)
.define { flex in
flex.addItem(noStudyLabel)
.marginBottom(5)
flex.addItem(studySuggestionLabel)
}

}
}
9 changes: 5 additions & 4 deletions DesignSystem/Sources/StudyPreview/MOITStudyPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final class MOITStudyPreview: UIView {

public init(
remainingDate: Int,
profileURLString: String,
profileURLString: String?,
studyName: String,
studyProgressDescription: String?
) {
Expand All @@ -80,7 +80,7 @@ public final class MOITStudyPreview: UIView {
// MARK: - Methods
public func configure(
remainingDate: Int,
profileURL: String,
profileURL: String?,
studyName: String,
studyProgressDescription: String?
) {
Expand Down Expand Up @@ -156,7 +156,7 @@ public final class MOITStudyPreview: UIView {

private func configureAttributes(
remainingDate: Int,
profileURLString: String,
profileURLString: String?,
studyName: String,
studyProgressDescription: String?
) {
Expand All @@ -166,7 +166,8 @@ public final class MOITStudyPreview: UIView {

remainingDateLabel = MOITChip(type: .dueDate(date: remainingDate))

if let url = URL(string: profileURLString) {
if let profileURLString = profileURLString,
let url = URL(string: profileURLString) {
profileImageView.kf.setImage(
with: url,
options: [.processor(RoundCornerImageProcessor(cornerRadius: 20))]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// FineRepositoryImpl.swift
// MOITListDataImpl
//
// Created by kimchansoo on 2023/07/23.
// Copyright Β© 2023 chansoo.MOIT. All rights reserved.
//

import Foundation

import RxSwift

import MOITListData
import MOITListDomain
import MOITNetwork

final class FineRepositoryImpl: FineRepository {

// MARK: - Properties
private let network: Network

// MARK: - Initializers
public init(network: Network) {
self.network = network
}

// MARK: - Lifecycle

// MARK: - Methods
func fetchFine(moitId: Int) -> Single<Fine> {
fatalError()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// MOITRepository.swift
// MOITListData
//
// Created by kimchansoo on 2023/07/16.
// Copyright Β© 2023 chansoo.MOIT. All rights reserved.
//

import Foundation

import RxSwift

import MOITListData
import MOITListDomain
import MOITNetwork

public final class MOITRepositoryImpl: MOITRepository {


// MARK: - UI

// MARK: - Properties
private let network: Network

// MARK: - Initializers
public init(network: Network) {
self.network = network
}

// MARK: - Lifecycle

// MARK: - Methods
public func fetchMOITList() -> Single<[MOIT]> {
network.request(
with: FetchMOITListRequestable()
)
.map { $0.moits.map { $0.toMOIT() } }
}

public func deleteMoit(id: Int) -> Single<Void> {
fatalError()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// MOITRequestable.swift
// MOITListData
//
// Created by kimchansoo on 2023/07/23.
// Copyright Β© 2023 chansoo.MOIT. All rights reserved.
//

import Foundation

import MOITNetwork
import MOITListData

struct FetchMOITListRequestable: Requestable {

public typealias Response = MOITListDTO

// MARK: - Properties

public var baseURL: URL? {
return URL(string: "http://moit-backend-eb-env.eba-qtcnkjjy.ap-northeast-2.elasticbeanstalk.com") ?? URL(fileReferenceLiteralResourceName: "")
}

public var path: String {
return "/api/v1/moit"
}

public var method: HTTPMethod {
return .get
}

public var headers: HTTPHeaders {
return [:]
}

public var parameters: HTTPRequestParameter? {
return nil
}

// mark: - Initializers
init() {

}
}
Loading
Loading