This commit is contained in:
Anthony Stirling
2023-08-13 01:12:29 +01:00
parent ad5f057733
commit e791fee38b
15 changed files with 480 additions and 56 deletions

View File

@@ -13,7 +13,19 @@ import jakarta.persistence.Table;
@Table(name = "authorities")
public class Authority {
@Id
public Authority() {
}
public Authority(String authority, User user) {
this.authority = authority;
this.user = user;
user.getAuthorities().add(this);
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;