You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
949 B
46 lines
949 B
package org.ros.chatto.model;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.OneToMany;
|
|
import javax.persistence.Table;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|
|
|
|
|
@Entity
|
|
@Table(name = "roles")
|
|
public class Role {
|
|
@Id
|
|
@Column(name = "role_id")
|
|
private int roleID;
|
|
@Column(name = "role_name")
|
|
private String name;
|
|
private String description;
|
|
@OneToMany(mappedBy = "role")
|
|
@JsonBackReference
|
|
private Set<UserRole> userRoles = new HashSet<>();
|
|
public int getRoleId() {
|
|
return roleID;
|
|
}
|
|
public void setRoleId(int id) {
|
|
this.roleID = id;
|
|
}
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
public void setName(String role) {
|
|
this.name = role;
|
|
}
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
}
|