adding soft delete

This commit is contained in:
2025-10-22 23:45:09 +02:00
parent 540f859cda
commit 724ff484d7
2 changed files with 4 additions and 0 deletions

View File

@@ -40,4 +40,5 @@ public class BaseEntity {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
private LocalDateTime updatedAt; // Or Date, Timestamp
private Boolean deleted;
}

View File

@@ -2,6 +2,8 @@ package zw.qantra.tm.domain.models;
import jakarta.persistence.Entity;
import lombok.*;
import org.hibernate.annotations.SQLRestriction;
import org.hibernate.annotations.Where;
@Entity
@@ -10,6 +12,7 @@ import lombok.*;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@SQLRestriction("deleted = false")
public class Provider extends BaseEntity {
private String clientId;
private String label;