All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.mybatisplus.model.entity.BaseTenantEntity Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.mybatisplus.model.entity;

import java.util.Objects;

import org.zodiac.mybatisplus.base.BaseEntity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;

public abstract class BaseTenantEntity extends BaseEntity {

    private static final long serialVersionUID = 6369162855287769407L;

    /*
     * 租户ID
     */
    @JsonIgnore
    @TableField
    private String tenantId;

    public BaseTenantEntity() {
    }

    public String getTenantId() {
        return tenantId;
    }

    public BaseTenantEntity setTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + Objects.hash(tenantId);
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!super.equals(obj))
            return false;
        if (getClass() != obj.getClass())
            return false;
        BaseTenantEntity other = (BaseTenantEntity)obj;
        return Objects.equals(tenantId, other.tenantId);
    }

    @Override
    public String toString() {
        return "BaseTenantEntity [tenantId=" + tenantId + ", getId()=" + getId() + ", getCreateUser()="
            + getCreateUser() + ", getCreateDept()=" + getCreateDept() + ", getCreateTime()=" + getCreateTime()
            + ", getUpdateUser()=" + getUpdateUser() + ", getUpdateTime()=" + getUpdateTime() + ", getStatus()="
            + getStatus() + ", getIsDeleted()=" + getIsDeleted() + "]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy