package com.zd.laboratory.domain;

import com.zd.common.core.annotation.Excel;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 楼栋对象 lab_building
 *
 * @author zd
 * @date 2021-09-01
 */
@ApiModel("楼栋表")
public class LabBuilding extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /**
     * 楼栋（楼层）名称
     */
    @ApiModelProperty("楼栋（楼层）名称")
    @Excel(name = "楼栋", readConverterExp = "楼=层")
    private String name;

    /**
     * 楼栋类型（参考字典表）
     */
    @ApiModelProperty("楼栋类型（参考字典表）")
    @Excel(name = "楼栋类型", readConverterExp = "参=考字典表")
    private Integer type;

    /**
     * 楼栋对应的图片地址
     */
    @ApiModelProperty("楼栋对应的图片地址")
    private String url;

    /**
     * 上级楼栋id，如果有，就是楼层，没有就是楼栋
     */
    @ApiModelProperty("上级楼栋id，如果有，就是楼层，没有就是楼栋")
    @Excel(name = "上级楼栋id，如果有，就是楼层，没有就是楼栋")
    private Long parentId;

    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    @Excel(name = "部门id")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty("部门名称")
    @Excel(name = "部门名称")
    private String deptName;

    /**
     * 创建人（用于数据权限）
     */
    @ApiModelProperty("创建人（用于数据权限）")
    @Excel(name = "创建人", readConverterExp = "用=于数据权限")
    private Long userId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("type", getType())
                .append("parentId", getParentId())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("createTime", getCreateTime())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("url", getUrl())
                .toString();
    }
}
