polishing the workspace migration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package zw.qantra.tm.domain.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -9,7 +10,9 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users", indexes = {
|
||||
@@ -50,6 +53,10 @@ public class User extends BaseEntity implements UserDetails {
|
||||
|
||||
@Column(name = "is_credentials_non_expired")
|
||||
private boolean credentialsNonExpired = true;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToMany(mappedBy = "users", fetch = FetchType.LAZY)
|
||||
private Set<Workspace> workspaces = new HashSet<>();
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
|
||||
Reference in New Issue
Block a user