-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 이미지 도메인을 User와 Promise로 분리하고 Promise에 좌표값 추가 (#135)
- Loading branch information
Showing
23 changed files
with
274 additions
and
249 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
14 changes: 10 additions & 4 deletions
14
...-Api/src/main/kotlin/com/depromeet/whatnow/api/image/usecase/ImageUploadSuccessUseCase.kt
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 |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package com.depromeet.whatnow.api.image.usecase | ||
|
||
import com.depromeet.whatnow.annotation.UseCase | ||
import com.depromeet.whatnow.common.vo.CoordinateVo | ||
import com.depromeet.whatnow.config.security.SecurityUtils | ||
import com.depromeet.whatnow.domains.image.domain.ImageCommentType | ||
import com.depromeet.whatnow.domains.image.domain.PromiseImageCommentType | ||
import com.depromeet.whatnow.domains.image.service.ImageDomainService | ||
|
||
@UseCase | ||
class ImageUploadSuccessUseCase( | ||
val imageDomainService: ImageDomainService, | ||
) { | ||
fun promiseUploadImageSuccess(promiseId: Long, imageKey: String, imageCommentType: ImageCommentType) { | ||
fun promiseUploadImageSuccess( | ||
promiseId: Long, | ||
imageKey: String, | ||
promiseImageCommentType: PromiseImageCommentType, | ||
userLocation: CoordinateVo, | ||
) { | ||
val currentUserId: Long = SecurityUtils.currentUserId | ||
imageDomainService.promiseUploadImageSuccess(currentUserId, promiseId, imageKey, imageCommentType) | ||
imageDomainService.promiseImageUploadSuccess(currentUserId, promiseId, imageKey, promiseImageCommentType, userLocation) | ||
} | ||
|
||
fun userUploadImageSuccess(imageKey: String) { | ||
val currentUserId: Long = SecurityUtils.currentUserId | ||
imageDomainService.userUploadImageSuccess(currentUserId, imageKey) | ||
imageDomainService.userImageUploadSuccess(currentUserId, imageKey) | ||
} | ||
} |
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
21 changes: 0 additions & 21 deletions
21
Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/image/adapter/ImageAdapter.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...Domain/src/main/kotlin/com/depromeet/whatnow/domains/image/adapter/PromiseImageAdapter.kt
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 @@ | ||
package com.depromeet.whatnow.domains.image.adapter | ||
|
||
import com.depromeet.whatnow.annotation.Adapter | ||
import com.depromeet.whatnow.domains.image.domain.PromiseImage | ||
import com.depromeet.whatnow.domains.image.repository.PromiseImageRepository | ||
|
||
@Adapter | ||
class PromiseImageAdapter( | ||
val promiseImageRepository: PromiseImageRepository, | ||
) { | ||
fun save(promiseImage: PromiseImage): PromiseImage { | ||
return promiseImageRepository.save(promiseImage) | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...ow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/image/adapter/UserImageAdapter.kt
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 @@ | ||
package com.depromeet.whatnow.domains.image.adapter | ||
|
||
import com.depromeet.whatnow.annotation.Adapter | ||
import com.depromeet.whatnow.domains.image.domain.UserImage | ||
import com.depromeet.whatnow.domains.image.repository.UserImageRepository | ||
|
||
@Adapter | ||
class UserImageAdapter( | ||
val userImageRepository: UserImageRepository, | ||
) { | ||
fun save(userImage: UserImage): UserImage { | ||
return userImageRepository.save(userImage) | ||
} | ||
} |
69 changes: 0 additions & 69 deletions
69
Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/image/domain/Image.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/image/domain/ImageType.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.