-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
src/main/java/com/haejwo/tripcometrue/domain/triprecordreview/entity/TripRecordReview.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,42 @@ | ||
package com.haejwo.tripcometrue.domain.triprecordreview.entity; | ||
|
||
import com.haejwo.tripcometrue.domain.member.entity.Member; | ||
import com.haejwo.tripcometrue.global.entity.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class TripRecordReview extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue | ||
@Column(name = "trip_record_review_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "trip_record_id") | ||
private TripRecord tripRecord; | ||
|
||
@Lob | ||
private String content; | ||
|
||
private Short rating; | ||
private String imageUrl; | ||
|
||
@Builder | ||
public TripRecordReview(Member member, String content, Short rating, String imageUrl) { | ||
this.member = member; | ||
this.content = content; | ||
this.rating = rating; | ||
this.imageUrl = imageUrl; | ||
} | ||
} |