Skip to content

Commit

Permalink
feat(#42): Review 데이터베이스에 visible 컬럼 추가
Browse files Browse the repository at this point in the history
- visible 컬럼은 리뷰를 삭제할때 false 시킨다.
  • Loading branch information
ghdcksgml1 committed Jan 15, 2023
1 parent f9809bc commit 709f384
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/com/proceed/swhackathon/model/Review.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package com.proceed.swhackathon.model;

import lombok.*;
import org.hibernate.annotations.ColumnDefault;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

@Entity
@Getter
@Getter @Setter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
@EntityListeners(AuditingEntityListener.class)
@ToString(of = {"imageUrl, star, content"})
public class Review extends TimeZone {

@Id @GeneratedValue
Expand All @@ -31,7 +33,10 @@ public class Review extends TimeZone {
@Column(nullable = false)
private String content; // 리뷰내용

@CreatedBy
@Column(nullable = false)
private boolean visible = false;

@CreatedBy
@Column(nullable = true)
private String createdBy; // 작성자
}

0 comments on commit 709f384

Please sign in to comment.