improving logical flow of transactions & onboarding
This commit is contained in:
@@ -41,5 +41,5 @@ public class BaseEntity {
|
||||
private LocalDateTime updatedAt; // Or Date, Timestamp
|
||||
|
||||
@Column(columnDefinition = "BOOLEAN DEFAULT FALSE")
|
||||
private Boolean deleted;
|
||||
private Boolean deleted = false;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package zw.qantra.tm.domain.models;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.SQLRestriction;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
@@ -14,6 +15,7 @@ import java.util.List;
|
||||
@Table(name = "users")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SQLRestriction("deleted = false")
|
||||
public class User extends BaseEntity implements UserDetails {
|
||||
|
||||
@Column(unique = true, nullable = false)
|
||||
|
||||
Reference in New Issue
Block a user