37 lines
669 B
Java
37 lines
669 B
Java
package com.example.survey.entity;
|
|
|
|
import com.example.survey.enumeration.AuthEnum;
|
|
import lombok.*;
|
|
import org.bson.types.ObjectId;
|
|
import org.springframework.data.annotation.Id;
|
|
import org.springframework.data.mongodb.core.index.Indexed;
|
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
|
|
import java.util.Objects;
|
|
import java.util.Set;
|
|
|
|
/**
|
|
* @author Pope
|
|
*/
|
|
@Data
|
|
@Document(collection = "role")
|
|
public class Role {
|
|
|
|
/**
|
|
* id
|
|
*/
|
|
@Id
|
|
private ObjectId id;
|
|
|
|
/**
|
|
* 角色名
|
|
*/
|
|
@Indexed(unique = true)
|
|
private String name;
|
|
|
|
/**
|
|
* 该角色的权限组
|
|
*/
|
|
private Set<AuthEnum> authoritySet;
|
|
}
|