Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class CreateExperimentPostUseCase(
val postId: String,
val title: String,
val views: Int,
val timeRequired: TimeSlot?,
val count: Int?,
val isOnCampus: Boolean,
val place: String?,
val reward: String?,
Expand Down Expand Up @@ -143,6 +145,8 @@ class CreateExperimentPostUseCase(
postId = savedExperimentPost.id,
title = savedExperimentPost.title,
views = savedExperimentPost.views,
timeRequired = savedExperimentPost.timeRequired,
count = savedExperimentPost.count,
isOnCampus = savedExperimentPost.isOnCampus,
place = savedExperimentPost.place,
durationInfo = DurationInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.dobby.enums.MatchType
import com.dobby.enums.areaInfo.Area
import com.dobby.enums.areaInfo.Region
import com.dobby.enums.experiment.RecruitStatus
import com.dobby.enums.experiment.TimeSlot
import com.dobby.enums.member.GenderType
import com.dobby.gateway.experiment.ExperimentPostGateway
import com.dobby.model.experiment.CustomFilter
Expand Down Expand Up @@ -51,6 +52,8 @@ class GetExperimentPostsUseCase(
val experimentPostId: String,
val title: String,
val views: Int,
val count: Int?,
val timeRequired: TimeSlot?,
val isOnCampus: Boolean,
val place: String?,
val reward: String,
Expand Down Expand Up @@ -83,6 +86,8 @@ class GetExperimentPostsUseCase(
experimentPostId = post.id,
title = post.title,
views = post.views,
count = post.count,
timeRequired = post.timeRequired,
isOnCampus = post.isOnCampus,
place = post.place,
reward = post.reward,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class UpdateExperimentPostUseCase(
val postId: String,
val title: String,
val views: Int,
val timeRequired: TimeSlot?,
val count: Int?,
val isOnCampus: Boolean,
val place: String?,
val reward: String?,
Expand Down Expand Up @@ -125,6 +127,8 @@ class UpdateExperimentPostUseCase(
postId = updatedPost.id,
title = updatedPost.title,
views = updatedPost.views,
timeRequired = updatedPost.timeRequired,
count = updatedPost.count,
isOnCampus = updatedPost.isOnCampus,
place = updatedPost.place,
reward = updatedPost.reward,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ class GetExperimentPostsUseCaseTest : BehaviorSpec({
result.first().postInfo.title shouldBe "야뿌 피자 먹방 테스트"
result.first().postInfo.place shouldBe "야뿌 대학교"
result.first().postInfo.reward shouldBe "스타벅스 1만원권 쿠폰"
result.first().postInfo.timeRequired shouldBe TimeSlot.ABOUT_1H
result.first().postInfo.count shouldBe 10
result.first().postInfo.recruitStatus shouldBe false
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.dobby.api.dto.response.experiment

import com.dobby.enums.experiment.TimeSlot
import java.time.LocalDate
data class PostInfo(
val experimentPostId: String,
val title: String,
val views: Int,
val timeRequired: TimeSlot?,
val count: Int?,
val isOnCampus: Boolean,
val place: String?,
val reward: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ object ExperimentPostMapper {
experimentPostId = input.postId,
title = input.title,
views = input.views,
timeRequired = input.timeRequired,
count = input.count,
isOnCampus = input.isOnCampus,
durationInfo = DurationInfo(
startDate = input.durationInfo?.startDate,
Expand Down Expand Up @@ -142,6 +144,8 @@ object ExperimentPostMapper {
experimentPostId = input.postId,
title = input.title,
views = input.views,
timeRequired = input.timeRequired,
count = input.count,
durationInfo = DurationInfo(
startDate = input.durationInfo?.startDate,
endDate = input.durationInfo?.endDate
Expand Down Expand Up @@ -405,6 +409,8 @@ object ExperimentPostMapper {
experimentPostId = post.postInfo.experimentPostId,
title = post.postInfo.title,
views = post.postInfo.views,
count = post.postInfo.count,
timeRequired = post.postInfo.timeRequired,
isOnCampus = post.postInfo.isOnCampus,
place = post.postInfo.place,
reward = post.postInfo.reward,
Expand Down