package cn.skcks.matrix.v2.model.role.dto;

import cn.skcks.matrix.v2.services.casbin.CasbinService;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Schema(title = "授予用户角色")
@Data
public class GrantAndRevokeRoleForUserDto {
    @NotBlank(message = "用户id 不能为空")
    @Pattern(regexp = "\\d*", message = "用户id 格式错误")
    @Schema(description = "用户id")
    private String userId;

    @NotBlank(message = "角色 不能为空")
    @Schema(description = "角色")
    private String role;

    @NotBlank(message = "系统 不能为空")
    @Schema(description = "系统", defaultValue = CasbinService.DEFAULT_SYSTEM)
    private String system;
}
