From 7c2a0b788c30765f59b53ae18e0d1b6d43f2eb51 Mon Sep 17 00:00:00 2001 From: xxoznge <20201049@sungshin.ac.kr> Date: Sun, 26 May 2024 17:01:05 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=EB=A0=88=EB=94=94=EC=8A=A4?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BlacklistController.java | 4 +++ .../dto/request/BlacklistCreateRequest.java | 4 +++ .../dto/response/BlacklistCreateResponse.java | 4 +++ .../domain/blacklist/entity/Blacklist.java | 28 +++++++++++++++++++ .../exception/BlacklistErrorCode.java | 4 +++ .../exception/BlacklistExceptionHandler.java | 10 +++++++ .../repository/BlacklistRepository.java | 11 ++++++++ .../service/BlacklistQueryService.java | 4 +++ .../blacklist/service/BlacklistService.java | 4 +++ src/main/resources/application-dev.yml | 4 +-- 10 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/controller/BlacklistController.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/request/BlacklistCreateRequest.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/response/BlacklistCreateResponse.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/entity/Blacklist.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistErrorCode.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistExceptionHandler.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/repository/BlacklistRepository.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistQueryService.java create mode 100644 src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistService.java diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/controller/BlacklistController.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/controller/BlacklistController.java new file mode 100644 index 0000000..88401d7 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/controller/BlacklistController.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.controller; + +public class BlacklistController { +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/request/BlacklistCreateRequest.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/request/BlacklistCreateRequest.java new file mode 100644 index 0000000..4fd28c6 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/request/BlacklistCreateRequest.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.dto.request; + +public record BlacklistCreateRequest() { +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/response/BlacklistCreateResponse.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/response/BlacklistCreateResponse.java new file mode 100644 index 0000000..6cf8efe --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/dto/response/BlacklistCreateResponse.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.dto.response; + +public record BlacklistCreateResponse() { +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/entity/Blacklist.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/entity/Blacklist.java new file mode 100644 index 0000000..119933e --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/entity/Blacklist.java @@ -0,0 +1,28 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.entity; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Builder +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Getter +@Entity +@Table(name = "blacklist") +public class Blacklist { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "blacklist_id") + private Long id; + +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistErrorCode.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistErrorCode.java new file mode 100644 index 0000000..2e63061 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistErrorCode.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.exception; + +public enum BlacklistErrorCode { +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistExceptionHandler.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistExceptionHandler.java new file mode 100644 index 0000000..875fef6 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/exception/BlacklistExceptionHandler.java @@ -0,0 +1,10 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.exception; + +import com.ddabong.ddabongdotchiBE.domain.global.BaseErrorCode; +import com.ddabong.ddabongdotchiBE.domain.global.CustomException; + +public class BlacklistExceptionHandler extends CustomException { + public BlacklistExceptionHandler(BaseErrorCode code) { + super(code); + } +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/repository/BlacklistRepository.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/repository/BlacklistRepository.java new file mode 100644 index 0000000..2ce92ed --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/repository/BlacklistRepository.java @@ -0,0 +1,11 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.repository; + +import java.util.Optional; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.ddabong.ddabongdotchiBE.domain.blacklist.entity.Blacklist; + +public interface BlacklistRepository extends JpaRepository { + Optional findById(Long Id); +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistQueryService.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistQueryService.java new file mode 100644 index 0000000..74721e7 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistQueryService.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.service; + +public class BlacklistQueryService { +} diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistService.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistService.java new file mode 100644 index 0000000..1544851 --- /dev/null +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/blacklist/service/BlacklistService.java @@ -0,0 +1,4 @@ +package com.ddabong.ddabongdotchiBE.domain.blacklist.service; + +public class BlacklistService { +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index ea90b5b..504050b 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -30,5 +30,5 @@ jwt: refresh-expiration-time: 86400000 redis: - host: localhost - port: 6379 + host: ${REDIS_HOSTNAME} + port: ${REDIS_PORT}