package com.xy.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@ApiModel("角色表DTO")
@Accessors(chain = true)
public class RoleListDto {

    @ApiModelProperty(value = "角色ID", required = false)
    private Long id;

    @ApiModelProperty(value = "系统", required = true)
    private Long sysId;


    @NotNull(message = "角色标识不可为空")
    @Size(max = 64, min = 2, message = "角色标识长度需要在2-64之间")
    @ApiModelProperty(value = "角色标识", required = true)
    private String code;

    @NotNull(message = "角色名称不能为空")
    @Size(max = 64, min = 2, message = "角色名称长度需要在2-64之间")
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;


    @ApiModelProperty("描述")
    @Size(max = 255, message = "描述不可超过255个字符")
    private String description;


    @ApiModelProperty("状态;true=启用(默认) false=禁用")
    private Boolean status;


    @ApiModelProperty("是否预留角色;true=是 false=否(默认)")
    private Boolean isLeave;


}
