dev add rest for company, add link for users , update reg users
Test Workflow / test (push) Successful in 2s
Test Workflow / test (push) Successful in 2s
This commit is contained in:
@@ -6,6 +6,7 @@ import jakarta.validation.constraints.Size;
|
||||
import lombok.*;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
import ru.soune.nocopy.entity.company.Company;
|
||||
import ru.soune.nocopy.entity.file.Violation;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@@ -37,9 +38,6 @@ public class User {
|
||||
@Column(name = "email_verified")
|
||||
private boolean emailVerified = false;
|
||||
|
||||
@Column(name = "company")
|
||||
private String company;
|
||||
|
||||
@Column(nullable = false)
|
||||
@Size(min = 6)
|
||||
@JsonIgnore
|
||||
@@ -70,6 +68,9 @@ public class User {
|
||||
@Column(name = "is_active")
|
||||
private boolean isActive = false;
|
||||
|
||||
@Column(name = "permissions")
|
||||
private Long userPermissions;
|
||||
|
||||
@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonIgnore
|
||||
@ToString.Exclude
|
||||
@@ -88,4 +89,9 @@ public class User {
|
||||
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonIgnore
|
||||
private ProtectedFileCheck protectedFileCheck;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "company_id")
|
||||
@ToString.Exclude
|
||||
private Company company;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user