package cn.ey.biz.module.system.controller.admin.permission.vo.dataRole;

import cn.ey.biz.common.pojo.PageParam;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class DataRoleVO extends PageParam {

    public interface Save {
    }

    public interface Update {
    }

    @NotNull(message = "id不能为空", groups = {Update.class})
    private Long id;

    @NotBlank(message = "角色名称不能为空", groups = {Save.class})
    private String name;

    private String sl;

    private String mr;

    private String code;

    @Size(max = 200, message = "角色描述最多200个字符")
    private String explain;

    //新增、修改时赋值
    @Size(max = 5000, message = "做多选择5000条CodeBlock")
    private List<String> codeBlocks;

    //查询时赋值
    private List<DataRoleCodeBlockConfigVO> codeBlocksObject;


    private List<Long> userIds;

    @NotNull(message = "配置方式不能为空", groups = {Save.class})
    private String type;

    @NotBlank(message = "应用系统不能为空", groups = {Save.class})
    private String app;

    @Valid
    private DataRoleLevelConfigVO config;

    private String configType;

}
