30 lines
606 B
Java
30 lines
606 B
Java
package com.example.survey.vo;
|
|
|
|
import com.example.survey.entity.Role;
|
|
import com.example.survey.enumeration.AuthEnum;
|
|
import lombok.*;
|
|
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author Pope
|
|
*/
|
|
@Getter
|
|
@Setter
|
|
@ToString
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
public class CreateRoleVo {
|
|
private String roleName;
|
|
private List<String> authList;
|
|
|
|
public CreateRoleVo(Role role) {
|
|
roleName = role.getName();
|
|
authList = new LinkedList<>();
|
|
for (AuthEnum authEnum : role.getAuthoritySet()) {
|
|
authList.add(authEnum.getName());
|
|
}
|
|
}
|
|
}
|