diff --git a/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Feed.java b/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Feed.java new file mode 100644 index 0000000..cfdccca --- /dev/null +++ b/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Feed.java @@ -0,0 +1,31 @@ +package com.cmc.zenefitserver.domain.feed.domain; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; + +import javax.persistence.*; +import java.util.List; +import java.util.Set; + +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class Feed { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + private Long id; + + @OneToMany(mappedBy = "feed", fetch = FetchType.LAZY) + private Set tags; + + private String picture; + + private String title; // 제목 + private String text; // 본문 + + private String bizId; // policyId + + + + +} diff --git a/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Tag.java b/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Tag.java new file mode 100644 index 0000000..a805bf9 --- /dev/null +++ b/src/main/java/com/cmc/zenefitserver/domain/feed/domain/Tag.java @@ -0,0 +1,16 @@ +package com.cmc.zenefitserver.domain.feed.domain; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Tag { + + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Id + private Long id; + + private String title; +}