issue # ExampleEntity 파일 작성
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||||
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
|
@Builder
|
||||||
|
@Entity
|
||||||
|
@TABLE(name = "example")
|
||||||
|
public class Example {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column(nullable = true, length = 50)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
@Column(nullable = false)
|
||||||
|
private Boolean isDeleted = false;
|
||||||
|
|
||||||
|
@CreationTimestamp
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
public void delete() {
|
||||||
|
this.isDeleted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user