package com.fzm.mall.server.admin.auth_center.entity.dto;

import com.fzm.mall.server.admin.annotation.CustomType;
import com.fzm.mall.server.admin.constant.MALLGlobalConfig;
import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangp
 * @date 2021/4/8 16:34
 * @description 管理员角色
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "RoleVO", description = "管理员角色信息")
public class RoleDTO {

    @ApiModelProperty("角色名称")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String roleName;

    @ApiModelProperty("备注")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String remarks;

    @ApiModelProperty("角色归属(4.平台角色 5.商户角色 6.自营角色)")
    @CustomType(pType = MALLGlobalConfig.ROLE_TYPE, message = MallResponseError.PARAM_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer type;

    @ApiModelProperty("权限json")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String authJson;

}
