-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ 유실물 상태 업데이트 API 추가 (#295) * ♻️ import문 최적화 (#295) * ♻️ command에서 status로 변경 (#295) * ♻️ 유실물 상태 변경 시, Lost112 예외 처리 (#295)
- Loading branch information
Showing
9 changed files
with
183 additions
and
3 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
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
31 changes: 31 additions & 0 deletions
31
...otlin/backend/team/ahachul_backend/api/lost/adapter/web/in/dto/UpdateLostPostStatusDto.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,31 @@ | ||
package backend.team.ahachul_backend.api.lost.adapter.web.`in`.dto | ||
|
||
import backend.team.ahachul_backend.api.lost.application.service.command.`in`.UpdateLostPostStatusCommand | ||
import backend.team.ahachul_backend.api.lost.domain.entity.LostPostEntity | ||
import backend.team.ahachul_backend.api.lost.domain.model.LostStatus | ||
|
||
class UpdateLostPostStatusDto { | ||
|
||
data class Request( | ||
val status: LostStatus | ||
) { | ||
fun toCommand(id: Long): UpdateLostPostStatusCommand { | ||
return UpdateLostPostStatusCommand( | ||
id = id, | ||
status = status | ||
) | ||
} | ||
} | ||
|
||
data class Response( | ||
val id: Long | ||
) { | ||
companion object { | ||
fun from(entity: LostPostEntity): Response { | ||
return Response( | ||
id = entity.id | ||
) | ||
} | ||
} | ||
} | ||
} |
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
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
8 changes: 8 additions & 0 deletions
8
...ckend/team/ahachul_backend/api/lost/application/command/in/UpdateLostPostStatusCommand.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,8 @@ | ||
package backend.team.ahachul_backend.api.lost.application.service.command.`in` | ||
|
||
import backend.team.ahachul_backend.api.lost.domain.model.LostStatus | ||
|
||
class UpdateLostPostStatusCommand ( | ||
val id: Long, | ||
val status: LostStatus | ||
) |
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