Skip to content

Commit

Permalink
feat : Feed Entity 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
LHS-11 committed Jul 23, 2024
1 parent 08cfb5f commit c085ba4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/com/cmc/zenefitserver/domain/feed/domain/Feed.java
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 src/main/java/com/cmc/zenefitserver/domain/feed/domain/Tag.java
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;
}

0 comments on commit c085ba4

Please sign in to comment.