package ru.ulstu.user.model;

import ru.ulstu.odin.model.OdinDto;
import ru.ulstu.odin.model.annotation.OdinCaption;
import ru.ulstu.user.controller.UserController;

public class UserRoleDto implements OdinDto {
    @OdinCaption("Роль")
    private String id;

    public UserRoleDto() {
    }

    public UserRoleDto(UserRole role) {
        this.id = role.getName();
    }

    public UserRoleDto(String name) {
        this.id = name;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getViewValue() {
        return id;
    }

    @Override
    public String getControllerPath() {
        return UserController.URL + UserController.ROLES_URL;
    }
}
