adding soft delete
This commit is contained in:
@@ -40,4 +40,5 @@ public class BaseEntity {
|
|||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
|
||||||
private LocalDateTime updatedAt; // Or Date, Timestamp
|
private LocalDateTime updatedAt; // Or Date, Timestamp
|
||||||
|
|
||||||
|
private Boolean deleted;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package zw.qantra.tm.domain.models;
|
|||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import org.hibernate.annotations.SQLRestriction;
|
||||||
|
import org.hibernate.annotations.Where;
|
||||||
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@@ -10,6 +12,7 @@ import lombok.*;
|
|||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
@SQLRestriction("deleted = false")
|
||||||
public class Provider extends BaseEntity {
|
public class Provider extends BaseEntity {
|
||||||
private String clientId;
|
private String clientId;
|
||||||
private String label;
|
private String label;
|
||||||
|
|||||||
Reference in New Issue
Block a user