diff --git a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/betting/dto/BettingResponseDto.kt b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/betting/dto/BettingResponseDto.kt index 5f6ca99..0d4ddc2 100644 --- a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/betting/dto/BettingResponseDto.kt +++ b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/betting/dto/BettingResponseDto.kt @@ -5,12 +5,6 @@ import com.whatever.raisedragon.domain.betting.BettingPredictionType import com.whatever.raisedragon.domain.betting.BettingResult import io.swagger.v3.oas.annotations.media.Schema -@Schema(description = "[Response] 배팅 생성/수정") -data class BettingCreateUpdateResponse( - @Schema(description = "Goal Id") - val bettingRetrieveResponse: BettingRetrieveResponse, -) - @Schema(description = "[Response] 배팅 조회") data class BettingRetrieveResponse( @Schema(description = "BettingId") diff --git a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/goalproof/GoalProofApplicationService.kt b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/goalproof/GoalProofApplicationService.kt index fc99c67..eb6d60b 100644 --- a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/goalproof/GoalProofApplicationService.kt +++ b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/applicationservice/goalproof/GoalProofApplicationService.kt @@ -9,7 +9,6 @@ import com.whatever.raisedragon.domain.goal.GoalService import com.whatever.raisedragon.domain.goalproof.Comment import com.whatever.raisedragon.domain.goalproof.GoalProof import com.whatever.raisedragon.domain.goalproof.GoalProofService -import com.whatever.raisedragon.domain.user.UserService import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional import java.time.LocalDateTime @@ -20,7 +19,6 @@ import java.time.temporal.ChronoUnit class GoalProofApplicationService( private val goalProofService: GoalProofService, private val goalService: GoalService, - private val userService: UserService, ) { @Transactional diff --git a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringController.kt b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringController.kt deleted file mode 100644 index 87a4834..0000000 --- a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.whatever.raisedragon.controller.goalcheering - -import io.swagger.v3.oas.annotations.tags.Tag -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -@Tag(name = "Goal-Cheering", description = "Goal-Cheering API") -@RestController -@RequestMapping("/v1/cheering") -class GoalCheeringController \ No newline at end of file diff --git a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringDto.kt b/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringDto.kt deleted file mode 100644 index 2418757..0000000 --- a/raisedragon-api/src/main/kotlin/com/whatever/raisedragon/controller/goalcheering/GoalCheeringDto.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.whatever.raisedragon.controller.goalcheering - -import io.swagger.v3.oas.annotations.media.Schema -import jakarta.validation.constraints.NotNull - -@Schema(description = "[Request] 응원 생성") -data class CreateGoalCheeringRequest( - @Schema(description = "다짐 id") - val goalId: Long, - - @Schema(description = "응원 메시지") - @field:NotNull - val cheeringMessage: String -) - -@Schema(description = "[Request] 응원 수정") -data class UpdateGoalCheeringRequest( - @Schema(description = "응원 id") - val cheeringId: Long, - - @Schema(description = "응원 메시지") - @field:NotNull - val cheeringMessage: String -) - -@Schema(description = "[Request] 단건 응원 조회") -data class GoalCheeringResponse( - @Schema(description = "응원 id") - val id: Long, - - @Schema(description = "user id") - val userId: Long, - - @Schema(description = "Goal id") - val goalId: Long, - - @Schema(description = "응원 메시지") - val cheeringMessage: String -) { - companion object { - fun sample(): GoalCheeringResponse = GoalCheeringResponse( - id = 1L, - userId = 1L, - goalId = 1L, - cheeringMessage = "Sample cheering message" - ) - } -} \ No newline at end of file diff --git a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheering.kt b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheering.kt deleted file mode 100644 index 0628d72..0000000 --- a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheering.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.whatever.raisedragon.domain.goalcheering - -import java.time.LocalDateTime - -data class GoalCheering( - val id: Long, - val userId: Long, - val cheeringMessage: CheeringMessage, - val createdAt: LocalDateTime, - val updatedAt: LocalDateTime, - val deletedAt: LocalDateTime? -) - -fun GoalCheeringEntity.toDTO(): GoalCheering = GoalCheering( - id = id, - userId = userEntity.id, - cheeringMessage = cheeringMessage, - createdAt = createdAt, - updatedAt = updatedAt, - deletedAt = deletedAt -) \ No newline at end of file diff --git a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringEntity.kt b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringEntity.kt deleted file mode 100644 index c5a7483..0000000 --- a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringEntity.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.whatever.raisedragon.domain.goalcheering - -import com.whatever.raisedragon.domain.BaseEntity -import com.whatever.raisedragon.domain.goal.GoalEntity -import com.whatever.raisedragon.domain.user.UserEntity -import jakarta.persistence.* -import org.hibernate.annotations.SQLRestriction - -@Table(name = "goal_cheering") -@Entity -@SQLRestriction("deleted_at IS NULL") -class GoalCheeringEntity( - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - val id: Long = 0L, - - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "goal_id") - val goalEntity: GoalEntity, - - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "user_id") - val userEntity: UserEntity, - - @Embedded - val cheeringMessage: CheeringMessage - -) : BaseEntity() - -@Embeddable -data class CheeringMessage(val cheeringMessage: String) \ No newline at end of file diff --git a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringRepository.kt b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringRepository.kt deleted file mode 100644 index 1ded966..0000000 --- a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/goalcheering/GoalCheeringRepository.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.whatever.raisedragon.domain.goalcheering - -import org.springframework.data.jpa.repository.JpaRepository - -interface GoalCheeringRepository : JpaRepository \ No newline at end of file diff --git a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/refreshtoken/RefreshTokenEntity.kt b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/refreshtoken/RefreshTokenEntity.kt index 9610b53..4adff43 100644 --- a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/refreshtoken/RefreshTokenEntity.kt +++ b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/refreshtoken/RefreshTokenEntity.kt @@ -21,9 +21,4 @@ class RefreshTokenEntity( @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Long = 0L -) : BaseEntity() - -fun RefreshToken.fromDto(userEntity: UserEntity): RefreshTokenEntity = RefreshTokenEntity( - userEntity = userEntity, - payload = payload, -) \ No newline at end of file +) : BaseEntity() \ No newline at end of file diff --git a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/user/UserEntity.kt b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/user/UserEntity.kt index 24e91d8..a9af008 100644 --- a/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/user/UserEntity.kt +++ b/raisedragon-core/src/main/kotlin/com/whatever/raisedragon/domain/user/UserEntity.kt @@ -3,7 +3,6 @@ package com.whatever.raisedragon.domain.user import com.whatever.raisedragon.domain.BaseEntity import jakarta.persistence.* import org.hibernate.annotations.SQLRestriction -import java.time.LocalDateTime @Table(name = "users") @Entity @@ -32,10 +31,6 @@ fun User.fromDto(): UserEntity = UserEntity( nickname = nickname, ) -fun UserEntity.disable() { - this.deletedAt = LocalDateTime.now() -} - fun UserEntity.able() { this.deletedAt = null }