package ink.wgink.service.department.listener.excel;

import com.alibaba.excel.annotation.ExcelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: DepartmentExcel
 * @Description: 部门
 * @Author: WangGeng
 * @Date: 2020/4/8 15:12
 * @Version: 1.0
 **/
public class DepartmentExcel {

    @ExcelProperty(index = 0)
    private Integer departmentId;
    @ExcelProperty(index = 1)
    private String departmentName;
    @ExcelProperty(index = 2)
    private Integer departmentParentId;
    @ExcelProperty(index = 3)
    private String departmentSummary;
    @ExcelProperty(index = 4)
    private String departmentTel;
    @ExcelProperty(index = 5)
    private Integer departmentType;

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName == null ? "" : departmentName.trim();
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public Integer getDepartmentParentId() {
        return departmentParentId;
    }

    public void setDepartmentParentId(Integer departmentParentId) {
        this.departmentParentId = departmentParentId;
    }

    public String getDepartmentSummary() {
        return departmentSummary == null ? "" : departmentSummary.trim();
    }

    public void setDepartmentSummary(String departmentSummary) {
        this.departmentSummary = departmentSummary;
    }

    public String getDepartmentTel() {
        return departmentTel == null ? "" : departmentTel.trim();
    }

    public void setDepartmentTel(String departmentTel) {
        this.departmentTel = departmentTel;
    }

    public Integer getDepartmentType() {
        return departmentType;
    }

    public void setDepartmentType(Integer departmentType) {
        this.departmentType = departmentType;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"departmentId\":")
                .append(departmentId);
        sb.append(",\"departmentName\":")
                .append("\"").append(departmentName).append("\"");
        sb.append(",\"departmentParentId\":")
                .append(departmentParentId);
        sb.append(",\"departmentSummary\":")
                .append("\"").append(departmentSummary).append("\"");
        sb.append(",\"departmentTel\":")
                .append("\"").append(departmentTel).append("\"");
        sb.append(",\"departmentType\":")
                .append(departmentType);
        sb.append('}');
        return sb.toString();
    }
}
