-
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.
Merge pull request #17 from Tave-13th-Project-Team-4-Fiurinee/feature…
…/entity feat: 엔티티 생성
- Loading branch information
Showing
9 changed files
with
202 additions
and
4 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/main/java/com/example/fiurinee/domain/anniversary/entity/Anniversary.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,30 @@ | ||
package com.example.fiurinee.domain.anniversary.entity; | ||
|
||
import com.example.fiurinee.domain.member.entity.Member; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.sql.Timestamp; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class Anniversary { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
private Timestamp anniersaryDate; | ||
|
||
private String type; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "memberId") | ||
private Member member; | ||
|
||
|
||
|
||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/com/example/fiurinee/domain/flower/entity/Flower.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,28 @@ | ||
package com.example.fiurinee.domain.flower.entity; | ||
|
||
import com.example.fiurinee.domain.recommendFlower.entity.RecommendFlower; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.net.URL; | ||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class Flower { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long flowerId; | ||
|
||
private String name; | ||
private int period; | ||
private String flowerLanguage; | ||
private URL image; | ||
private String explain; | ||
|
||
@OneToMany(mappedBy = "flower", cascade = CascadeType.ALL) | ||
private List<RecommendFlower> recommendFlowers; | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/example/fiurinee/domain/inputMessage/entity/InputMessage.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,26 @@ | ||
package com.example.fiurinee.domain.inputMessage.entity; | ||
|
||
import com.example.fiurinee.domain.member.entity.Member; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.sql.Timestamp; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class InputMessage { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long inputMessageId; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "memberId") | ||
private Member member; | ||
|
||
private String content; | ||
private Timestamp createAt; | ||
private Boolean prefer; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/example/fiurinee/domain/matchingFlower/entity/MatchingFlower.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,27 @@ | ||
package com.example.fiurinee.domain.matchingFlower.entity; | ||
|
||
import com.example.fiurinee.domain.flower.entity.Flower; | ||
import com.example.fiurinee.domain.recommendFlower.entity.RecommendFlower; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class MatchingFlower { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long matchingFlowerId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "recommendFlowerId") | ||
private RecommendFlower recommendFlower; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "flowerId") | ||
private Flower flower; | ||
|
||
private Long flowerOrderId; | ||
} |
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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/com/example/fiurinee/domain/preferList/entity/PreferList.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,22 @@ | ||
package com.example.fiurinee.domain.preferList.entity; | ||
|
||
import com.example.fiurinee.domain.member.entity.Member; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class PreferList { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long preferListId; | ||
|
||
private Long preferNumber; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "memberId") | ||
private Member member; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/example/fiurinee/domain/recommendComment/entity/RecommendComment.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,24 @@ | ||
package com.example.fiurinee.domain.recommendComment.entity; | ||
|
||
import com.example.fiurinee.domain.member.entity.Member; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class RecommendComment { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long recommendCommentId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "memberId") | ||
private Member member; | ||
|
||
private String content; | ||
private Boolean prefer; | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
src/main/java/com/example/fiurinee/domain/recommendFlower/entity/RecommendFlower.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,33 @@ | ||
package com.example.fiurinee.domain.recommendFlower.entity; | ||
|
||
import com.example.fiurinee.domain.flower.entity.Flower; | ||
import com.example.fiurinee.domain.matchingFlower.entity.MatchingFlower; | ||
import com.example.fiurinee.domain.member.entity.Member; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class RecommendFlower { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long recommendFlowerId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "memberId") | ||
private Member member; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "flower_id") | ||
private Flower flower; | ||
|
||
private Boolean prefer; | ||
|
||
@OneToMany(mappedBy = "recommendFlower", cascade = CascadeType.ALL) | ||
private List<MatchingFlower> matchingFlowers; | ||
} |