Skip to content

Commit

Permalink
Role.java id changed to Long
Browse files Browse the repository at this point in the history
  • Loading branch information
Hdelegido committed Feb 29, 2024
1 parent 96dcef0 commit 7aaa123
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Role.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package cat.udl.eps.softarch.demo.domain;

import com.fasterxml.jackson.annotation.JsonIdentityReference;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.Table;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

Expand All @@ -16,29 +14,31 @@
@Data
@JsonIdentityReference(alwaysAsId = true)
@EqualsAndHashCode(callSuper = true)
public class Role extends UriEntity<String> {
public class Role extends UriEntity<Long> {

@Id
private String id;
@GeneratedValue
@NotNull
private Long id;

@NotBlank
private String name;

@ManyToMany
private Set<User> users;

public Role(String id) {
public Role(Long id) {
this.id = id;
}

public Role() {
}

public String getId() {
public Long getId() {
return id;
}

public void setId(String id) {
public void setId(Long id) {
this.id = id;
}
}
Expand Down

0 comments on commit 7aaa123

Please sign in to comment.