-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/com/cmc/zenefitserver/domain/feed/domain/Feed.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Tag> tags; | ||
|
||
private String picture; | ||
|
||
private String title; // 제목 | ||
private String text; // 본문 | ||
|
||
private String bizId; // policyId | ||
|
||
|
||
|
||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/cmc/zenefitserver/domain/feed/domain/Tag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |