diff --git a/src/main/java/com/nice/petudio/domain/concept/Concept.java b/src/main/java/com/nice/petudio/domain/concept/Concept.java index a82224d..654536a 100644 --- a/src/main/java/com/nice/petudio/domain/concept/Concept.java +++ b/src/main/java/com/nice/petudio/domain/concept/Concept.java @@ -3,6 +3,8 @@ import com.nice.petudio.domain.base.BaseEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; @@ -24,6 +26,10 @@ public class Concept extends BaseEntity { @Column(name = "concept_id") private Long id; + @Enumerated(EnumType.STRING) + @Column(name = "concept_type", length = 30, nullable = false) + private ConceptType conceptType; + @Column(name = "concept_main_image", length = 200, nullable = false) private String mainImage; diff --git a/src/main/java/com/nice/petudio/domain/concept/ConceptMessageType.java b/src/main/java/com/nice/petudio/domain/concept/ConceptMessageType.java new file mode 100644 index 0000000..d5f5f98 --- /dev/null +++ b/src/main/java/com/nice/petudio/domain/concept/ConceptMessageType.java @@ -0,0 +1,14 @@ +package com.nice.petudio.domain.concept; + +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Getter +public enum ConceptMessageType { + NAME("name"), + DESCRIPTION("description"); + + private final String type; +} diff --git a/src/main/java/com/nice/petudio/domain/concept/ConceptType.java b/src/main/java/com/nice/petudio/domain/concept/ConceptType.java new file mode 100644 index 0000000..ac02190 --- /dev/null +++ b/src/main/java/com/nice/petudio/domain/concept/ConceptType.java @@ -0,0 +1,14 @@ +package com.nice.petudio.domain.concept; + +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor(access = AccessLevel.PRIVATE) +@Getter +public enum ConceptType { + CONCEPT_3D("concept.3d."), + CONCEPT_TRENDY("concept.trendy."); + + private final String messagePrefix; +} diff --git a/src/main/resources/messages/validation.properties b/src/main/resources/messages/validation.properties deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/resources/sql/data.sql b/src/main/resources/sql/data.sql new file mode 100644 index 0000000..c455eed --- /dev/null +++ b/src/main/resources/sql/data.sql @@ -0,0 +1,2 @@ +INSERT INTO concepts VALUES(1, 'CONCEPT_3D', 'mainImage','image','image','image','image','image','image','image','image', '2024-01-24 23:48:52','2024-01-24 23:48:52') +INSERT INTO concepts VALUES(2, 'CONCEPT_TRENDY', 'mainImage','image','image','image','image','image','image','image','image', '2024-01-24 23:48:52','2024-01-24 23:48:52') diff --git a/src/main/resources/sql/schema.sql b/src/main/resources/sql/schema.sql index 2bfb5e3..0dbca4c 100644 --- a/src/main/resources/sql/schema.sql +++ b/src/main/resources/sql/schema.sql @@ -13,7 +13,7 @@ CREATE TABLE `members` `social_id` varchar(300) NOT NULL, `social_type` varchar(30) NOT NULL, `member_role` varchar(30) NOT NULL, - `email` varchar(100) NOT NULL, + `email` varchar(100) NOT NULL, `fcm_token` varchar(300) NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP @@ -40,6 +40,7 @@ CREATE TABLE `points` CREATE TABLE `concepts` ( `concept_id` bigint AUTO_INCREMENT PRIMARY KEY, + `concept_type` varchar(30) NOT NULL, `concept_main_image` varchar(200) NOT NULL, `concept_sub_image1` varchar(200) NOT NULL, `concept_sub_image2` varchar(200) NOT NULL,