|
1 | | -//package com.sys.stm.global.common.entity; |
2 | | -// |
3 | | -//import jakarta.persistence.Column; |
4 | | -//import jakarta.persistence.EntityListeners; |
5 | | -//import jakarta.persistence.MappedSuperclass; |
6 | | -//import lombok.Getter; |
7 | | -//import org.springframework.data.annotation.CreatedDate; |
8 | | -//import org.springframework.data.annotation.LastModifiedDate; |
9 | | -//import org.springframework.data.jpa.domain.support.AuditingEntityListener; |
10 | | -// |
11 | | -//import java.time.LocalDateTime; |
12 | | -// |
13 | | -//@EntityListeners(AuditingEntityListener.class) |
14 | | -//@MappedSuperclass |
15 | | -//@Getter |
16 | | -//public class BaseEntity { |
17 | | -// |
18 | | -// @CreatedDate |
19 | | -// @Column(name = "created_at", nullable = false, updatable = false) |
20 | | -// private LocalDateTime createdAt; |
21 | | -// |
22 | | -// @LastModifiedDate |
23 | | -// @Column(name = "updated_at") |
24 | | -// private LocalDateTime updatedAt; |
25 | | -// |
26 | | -// @Column(name = "isDeleted", nullable = false) |
27 | | -// private Boolean isDeleted = false; |
28 | | -// |
29 | | -// public void markAsDeleted() { |
30 | | -// this.isDeleted = true; |
31 | | -// } |
32 | | -//} |
| 1 | +package com.sys.stm.global.common.entity; |
| 2 | + |
| 3 | +import lombok.Getter; |
| 4 | + |
| 5 | +import java.sql.Timestamp; |
| 6 | +import java.time.LocalDateTime; |
| 7 | + |
| 8 | + |
| 9 | +@Getter |
| 10 | +public class BaseEntity { |
| 11 | + |
| 12 | + private Timestamp createdAt; |
| 13 | + |
| 14 | + private Timestamp updatedAt; |
| 15 | + |
| 16 | + private Boolean isDeleted = false; |
| 17 | + |
| 18 | + public void markAsDeleted() { |
| 19 | + this.isDeleted = true; |
| 20 | + } |
| 21 | +} |
0 commit comments