package com.sy.coinage.sys.req;

import com.sy.coinage.core.interceptor.Update;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

/**
 * 角色添加请求bean
 */
@Data
public class RoleReq implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 自增主键 -10
     */
    @ApiModelProperty(value = "自增主键")
    @NotNull(message = "自增主键不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;
    /**
     * 排序 -5
     */
    @ApiModelProperty(value = "排序")
    private Integer sorted;
    /**
     * 名称 -10
     */
    @ApiModelProperty(value = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 10, message = "名称长度不正确")
    private String name;
    /**
     * 备注 -50
     */
    @ApiModelProperty(value = "备注")
    @Length(max = 50, message = "备注长度不正确")
    private String remark;

}

