From 7ac09f276c355da5f4a9e7acce6a91178463c431 Mon Sep 17 00:00:00 2001 From: Ryo Takeuchi Date: Sun, 26 Nov 2023 09:11:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:recycle:=20Schedule=20=E3=81=AE=E9=9A=8E?= =?UTF-8?q?=E5=B1=A4=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/nito/core/data/OfflineFirstScheduleRepository.kt | 2 +- .../commonMain/kotlin/club/nito/core/data/ScheduleRepository.kt | 2 +- .../club/nito/core/domain/GetParticipantScheduleListUseCase.kt | 2 +- .../kotlin/club/nito/core/domain/GetRecentScheduleUseCase.kt | 2 +- .../kotlin/club/nito/core/model/{ => schedule}/Schedule.kt | 2 +- .../nito/core/network/schedule/FakeScheduleRemoteDataSource.kt | 2 +- .../club/nito/core/network/schedule/ScheduleRemoteDataSource.kt | 2 +- .../core/network/schedule/SupabaseScheduleRemoteDataSource.kt | 2 +- .../club/nito/core/network/schedule/model/NetworkSchedule.kt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename core/model/src/commonMain/kotlin/club/nito/core/model/{ => schedule}/Schedule.kt (91%) diff --git a/core/data/src/commonMain/kotlin/club/nito/core/data/OfflineFirstScheduleRepository.kt b/core/data/src/commonMain/kotlin/club/nito/core/data/OfflineFirstScheduleRepository.kt index 1a6a06e8..f48a49c7 100644 --- a/core/data/src/commonMain/kotlin/club/nito/core/data/OfflineFirstScheduleRepository.kt +++ b/core/data/src/commonMain/kotlin/club/nito/core/data/OfflineFirstScheduleRepository.kt @@ -1,7 +1,7 @@ package club.nito.core.data import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import club.nito.core.network.schedule.ScheduleRemoteDataSource import co.touchlab.kermit.Logger import kotlinx.coroutines.flow.Flow diff --git a/core/data/src/commonMain/kotlin/club/nito/core/data/ScheduleRepository.kt b/core/data/src/commonMain/kotlin/club/nito/core/data/ScheduleRepository.kt index 020a30cf..8df0201d 100644 --- a/core/data/src/commonMain/kotlin/club/nito/core/data/ScheduleRepository.kt +++ b/core/data/src/commonMain/kotlin/club/nito/core/data/ScheduleRepository.kt @@ -1,7 +1,7 @@ package club.nito.core.data import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import kotlinx.coroutines.flow.Flow import kotlinx.datetime.Instant diff --git a/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetParticipantScheduleListUseCase.kt b/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetParticipantScheduleListUseCase.kt index d1fa5176..745f7281 100644 --- a/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetParticipantScheduleListUseCase.kt +++ b/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetParticipantScheduleListUseCase.kt @@ -5,7 +5,7 @@ import club.nito.core.data.ScheduleRepository import club.nito.core.data.UserRepository import club.nito.core.domain.model.ParticipantSchedule import club.nito.core.model.FetchMultipleContentResult -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import club.nito.core.model.UserProfile import club.nito.core.model.participant.Participant import club.nito.core.model.toNitoError diff --git a/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetRecentScheduleUseCase.kt b/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetRecentScheduleUseCase.kt index 8ce9c296..93be2481 100644 --- a/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetRecentScheduleUseCase.kt +++ b/core/domain/src/commonMain/kotlin/club/nito/core/domain/GetRecentScheduleUseCase.kt @@ -6,7 +6,7 @@ import club.nito.core.data.UserRepository import club.nito.core.domain.model.ParticipantSchedule import club.nito.core.model.FetchSingleContentResult import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import club.nito.core.model.UserProfile import club.nito.core.model.toNitoError import co.touchlab.kermit.Logger diff --git a/core/model/src/commonMain/kotlin/club/nito/core/model/Schedule.kt b/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt similarity index 91% rename from core/model/src/commonMain/kotlin/club/nito/core/model/Schedule.kt rename to core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt index f630d97d..a4ddcfd4 100644 --- a/core/model/src/commonMain/kotlin/club/nito/core/model/Schedule.kt +++ b/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt @@ -1,4 +1,4 @@ -package club.nito.core.model +package club.nito.core.model.schedule import kotlinx.datetime.Instant diff --git a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/FakeScheduleRemoteDataSource.kt b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/FakeScheduleRemoteDataSource.kt index c5ae7127..4f4041eb 100644 --- a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/FakeScheduleRemoteDataSource.kt +++ b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/FakeScheduleRemoteDataSource.kt @@ -1,7 +1,7 @@ package club.nito.core.network.schedule import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import club.nito.core.network.schedule.model.NetworkSchedule import club.nito.core.network.schedule.model.createFakeNetworkSchedule import kotlinx.datetime.Clock diff --git a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/ScheduleRemoteDataSource.kt b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/ScheduleRemoteDataSource.kt index 910ac9ad..2b02308f 100644 --- a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/ScheduleRemoteDataSource.kt +++ b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/ScheduleRemoteDataSource.kt @@ -1,7 +1,7 @@ package club.nito.core.network.schedule import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import kotlinx.datetime.Instant public sealed interface ScheduleRemoteDataSource { diff --git a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/SupabaseScheduleRemoteDataSource.kt b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/SupabaseScheduleRemoteDataSource.kt index bed5d3c9..420a4314 100644 --- a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/SupabaseScheduleRemoteDataSource.kt +++ b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/SupabaseScheduleRemoteDataSource.kt @@ -1,7 +1,7 @@ package club.nito.core.network.schedule import club.nito.core.model.Order -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import club.nito.core.network.schedule.model.NetworkSchedule import club.nito.core.network.toSupabaseOrder import co.touchlab.kermit.Logger diff --git a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/model/NetworkSchedule.kt b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/model/NetworkSchedule.kt index bef5f086..a1c1369c 100644 --- a/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/model/NetworkSchedule.kt +++ b/core/network/src/commonMain/kotlin/club/nito/core/network/schedule/model/NetworkSchedule.kt @@ -1,6 +1,6 @@ package club.nito.core.network.schedule.model -import club.nito.core.model.Schedule +import club.nito.core.model.schedule.Schedule import kotlinx.datetime.Clock import kotlinx.datetime.Instant import kotlinx.serialization.Serializable From 7a83218277af71e5aaaa3d9e5e7a2fa58b983739 Mon Sep 17 00:00:00 2001 From: Ryo Takeuchi Date: Sun, 26 Nov 2023 09:14:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:recycle:=20id=20=E3=82=92=20typealias=20?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/club/nito/core/model/schedule/Schedule.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt b/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt index a4ddcfd4..6e0fd81b 100644 --- a/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt +++ b/core/model/src/commonMain/kotlin/club/nito/core/model/schedule/Schedule.kt @@ -2,6 +2,11 @@ package club.nito.core.model.schedule import kotlinx.datetime.Instant +/** + * スケジュールID + */ +public typealias ScheduleId = String + /** * スケジュール * @param id ID @@ -12,7 +17,7 @@ import kotlinx.datetime.Instant * @param description 説明文 */ public data class Schedule( - val id: String, + val id: ScheduleId, val scheduledAt: Instant, val metAt: Instant, val venueId: String,