Skip to content

Commit

Permalink
[feat] TripRecordReview 클래스 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
meena2003 committed Jan 3, 2024
1 parent 60cf680 commit de357f8
Showing 1 changed file with 42 additions and 0 deletions.
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;
}
}

0 comments on commit de357f8

Please sign in to comment.