You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.4 KiB
106 lines
2.4 KiB
/**
|
|
* Copyright (c) 2018 人人开源 All rights reserved.
|
|
*
|
|
* https://www.renren.io
|
|
*
|
|
* 版权所有,侵权必究!
|
|
*/
|
|
|
|
package com.epmet.dto;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.epmet.commons.tools.utils.TreeNode;
|
|
import com.epmet.commons.tools.validator.group.AddGroup;
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup;
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup;
|
|
import io.swagger.annotations.ApiModel;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
import javax.validation.constraints.Min;
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotNull;
|
|
import javax.validation.constraints.Null;
|
|
import java.io.Serializable;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* 部门管理
|
|
*
|
|
* @author Mark sunlightcs@gmail.com
|
|
* @since 1.0.0
|
|
*/
|
|
@ApiModel(value = "部门管理")
|
|
public class SysDeptDTO extends TreeNode implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@ApiModelProperty(value = "id")
|
|
@Null(message="{id.null}", groups = AddGroup.class)
|
|
@NotNull(message="{id.require}", groups = UpdateGroup.class)
|
|
private Long id;
|
|
|
|
@ApiModelProperty(value = "上级ID")
|
|
@NotNull(message="{sysdept.pid.require}", groups = DefaultGroup.class)
|
|
private Long pid;
|
|
|
|
@ApiModelProperty(value = "部门名称")
|
|
@NotBlank(message="{sysdept.name.require}", groups = DefaultGroup.class)
|
|
private String name;
|
|
|
|
@ApiModelProperty(value = "排序")
|
|
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
|
|
private Integer sort;
|
|
|
|
@ApiModelProperty(value = "创建时间")
|
|
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
|
private Date createDate;
|
|
|
|
@ApiModelProperty(value = "上级部门名称")
|
|
private String parentName;
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
public void setSort(Integer sort) {
|
|
this.sort = sort;
|
|
}
|
|
public Integer getSort() {
|
|
return sort;
|
|
}
|
|
public void setCreateDate(Date createDate) {
|
|
this.createDate = createDate;
|
|
}
|
|
public Date getCreateDate() {
|
|
return createDate;
|
|
}
|
|
|
|
public String getParentName() {
|
|
return parentName;
|
|
}
|
|
|
|
public void setParentName(String parentName) {
|
|
this.parentName = parentName;
|
|
}
|
|
|
|
@Override
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
@Override
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
@Override
|
|
public Long getPid() {
|
|
return pid;
|
|
}
|
|
|
|
@Override
|
|
public void setPid(Long pid) {
|
|
this.pid = pid;
|
|
}
|
|
}
|
|
|