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 DeptReq 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;
    /**
     * 机构id -10
     */
    @ApiModelProperty(value = "机构id")
    private Integer orgId;
    /**
     * 上级id -10
     */
    @ApiModelProperty(value = "上级id")
    private Integer pid;

    @ApiModelProperty(value = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 30, message = "名称长度不正确，最大长度30")
    private String name;

    @ApiModelProperty(value = "备注")
    @Length(max = 50, message = "备注长度不正确，最大长度30")
    private String remark;
}
