package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 部门表 sys_tenant
 * 
 * @author ruoyi
 */
public class SysTenant extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 租户ID */
    private Long tenantId;

    /** 租户名称 */
    @Excel(name = "租户名称")
    private String tenantName;

    /** 租户编号（公司统一信用代码） */
    @Excel(name = "租户编号", readConverterExp = "公司统一信用代码")
    private String tenantCode;

    /** 负责人 */
    @Excel(name = "负责人")
    private String owner;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String contactInfo;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 删除标志（0代表存在 1代表删除） */
    @Excel(name = "是否删除(0：未删除，1已删除)")
    private String isDel;

    /** 数据源id */
    private Long datasourceId;

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    @NotBlank(message = "租户名称不能为空")
    @Size(min = 0, max = 100, message = "租户名称长度不能超过100个字符")
    public String getTenantName() {
        return tenantName;
    }
    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    @NotBlank(message = "租户编号不能为空")
    @Size(min = 18, max = 18, message = "租户编号18个字符（公司统一信用代码）")
    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getContactInfo() {
        return contactInfo;
    }

    public void setContactInfo(String contactInfo) {
        this.contactInfo = contactInfo;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getIsDel() {
        return isDel;
    }

    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }

    public Long getDatasourceId() {
        return datasourceId;
    }

    public void setDatasourceId(Long datasourceId) {
        this.datasourceId = datasourceId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("tenantId", getTenantId())
            .append("tenantName", getTenantName())
            .append("tenantCode", getTenantCode())
            .append("owner", getOwner())
            .append("contactInfo", getContactInfo())
            .append("address", getAddress())
            .append("isDel", getIsDel())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("datasourceId",getTenantId())
            .toString();
    }




}
