diff --git a/src/main/java/org/prgrms/nabimarketbe/domain/category/entity/Category.java b/src/main/java/org/prgrms/nabimarketbe/domain/category/entity/Category.java index d48821e5..909cb867 100644 --- a/src/main/java/org/prgrms/nabimarketbe/domain/category/entity/Category.java +++ b/src/main/java/org/prgrms/nabimarketbe/domain/category/entity/Category.java @@ -1,16 +1,22 @@ package org.prgrms.nabimarketbe.domain.category.entity; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + import lombok.Getter; import lombok.NoArgsConstructor; -import org.prgrms.nabimarketbe.global.BaseEntity; - -import javax.persistence.*; @Entity @Table(name = "categories") @Getter @NoArgsConstructor -public class Category extends BaseEntity { +public class Category { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "category_id", nullable = false) diff --git a/src/main/java/org/prgrms/nabimarketbe/domain/suggestion/service/SuggestionService.java b/src/main/java/org/prgrms/nabimarketbe/domain/suggestion/service/SuggestionService.java index 4796ead1..e4abb8a3 100644 --- a/src/main/java/org/prgrms/nabimarketbe/domain/suggestion/service/SuggestionService.java +++ b/src/main/java/org/prgrms/nabimarketbe/domain/suggestion/service/SuggestionService.java @@ -115,7 +115,7 @@ public SuggestionResponseDTO updateSuggestionStatus( .orElseThrow(() -> new BaseException(ErrorCode.SUGGESTION_NOT_FOUND)); suggestion.decideSuggestion(isAccepted); - + //TODO : 채팅방 생성 return SuggestionResponseDTO.from(suggestion); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f08c04e6..5e2550b7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,6 +2,16 @@ spring: profiles: active: local + ## .sql문을 실행하기 위함 + sql: + init: + mode: always + + ## hibernate ddl 이후 datasource intialize + jpa: + defer-datasource-initialization: true + + springdoc: version: '@springdoc.version@' swagger-ui: diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql new file mode 100644 index 00000000..d61d969b --- /dev/null +++ b/src/main/resources/data.sql @@ -0,0 +1,9 @@ +insert into categories(category_name) values ('MALE_CLOTHES'); +insert into categories(category_name) values ('FEMALE_CLOTHES'); +insert into categories(category_name) values ('GOODS_ACCESSORY'); +insert into categories(category_name) values ('SHOES'); +insert into categories(category_name) values ('SPORTS'); +insert into categories(category_name) values ('BOOKS'); +insert into categories(category_name) values ('ELECTRONICS'); +insert into categories(category_name) values ('FURNITURE_INTERIOR'); +insert into categories(category_name) values ('HOME_ELECTRONICS');